From 8ec93160d5cf2a0f917c1e1304127625e38ec2e0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Sep 2008 16:09:50 +0200 Subject: Fix last few includes to use new tdb location. --- source4/ntvfs/posix/vfs_posix.c | 2 +- source4/ntvfs/posix/xattr_tdb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index ce0da7033d..797496dd78 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -26,7 +26,7 @@ #include "includes.h" #include "vfs_posix.h" #include "librpc/gen_ndr/security.h" -#include "lib/tdb/include/tdb.h" +#include "../tdb/include/tdb.h" #include "tdb_wrap.h" #include "util/util_ldb.h" #include "libcli/security/security.h" diff --git a/source4/ntvfs/posix/xattr_tdb.c b/source4/ntvfs/posix/xattr_tdb.c index 1113ac1739..aa13fee4c8 100644 --- a/source4/ntvfs/posix/xattr_tdb.c +++ b/source4/ntvfs/posix/xattr_tdb.c @@ -21,7 +21,7 @@ #include "includes.h" #include "vfs_posix.h" -#include "lib/tdb/include/tdb.h" +#include "../tdb/include/tdb.h" #include "tdb_wrap.h" #define XATTR_LIST_ATTR ".xattr_list" -- cgit From f4e212323fb7ba2bd226194287602210aa9590ec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Sep 2008 12:09:56 +1000 Subject: added some debug code --- source4/ntvfs/posix/pvfs_open.c | 2 ++ source4/ntvfs/posix/pvfs_xattr.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index c127885a68..8dbc674241 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -1216,6 +1216,8 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, create_options &= ~create_options_must_ignore_mask; if (create_options & NTCREATEX_OPTIONS_NOT_SUPPORTED_MASK) { + DEBUG(2,(__location__ " create_options 0x%x not supported\n", + create_options)); return NT_STATUS_NOT_SUPPORTED; } diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c index 3cbbcbe92f..7a2945cd05 100644 --- a/source4/ntvfs/posix/pvfs_xattr.c +++ b/source4/ntvfs/posix/pvfs_xattr.c @@ -50,7 +50,7 @@ static NTSTATUS pull_xattr_blob(struct pvfs_state *pvfs, if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)|| NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)|| NT_STATUS_EQUAL(status, NT_STATUS_INVALID_SYSTEM_SERVICE)) { - DEBUG(5,("pvfs_xattr: xattr not supported in filesystem: %s\n", nt_errstr(status))); + DEBUG(2,("pvfs_xattr: xattr not supported in filesystem: %s\n", nt_errstr(status))); pvfs->flags &= ~PVFS_FLAG_XATTR_ENABLE; status = NT_STATUS_NOT_FOUND; } -- cgit From d3c6c71ff2d5499be152785a49ad128641330b40 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Sep 2008 17:31:57 -0700 Subject: zero access mask should give ACCESS_DENIED --- source4/ntvfs/posix/pvfs_acl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 57a463aba6..06a4e69004 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -511,6 +511,10 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs, NTSTATUS status; struct security_descriptor *sd; + if (*access_mask == 0) { + return NT_STATUS_ACCESS_DENIED; + } + if (pvfs_read_only(pvfs, *access_mask)) { return NT_STATUS_ACCESS_DENIED; } -- cgit From d2bdb8fb1685d7ab2f23a4c4169bcc2e5c97f675 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Sep 2008 17:58:15 -0700 Subject: empty access mask is only denied on SMB2 --- source4/ntvfs/posix/pvfs_acl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 06a4e69004..d479f1e2ee 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -511,7 +511,9 @@ NTSTATUS pvfs_access_check(struct pvfs_state *pvfs, NTSTATUS status; struct security_descriptor *sd; - if (*access_mask == 0) { + /* on SMB2 a blank access mask is always denied */ + if (pvfs->ntvfs->ctx->protocol == PROTOCOL_SMB2 && + *access_mask == 0) { return NT_STATUS_ACCESS_DENIED; } -- cgit From 956599975573044f5f930ef23ce54c11db156ebe Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Oct 2008 21:31:42 +0200 Subject: Fix include paths to new location of libutil. --- source4/ntvfs/posix/pvfs_acl_nfs4.c | 2 +- source4/ntvfs/posix/pvfs_acl_xattr.c | 2 +- source4/ntvfs/posix/pvfs_lock.c | 2 +- source4/ntvfs/posix/pvfs_notify.c | 2 +- source4/ntvfs/posix/pvfs_open.c | 2 +- source4/ntvfs/posix/pvfs_search.c | 2 +- source4/ntvfs/posix/pvfs_wait.c | 2 +- source4/ntvfs/posix/pvfs_xattr.c | 2 +- source4/ntvfs/posix/vfs_posix.c | 2 +- source4/ntvfs/posix/xattr_system.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/pvfs_acl_nfs4.c b/source4/ntvfs/posix/pvfs_acl_nfs4.c index fa855555b2..02ed058af7 100644 --- a/source4/ntvfs/posix/pvfs_acl_nfs4.c +++ b/source4/ntvfs/posix/pvfs_acl_nfs4.c @@ -22,7 +22,7 @@ #include "includes.h" #include "vfs_posix.h" -#include "lib/util/unix_privs.h" +#include "../lib/util/unix_privs.h" #include "librpc/gen_ndr/ndr_nfs4acl.h" #include "libcli/security/security.h" diff --git a/source4/ntvfs/posix/pvfs_acl_xattr.c b/source4/ntvfs/posix/pvfs_acl_xattr.c index 1cf52718c2..87bb6bcb94 100644 --- a/source4/ntvfs/posix/pvfs_acl_xattr.c +++ b/source4/ntvfs/posix/pvfs_acl_xattr.c @@ -21,7 +21,7 @@ #include "includes.h" #include "vfs_posix.h" -#include "lib/util/unix_privs.h" +#include "../lib/util/unix_privs.h" #include "librpc/gen_ndr/ndr_xattr.h" /* diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index 0054455838..173b2fe187 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -22,7 +22,7 @@ #include "includes.h" #include "vfs_posix.h" #include "system/time.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "messaging/messaging.h" diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c index 06d2bc8e0c..719b7fa5fc 100644 --- a/source4/ntvfs/posix/pvfs_notify.c +++ b/source4/ntvfs/posix/pvfs_notify.c @@ -23,7 +23,7 @@ #include "vfs_posix.h" #include "lib/messaging/irpc.h" #include "messaging/messaging.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "lib/events/events.h" /* pending notifies buffer, hung off struct pvfs_file for open directories diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 8dbc674241..8a32f01223 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -23,7 +23,7 @@ #include "vfs_posix.h" #include "system/dir.h" #include "system/time.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "messaging/messaging.h" #include "librpc/gen_ndr/xattr.h" diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index e0fe4fb64d..b846845731 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -25,7 +25,7 @@ #include "librpc/gen_ndr/security.h" #include "smbd/service_stream.h" #include "lib/events/events.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" /* place a reasonable limit on old-style searches as clients tend to not send search close requests */ diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c index 291250befd..c22a0c8792 100644 --- a/source4/ntvfs/posix/pvfs_wait.c +++ b/source4/ntvfs/posix/pvfs_wait.c @@ -21,7 +21,7 @@ #include "includes.h" #include "lib/events/events.h" -#include "lib/util/dlinklist.h" +#include "../lib/util/dlinklist.h" #include "vfs_posix.h" #include "smbd/service_stream.h" #include "lib/messaging/irpc.h" diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c index 7a2945cd05..1ca09402a3 100644 --- a/source4/ntvfs/posix/pvfs_xattr.c +++ b/source4/ntvfs/posix/pvfs_xattr.c @@ -21,7 +21,7 @@ #include "includes.h" #include "vfs_posix.h" -#include "lib/util/unix_privs.h" +#include "../lib/util/unix_privs.h" #include "librpc/gen_ndr/ndr_xattr.h" #include "param/param.h" diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 797496dd78..601c876cfb 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -28,7 +28,7 @@ #include "librpc/gen_ndr/security.h" #include "../tdb/include/tdb.h" #include "tdb_wrap.h" -#include "util/util_ldb.h" +#include "../lib/util/util_ldb.h" #include "libcli/security/security.h" #include "lib/events/events.h" #include "param/param.h" diff --git a/source4/ntvfs/posix/xattr_system.c b/source4/ntvfs/posix/xattr_system.c index 9a89f2a338..f22c0e9ea4 100644 --- a/source4/ntvfs/posix/xattr_system.c +++ b/source4/ntvfs/posix/xattr_system.c @@ -21,7 +21,7 @@ #include "includes.h" #include "vfs_posix.h" -#include "lib/util/wrap_xattr.h" +#include "../lib/util/wrap_xattr.h" /* pull a xattr as a blob, from either a file or a file descriptor -- cgit