summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/events/events_signal.c10
-rw-r--r--source4/ntvfs/posix/pvfs_open.c12
-rw-r--r--source4/ntvfs/posix/xattr_system.c2
-rw-r--r--source4/smb_server/smb/nttrans.c1
-rw-r--r--source4/smb_server/smb/reply.c1
5 files changed, 14 insertions, 12 deletions
diff --git a/source4/lib/events/events_signal.c b/source4/lib/events/events_signal.c
index 80a14acc11..652df53d4b 100644
--- a/source4/lib/events/events_signal.c
+++ b/source4/lib/events/events_signal.c
@@ -46,15 +46,15 @@ struct sigcounter {
the poor design of signals means that this table must be static global
*/
static struct sig_state {
- struct signal_event *sig_handlers[NUM_SIGNALS];
- struct sigaction *oldact[NUM_SIGNALS];
- struct sigcounter signal_count[NUM_SIGNALS];
+ struct signal_event *sig_handlers[NUM_SIGNALS+1];
+ struct sigaction *oldact[NUM_SIGNALS+1];
+ struct sigcounter signal_count[NUM_SIGNALS+1];
struct sigcounter got_signal;
int pipe_hack[2];
#ifdef SA_SIGINFO
/* with SA_SIGINFO we get quite a lot of info per signal */
- siginfo_t *sig_info[NUM_SIGNALS];
- struct sigcounter sig_blocked[NUM_SIGNALS];
+ siginfo_t *sig_info[NUM_SIGNALS+1];
+ struct sigcounter sig_blocked[NUM_SIGNALS+1];
#endif
} *sig_state;
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 01a249ceb7..6114b2052c 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -631,12 +631,6 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
status = pvfs_access_check_create(pvfs, req, name, &access_mask);
NT_STATUS_NOT_OK_RETURN(status);
- if (io->generic.in.query_maximal_access) {
- status = pvfs_access_maximal_allowed(pvfs, req, name,
- &io->generic.out.maximal_access);
- NT_STATUS_NOT_OK_RETURN(status);
- }
-
/* check that the parent isn't opened with delete on close set */
status = pvfs_resolve_parent(pvfs, req, name, &parent);
if (NT_STATUS_IS_OK(status)) {
@@ -707,6 +701,12 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
goto cleanup_delete;
}
+ if (io->generic.in.query_maximal_access) {
+ status = pvfs_access_maximal_allowed(pvfs, req, name,
+ &io->generic.out.maximal_access);
+ NT_STATUS_NOT_OK_RETURN(status);
+ }
+
/* form the lock context used for byte range locking and
opendb locking */
status = pvfs_locking_key(name, f->handle, &f->handle->odb_locking_key);
diff --git a/source4/ntvfs/posix/xattr_system.c b/source4/ntvfs/posix/xattr_system.c
index 7283d716b4..9a89f2a338 100644
--- a/source4/ntvfs/posix/xattr_system.c
+++ b/source4/ntvfs/posix/xattr_system.c
@@ -74,7 +74,7 @@ again:
return NT_STATUS_NOT_FOUND;
} else {
- /* if not this was probably a legittimate error
+ /* if not this was probably a legitimate error
* reset ret and errno to the correct values */
errno = EPERM;
ret = -1;
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index a959793dde..4a06ea4b91 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -134,6 +134,7 @@ static NTSTATUS nttrans_create(struct smbsrv_request *req,
io->ntcreatex.in.security_flags = CVAL(params, 52);
io->ntcreatex.in.sec_desc = NULL;
io->ntcreatex.in.ea_list = NULL;
+ io->ntcreatex.in.query_maximal_access = false;
req_pull_string(&req->in.bufinfo, &io->ntcreatex.in.fname,
params + 53,
diff --git a/source4/smb_server/smb/reply.c b/source4/smb_server/smb/reply.c
index d7ed052ba0..9c4ee993d2 100644
--- a/source4/smb_server/smb/reply.c
+++ b/source4/smb_server/smb/reply.c
@@ -2192,6 +2192,7 @@ void smbsrv_reply_ntcreate_and_X(struct smbsrv_request *req)
io->ntcreatex.in.security_flags = CVAL(req->in.vwv, 47);
io->ntcreatex.in.ea_list = NULL;
io->ntcreatex.in.sec_desc = NULL;
+ io->ntcreatex.in.query_maximal_access = false;
/* we use a couple of bits of the create options internally */
if (io->ntcreatex.in.create_options & NTCREATEX_OPTIONS_PRIVATE_MASK) {