diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-07-10 13:59:40 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-07-11 21:33:29 +0200 |
commit | 581d8fa36b73abab030168dc35fb631ccd42a388 (patch) | |
tree | d2801d9a785eb983a6a0ea463aad269a5c63ffe9 /source3 | |
parent | 896f105ed40dc04f83bcbfac367b309c8d957f86 (diff) | |
download | samba-581d8fa36b73abab030168dc35fb631ccd42a388.tar.gz samba-581d8fa36b73abab030168dc35fb631ccd42a388.tar.xz samba-581d8fa36b73abab030168dc35fb631ccd42a388.zip |
s3:smbd: use smbd_calculate_access_mask() also for fake_files
metze
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/fake_file.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/smbd/fake_file.c b/source3/smbd/fake_file.c index 81f7686726b..68967fb2683 100644 --- a/source3/smbd/fake_file.c +++ b/source3/smbd/fake_file.c @@ -19,6 +19,7 @@ #include "includes.h" #include "smbd/smbd.h" +#include "smbd/globals.h" #include "fake_file.h" #include "auth.h" @@ -128,6 +129,18 @@ NTSTATUS open_fake_file(struct smb_request *req, connection_struct *conn, files_struct *fsp = NULL; NTSTATUS status; + status = smbd_calculate_access_mask(conn, smb_fname, + false, /* fake files do not exist */ + access_mask, &access_mask); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(10, ("open_fake_file: smbd_calculate_access_mask " + "on service[%s] file[%s] returned %s\n", + lp_servicename(SNUM(conn)), + smb_fname_str_dbg(smb_fname), + nt_errstr(status))); + return status; + } + /* access check */ if (geteuid() != sec_initial_uid()) { DEBUG(3, ("open_fake_file_shared: access_denied to " |