diff options
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmbclient.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 4c013c4ed2..b8070283da 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -4826,11 +4826,19 @@ cacl_set(TALLOC_CTX *ctx, CONST_DISCARD(char *, the_acl)); if (!sd) { - errno = EINVAL; - return -1; + errno = EINVAL; + return -1; } } + /* SMBC_XATTR_MODE_REMOVE_ALL is the only caller + that doesn't deref sd */ + + if (!sd && (mode != SMBC_XATTR_MODE_REMOVE_ALL)) { + errno = EINVAL; + return -1; + } + /* The desired access below is the only one I could find that works with NT4, W2KP and Samba */ |