diff options
author | Jim McDonough <jmcd@samba.org> | 2005-01-10 18:29:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:50 -0500 |
commit | deaaa6ee9ee0e3f170498baabca4a175453718ed (patch) | |
tree | 5a03768f3e660526339eb3f810f7b0d34d6a73d3 /source3/rpc_server | |
parent | a9928f0d95670b0e770fc9e8b7673bc863c1253b (diff) | |
download | samba-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.c | 13 |
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(®vals, "RefusePasswordChange", + REG_DWORD, + (const char*)&dwValue, sizeof(dwValue)); + val = dup_registry_value( + regval_ctr_specific_value( ®vals, 0 ) ); + + status = NT_STATUS_OK; goto out; } |