diff options
author | Gerald Carter <jerry@samba.org> | 2003-12-04 04:32:22 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-12-04 04:32:22 +0000 |
commit | 555ef2d5cfab6b5cac69f943d5ea870dd0c94423 (patch) | |
tree | 0e4566aff61bd544055797e2088d7a4780f3e13a /source3/lib | |
parent | 3a1dd0dc773c98c7af40de07cd6e43b5f3170280 (diff) | |
download | samba-555ef2d5cfab6b5cac69f943d5ea870dd0c94423.tar.gz samba-555ef2d5cfab6b5cac69f943d5ea870dd0c94423.tar.bz2 samba-555ef2d5cfab6b5cac69f943d5ea870dd0c94423.zip |
don't crash on a NULL priviledge pointer; patch from Jianliang Lu
(This used to be commit 5bbfa9989bcade2e1192a68596de3e574faed1d5)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/privileges.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c index 1ed583382d..b9d4df301d 100644 --- a/source3/lib/privileges.c +++ b/source3/lib/privileges.c @@ -69,6 +69,12 @@ NTSTATUS dupalloc_luid_attr(TALLOC_CTX *mem_ctx, LUID_ATTR **new_la, LUID_ATTR * { NTSTATUS ret; + /* don't crash if the source pointer is NULL (since we don't + do priviledges now anyways) */ + + if ( !old_la ) + return NT_STATUS_OK; + *new_la = (LUID_ATTR *)talloc(mem_ctx, sizeof(LUID_ATTR)); ALLOC_CHECK(new_la, ret, done, "dupalloc_luid_attr"); |