summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-08-26 10:33:41 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-08-26 10:33:41 +1000
commita85ee07046b80e9e87d2ac0cf5fe95ddaaa0f5c9 (patch)
tree3d69b5c652c4c59dfaa1a5aee41d27d9a6e01039
parent387cd89af403ef6c9501e6617622269508b34355 (diff)
downloadsamba-a85ee07046b80e9e87d2ac0cf5fe95ddaaa0f5c9.tar.gz
samba-a85ee07046b80e9e87d2ac0cf5fe95ddaaa0f5c9.tar.bz2
samba-a85ee07046b80e9e87d2ac0cf5fe95ddaaa0f5c9.zip
Implement matching logic to Windows 2008 on handling of secrets.
This is enforced by the new RPC-LSA test. Andrew Bartlett (This used to be commit da200ac64485fd9531b1aa048570c682b680b012)
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 096bba3c9f..7ed3b63540 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -2011,22 +2011,14 @@ static NTSTATUS dcesrv_lsa_SetSecret(struct dcesrv_call_state *dce_call, TALLOC_
}
if (!r->in.new_val) {
- /* This behaviour varies depending of if this is a local, or a global secret... */
- if (secret_state->global) {
- /* set old value mtime */
- if (samdb_msg_add_uint64(secret_state->sam_ldb,
- mem_ctx, msg, "lastSetTime", nt_now) != 0) {
- return NT_STATUS_NO_MEMORY;
- }
- } else {
- if (samdb_msg_add_delete(secret_state->sam_ldb,
- mem_ctx, msg, "currentValue")) {
- return NT_STATUS_NO_MEMORY;
- }
- if (samdb_msg_add_delete(secret_state->sam_ldb,
- mem_ctx, msg, "lastSetTime")) {
- return NT_STATUS_NO_MEMORY;
- }
+ /* set old value mtime */
+ if (samdb_msg_add_uint64(secret_state->sam_ldb,
+ mem_ctx, msg, "lastSetTime", nt_now) != 0) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ if (samdb_msg_add_delete(secret_state->sam_ldb,
+ mem_ctx, msg, "currentValue")) {
+ return NT_STATUS_NO_MEMORY;
}
}
}