summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'libcli')
-rw-r--r--libcli/security/privileges.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcli/security/privileges.c b/libcli/security/privileges.c
index 57c485dbe6..e215b5f43a 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;