git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62ccae3
)
s3-netlogon: Fix setting the machinge account password.
author
Andreas Schneider
<asn@samba.org>
Thu, 27 Oct 2011 09:21:08 +0000
(11:21 +0200)
committer
Andreas Schneider
<asn@samba.org>
Thu, 27 Oct 2011 11:32:00 +0000
(13:32 +0200)
This bug has been found with uid wrapper.
source3/rpc_server/netlogon/srv_netlog_nt.c
patch
|
blob
|
history
diff --git
a/source3/rpc_server/netlogon/srv_netlog_nt.c
b/source3/rpc_server/netlogon/srv_netlog_nt.c
index dc0c33d395e82a20c7a5e623e0b19926cf609367..0c94c5be9c3c669bdab91fabf5821af78d3cb6d5 100644
(file)
--- a/
source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/
source3/rpc_server/netlogon/srv_netlog_nt.c
@@
-1155,6
+1155,7
@@
static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx,
goto out;
}
+ become_root();
status = samr_find_machine_account(mem_ctx,
h,
account_name,
@@
-1162,6
+1163,7
@@
static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx,
NULL,
NULL,
&user_handle);
+ unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
goto out;
}
@@
-1205,12
+1207,14
@@
static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx,
info->info18 = info18;
+ become_root();
status = dcerpc_samr_SetUserInfo2(h,
mem_ctx,
&user_handle,
UserInternal1Information,
info,
&result);
+ unbecome_root();
if (!NT_STATUS_IS_OK(status)) {
goto out;
}