git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8395ac
)
Turns out there are lots of places in S3 where token passed in
author
Jeremy Allison
<jra@samba.org>
Thu, 2 Dec 2010 01:39:30 +0000
(17:39 -0800)
committer
Jeremy Allison
<jra@samba.org>
Thu, 2 Dec 2010 02:26:03 +0000
(
03:26
+0100)
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 <jra@samba.org>
Autobuild-Date: Thu Dec 2 03:26:03 CET 2010 on sn-devel-104
libcli/security/privileges.c
patch
|
blob
|
history
diff --git
a/libcli/security/privileges.c
b/libcli/security/privileges.c
index 57c485dbe60ec3a4e1826edd911333b0819b1fe2..e215b5f43abf8d6a7865cb7fc13e66d55e0eacf6 100644
(file)
--- 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;