From: Volker Lendecke Date: Mon, 10 Dec 2007 10:47:17 +0000 (+0100) Subject: Correctly unbecome_root() on error X-Git-Url: http://git.samba.org/samba.git/?p=gd%2Fsamba%2F.git;a=commitdiff_plain;h=af082d096e49e7662400efee3e78174d888e88c3 Correctly unbecome_root() on error (This used to be commit aec5f1512660953168a2c55b2890cd6c076b8a92) --- diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c index bc6bea5d29c..63672bcf743 100644 --- a/source3/auth/token_util.c +++ b/source3/auth/token_util.c @@ -395,6 +395,7 @@ struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx, status = add_aliases(get_global_sam_sid(), result); if (!NT_STATUS_IS_OK(status)) { + unbecome_root(); TALLOC_FREE(result); return NULL; } @@ -404,6 +405,7 @@ struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx, status = add_aliases(&global_sid_Builtin, result); if (!NT_STATUS_IS_OK(status)) { + unbecome_root(); TALLOC_FREE(result); return NULL; }