summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-12-04 04:31:29 +0000
committerGerald Carter <jerry@samba.org>2003-12-04 04:31:29 +0000
commitb754e4af39d8a720a45dbc6b472211b4ca2eefcc (patch)
tree31056965c6681a5d339cb2dc9840d643790f690a /source3/lib
parent88dad93acb6b2c62ae08d27752ed6b4ab87e7ad0 (diff)
downloadsamba-b754e4af39d8a720a45dbc6b472211b4ca2eefcc.tar.gz
samba-b754e4af39d8a720a45dbc6b472211b4ca2eefcc.tar.bz2
samba-b754e4af39d8a720a45dbc6b472211b4ca2eefcc.zip
don't crash on a NULL priviledge pointer; patch from Jianliang Lu
(This used to be commit 2742e813fea2366f91bec62dca407f65ad5c4623)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/privileges.c6
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");