The branch, v3-6-test has been updated
       via  1b85863 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.
      from  d1658ab Fix a typo - should be '&&' not '&' when checking for 
privileges.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 1b85863a989fc52152a0f1d51c01de7e99052753
Author: Jeremy Allison <j...@samba.org>
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.
    (cherry picked from commit 5e4f445d633879e9ee09383357700e1cc6f373ba)

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

Summary of changes:
 libcli/security/privileges.c |    4 ++++
 1 files changed, 4 insertions(+), 0 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;


-- 
Samba Shared Repository

Reply via email to