2003-04-12 03:32:00 +04:00
/*
Unix SMB / CIFS implementation .
FAKE FILE suppport , for faking up special files windows want access to
Copyright ( C ) Stefan ( metze ) Metzmacher 2003
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-09 23:25:36 +04:00
the Free Software Foundation ; either version 3 of the License , or
2003-04-12 03:32:00 +04:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 04:52:41 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2003-04-12 03:32:00 +04:00
*/
# ifndef _FAKE_FILE_H
# define _FAKE_FILE_H
enum FAKE_FILE_TYPE {
FAKE_FILE_TYPE_NONE = 0 ,
2008-10-13 01:01:38 +04:00
FAKE_FILE_TYPE_QUOTA ,
Add proxied named pipe support
This is a central piece of the "merged build" thing: Forward named pipes from
samba3 to samba4. This patch is not finished yet, as we will have to forward
the smb-level authentication information to samba4, but I'm pushing this patch
already to demonstrate the implementation without clutter.
It adds an intermediate parameter
np:proxy = srvsvc samr winreg wkssvc ... and so on
that states which of the pipes should be forwarded to the s4 unix domain socket
DEFAULT. The parameter is intermediate because once we have a proper endpoint
mapper implementation, this information will be retrieved out of a database.
If anybody wants to try this, do the merged build and configure s4 with
server services = samba3_smb, rpc, nbt, wrepl, ldap, cldap, kdc, drepl
samba3:smbd = /data/inst/sbin/smbd
and s3 with
auth methods = guest netlogond
np:proxy = srvsvc samr winreg wkssvc netlogon ntlsa ntsvcs lsass lsarpc netdfs \
rpcecho initshutdown epmapper svcctl eventlog drsuapi
Then run rpcclient against samba4. It will fork s3, which authenticates against
s4, and then forwards the rpc requests to s4.
Volker
2008-10-25 17:37:13 +04:00
FAKE_FILE_TYPE_NAMED_PIPE ,
FAKE_FILE_TYPE_NAMED_PIPE_PROXY
2003-04-12 03:32:00 +04:00
} ;
2004-04-29 21:19:42 +04:00
/*
we now get the unix name - - metze
*/
2004-09-17 19:09:20 +04:00
# define FAKE_FILE_NAME_QUOTA_WIN32 "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"
# define FAKE_FILE_NAME_QUOTA_UNIX "$Extend / $Quota:$Q:$INDEX_ALLOCATION"
2003-04-12 03:32:00 +04:00
2008-03-29 20:19:31 +03:00
struct fake_file_handle {
2003-04-12 03:32:00 +04:00
enum FAKE_FILE_TYPE type ;
2008-03-29 20:19:31 +03:00
void * private_data ;
} ;
2003-04-12 03:32:00 +04:00
2010-10-03 12:46:22 +04:00
enum FAKE_FILE_TYPE is_fake_file_path ( const char * path ) ;
enum FAKE_FILE_TYPE is_fake_file ( const struct smb_filename * smb_fname ) ;
NTSTATUS open_fake_file ( struct smb_request * req , connection_struct * conn ,
2012-06-05 17:39:44 +04:00
uint64_t current_vuid ,
2010-10-03 12:46:22 +04:00
enum FAKE_FILE_TYPE fake_file_type ,
const struct smb_filename * smb_fname ,
2015-05-01 05:22:21 +03:00
uint32_t access_mask ,
2010-10-03 12:46:22 +04:00
files_struct * * result ) ;
NTSTATUS close_fake_file ( struct smb_request * req , files_struct * fsp ) ;
2003-04-12 03:32:00 +04:00
# endif /* _FAKE_FILE_H */