From 555ef2d5cfab6b5cac69f943d5ea870dd0c94423 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 4 Dec 2003 04:32:22 +0000 Subject: don't crash on a NULL priviledge pointer; patch from Jianliang Lu (This used to be commit 5bbfa9989bcade2e1192a68596de3e574faed1d5) --- source3/lib/privileges.c | 6 ++++++ 1 file changed, 6 insertions(+) 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"); -- cgit