[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Mon Jan 23 16:45:02 MST 2012
The branch, master has been updated
via 869fd8e Another fix for bug #8556 - ACL permissions ignored when SMBsetatr is requested.
via 3191040 Another fix for bug #8556 - ACL permissions ignored when SMBsetatr is requested.
via af6bf77 lib: use differing NTSTATUS and WERROR struct members
via ec094bf WERROR type variable being incorrectly checked with a NT_STATUS_IS_X type macro.
from c3a7573 s3-spoolss: fix incorrect error check type
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 869fd8eeba00bd62e89de344184ef748c5c0f9c0
Author: Jeremy Allison <jra at samba.org>
Date: Mon Jan 23 14:09:32 2012 -0800
Another fix for bug #8556 - ACL permissions ignored when SMBsetatr is requested.
Remove erroneous check on FILE_WRITE_ATTRIBUTES when changing POSIX
permissions - this isn't an attribute set call (unless you're storing
attributes in POSIX permissions, which is not recommended).
Autobuild-User: Jeremy Allison <jra at samba.org>
Autobuild-Date: Tue Jan 24 00:44:24 CET 2012 on sn-devel-104
commit 3191040c3d2c761769e983af3bdcd386f21e82c4
Author: Richard Sharpe <realrichardsharpe at gmail.com>
Date: Mon Jan 23 12:50:25 2012 -0800
Another fix for bug #8556 - ACL permissions ignored when SMBsetatr is requested.
Prevent systems with "store dos attributes = yes" from overriding
FILE_WRITE_ATTRIBUITES.
commit af6bf7714d8eb4cd3ac4e9f9ab674326e74c6a49
Author: David Disseldorp <ddiss at samba.org>
Date: Mon Jan 23 12:18:20 2012 -0800
lib: use differing NTSTATUS and WERROR struct members
This allows the compiler to catch uses of incorrectly typed arguments
for [NT_STATUS|W_ERROR]_IS_OK() and [NT_STATUS|W_ERROR]_EQUAL(). I.e.
WERROR werr;
werr = my_fn(); /* XXX returns WERROR type */
if (NT_STATUS_EQUAL(werr, NT_STATUS_OBJECT_NAME_COLLISION)) {
commit ec094bf9ac144daf3bad31e71d6bee9849e0149a
Author: David Disseldorp <ddiss at samba.org>
Date: Mon Jan 23 12:18:01 2012 -0800
WERROR type variable being incorrectly checked with a NT_STATUS_IS_X
type macro.
-----------------------------------------------------------------------
Summary of changes:
libcli/util/werror.h | 4 ++--
source3/printing/nt_printing.c | 2 +-
source3/rpc_client/cli_winreg_spoolss.c | 2 +-
source3/smbd/open.c | 1 +
source3/smbd/trans2.c | 5 -----
source4/lib/registry/tools/regtree.c | 2 +-
6 files changed, 6 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libcli/util/werror.h b/libcli/util/werror.h
index b490974..4c14b7f 100644
--- a/libcli/util/werror.h
+++ b/libcli/util/werror.h
@@ -30,9 +30,9 @@
*/
#if defined(HAVE_IMMEDIATE_STRUCTURES)
-typedef struct {uint32_t v;} WERROR;
+typedef struct {uint32_t w;} WERROR;
#define W_ERROR(x) ((WERROR) { x })
-#define W_ERROR_V(x) ((x).v)
+#define W_ERROR_V(x) ((x).w)
#else
typedef uint32_t WERROR;
#define W_ERROR(x) (x)
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 70346b2..7fc55c3 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -746,7 +746,7 @@ static uint32 get_correct_cversion(struct auth_session_info *session_info,
SMB_VFS_DISCONNECT(conn);
conn_free(conn);
}
- if (!NT_STATUS_IS_OK(*perr)) {
+ if (!W_ERROR_IS_OK(*perr)) {
cversion = -1;
}
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c
index 2a6a8d1..a50fcc7 100644
--- a/source3/rpc_client/cli_winreg_spoolss.c
+++ b/source3/rpc_client/cli_winreg_spoolss.c
@@ -3647,7 +3647,7 @@ WERROR winreg_get_driver(TALLOC_CTX *mem_ctx,
result = winreg_enumval_to_dword(info8, v,
"Version",
&tmp);
- if (NT_STATUS_IS_OK(result)) {
+ if (W_ERROR_IS_OK(result)) {
info8->version = (enum spoolss_DriverOSVersion) tmp;
}
CHECK_ERROR(result);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 1fd8c11..5388059 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -164,6 +164,7 @@ NTSTATUS smbd_check_access_rights(struct connection_struct *conn,
if ((access_mask & FILE_WRITE_ATTRIBUTES) &&
(rejected_mask & FILE_WRITE_ATTRIBUTES) &&
+ !lp_store_dos_attributes(SNUM(conn)) &&
(lp_map_readonly(SNUM(conn)) ||
lp_map_archive(SNUM(conn)) ||
lp_map_hidden(SNUM(conn)) ||
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ba6bcbb..cee6c35 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6970,11 +6970,6 @@ static NTSTATUS smb_set_file_unix_basic(connection_struct *conn,
}
#endif
- status = check_access(conn, fsp, smb_fname, FILE_WRITE_ATTRIBUTES);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
-
/*
* Deal with the UNIX specific mode set.
*/
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 6857940..40570dd 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -92,7 +92,7 @@ static void print_tree(unsigned int level, struct registry_key *p,
}
mem_ctx = talloc_init("sec_desc");
- if (NT_STATUS_IS_ERR(reg_get_sec_desc(mem_ctx, p, &sec_desc))) {
+ if (!W_ERROR_IS_OK(reg_get_sec_desc(mem_ctx, p, &sec_desc))) {
DEBUG(0, ("Error getting security descriptor\n"));
}
talloc_free(mem_ctx);
--
Samba Shared Repository
More information about the samba-cvs
mailing list