summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2005-01-10 18:29:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:50 -0500
commitdeaaa6ee9ee0e3f170498baabca4a175453718ed (patch)
tree5a03768f3e660526339eb3f810f7b0d34d6a73d3 /source3/rpc_server
parenta9928f0d95670b0e770fc9e8b7673bc863c1253b (diff)
downloadsamba-deaaa6ee9ee0e3f170498baabca4a175453718ed.tar.gz
samba-deaaa6ee9ee0e3f170498baabca4a175453718ed.tar.bz2
samba-deaaa6ee9ee0e3f170498baabca4a175453718ed.zip
r4651: Add "refuse machine password change" policy field. This update will just
return the appropriate reg value. Enforcement to be added soon. Also, fix account policy tdb upgrade so it doesn't just wipe out everything that was in there from a a previous version. (This used to be commit ccae934cf9de4b234bac324b8d878c8ec7862f67)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_reg_nt.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index dc9db47c66..d85a066e34 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -373,11 +373,22 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
/* couple of hard coded registry values */
if ( strequal(name, "RefusePasswordChange") ) {
+ uint32 dwValue;
+
if ( (val = SMB_MALLOC_P(REGISTRY_VALUE)) == NULL ) {
DEBUG(0,("_reg_info: malloc() failed!\n"));
return NT_STATUS_NO_MEMORY;
}
- ZERO_STRUCTP( val );
+
+ if (!account_policy_get(AP_REFUSE_MACHINE_PW_CHANGE, &dwValue))
+ dwValue = 0;
+ regval_ctr_addvalue(&regvals, "RefusePasswordChange",
+ REG_DWORD,
+ (const char*)&dwValue, sizeof(dwValue));
+ val = dup_registry_value(
+ regval_ctr_specific_value( &regvals, 0 ) );
+
+ status = NT_STATUS_OK;
goto out;
}