#include "includes.h"
#include "smbd/smbd.h"
+#include "smbd/globals.h"
#include "fake_file.h"
#include "auth.h"
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 "