summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-10 11:47:17 +0100
committerMichael Adam <obnox@samba.org>2007-12-10 12:37:37 +0100
commitaf082d096e49e7662400efee3e78174d888e88c3 (patch)
treef3a9c62e8a3623f247c5c50e482a2a887260f02b /source3/auth
parent2585232054934bc60e1384f2bdb93bc43f75c7da (diff)
downloadsamba-af082d096e49e7662400efee3e78174d888e88c3.tar.gz
samba-af082d096e49e7662400efee3e78174d888e88c3.tar.bz2
samba-af082d096e49e7662400efee3e78174d888e88c3.zip
Correctly unbecome_root() on error
(This used to be commit aec5f1512660953168a2c55b2890cd6c076b8a92)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/token_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index bc6bea5d29..63672bcf74 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;
}