The branch, master has been updated
       via  75508ce Turns out there are lots of places in S3 where token passed 
in here can be NULL (become_root() sets the current security token to NULL for 
example). Ensure we don't crash.
       via  c8395ac Fix a typo - should be '&&' not '&' when checking for 
privileges.
      from  fd38dab wintest: added README

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 75508cea4a95ea63a1a4c192c82e827a712aa709
Author: Jeremy Allison <[email protected]>
Date:   Wed Dec 1 17:39:30 2010 -0800

    Turns out there are lots of places in S3 where token passed in
    here can be NULL (become_root() sets the current security token to
    NULL for example). Ensure we don't crash.
    
    Jeremy.
    
    Autobuild-User: Jeremy Allison <[email protected]>
    Autobuild-Date: Thu Dec  2 03:26:03 CET 2010 on sn-devel-104

commit c8395ac6cfe3ee66c8fa8ad47f48353ae14ba8c4
Author: Jeremy Allison <[email protected]>
Date:   Wed Dec 1 17:29:05 2010 -0800

    Fix a typo - should be '&&' not '&' when checking for privileges.
    
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 libcli/security/privileges.c |    4 ++++
 source3/smbd/open.c          |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c
index 57c485d..e215b5f 100644
--- a/libcli/security/privileges.c
+++ b/libcli/security/privileges.c
@@ -412,6 +412,10 @@ bool security_token_has_privilege(const struct 
security_token *token, enum sec_p
 {
        uint64_t mask;
 
+       if (!token) {
+               return false;
+       }
+
        mask = sec_privilege_mask(privilege);
        if (mask == 0) {
                return false;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 85513bd..80756d6 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2489,7 +2489,7 @@ static NTSTATUS open_directory(connection_struct *conn,
                return status;
        }
 
-       if ((access_mask & SEC_FLAG_SYSTEM_SECURITY) &
+       if ((access_mask & SEC_FLAG_SYSTEM_SECURITY) &&
                        !security_token_has_privilege(get_current_nttok(conn),
                                        SEC_PRIV_SECURITY)) {
                DEBUG(10, ("open_directory: open on %s "


-- 
Samba Shared Repository

Reply via email to