diff options
author | Rafal Szczesniak <mimir@samba.org> | 2005-08-04 02:51:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:10 -0500 |
commit | 9d7d5ea229cc12ac56d565f400990e7b56685a56 (patch) | |
tree | f23a4aa8ee09dbe258e54884a647e2782801df12 /source4/libnet | |
parent | 31867a971442beb589d7e95fa6b247a0fa66d51b (diff) | |
download | samba-9d7d5ea229cc12ac56d565f400990e7b56685a56.tar.gz samba-9d7d5ea229cc12ac56d565f400990e7b56685a56.tar.bz2 samba-9d7d5ea229cc12ac56d565f400990e7b56685a56.zip |
r9037: New fields in usermod function - allow_password_change and
force_password_change datetime.
rafal
(This used to be commit dfa2cc6c4ed8273b1d3ee604954c81c75f0890bd)
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/composite.h | 2 | ||||
-rw-r--r-- | source4/libnet/userman.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 169b65f215..85aa1c08e1 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -67,6 +67,7 @@ struct libnet_rpc_userdel { #define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) #define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 ) #define USERMOD_FIELD_ALLOW_PASS_CHG ( 0x00008000 ) +#define USERMOD_FIELD_FORCE_PASS_CHG ( 0x00010000 ) #define USERMOD_FIELD_ACCT_FLAGS ( 0x00100000 ) struct libnet_rpc_usermod { @@ -85,6 +86,7 @@ struct libnet_rpc_usermod { const char *profile_path; struct timeval *acct_expiry; struct timeval *allow_password_change; + struct timeval *force_password_change; } change; } in; }; diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index 59cb804ae9..3482bba18e 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -546,6 +546,19 @@ static uint32_t usermod_setfields(struct usermod_state *s, uint16_t *level, } else { s->stage = USERMOD_QUERY; + return s->change.fields; + } + + } else if (s->change.fields & USERMOD_FIELD_FORCE_PASS_CHG) { + *level = 3; + + if (s->stage == USERMOD_QUERY) { + i->info3.force_password_change = timeval_to_nttime(s->change.force_password_change); + s->change.fields ^= USERMOD_FIELD_FORCE_PASS_CHG; + + } else { + s->stage = USERMOD_QUERY; + return s->change.fields; } } else if (s->change.fields & USERMOD_FIELD_LOGON_SCRIPT) { |