diff options
author | Rafal Szczesniak <mimir@samba.org> | 2005-07-27 21:46:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:30:06 -0500 |
commit | 5cc8a42a058a6d8850143cae68e87f1395de99cc (patch) | |
tree | 5a52fc483286b8f94b113eda351fe52758f054c3 /source4/libnet | |
parent | 5b94a9583f5fa167729fc6e425ae748c740a1ae1 (diff) | |
download | samba-5cc8a42a058a6d8850143cae68e87f1395de99cc.tar.gz samba-5cc8a42a058a6d8850143cae68e87f1395de99cc.tar.bz2 samba-5cc8a42a058a6d8850143cae68e87f1395de99cc.zip |
r8807: Modifying datetime field using struct timeval argument rather than
text-based, after recent discussion with both Andrews :)
Basic test seems to work (at least it doesn't fail now).
rafal
(This used to be commit 1bc3162e9441aeae1d8c4b4f03b5b75eb848f4bf)
Diffstat (limited to 'source4/libnet')
-rw-r--r-- | source4/libnet/composite.h | 2 | ||||
-rw-r--r-- | source4/libnet/userman.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h index 6fc0886cb3..256590bc5b 100644 --- a/source4/libnet/composite.h +++ b/source4/libnet/composite.h @@ -64,6 +64,7 @@ struct libnet_rpc_userdel { #define USERMOD_FIELD_DESCRIPTION ( 0x00000010 ) #define USERMOD_FIELD_LOGON_SCRIPT ( 0x00000100 ) #define USERMOD_FIELD_PROFILE_PATH ( 0x00000200 ) +#define USERMOD_FIELD_ACCT_EXPIRY ( 0x00004000 ) struct libnet_rpc_usermod { struct { @@ -78,6 +79,7 @@ struct libnet_rpc_usermod { const char *description; const char *logon_script; const char *profile_path; + struct timeval *acct_expiry; } change; } in; }; diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c index a3c1eaf17a..ef7f2658c4 100644 --- a/source4/libnet/userman.c +++ b/source4/libnet/userman.c @@ -549,6 +549,12 @@ static NTSTATUS usermod_open(struct composite_context *c, i->info12.profile_path.string = s->change.profile_path; s->change.fields ^= USERMOD_FIELD_PROFILE_PATH; + + } else if (s->change.fields & USERMOD_FIELD_ACCT_EXPIRY) { + level = 17; + i->info17.acct_expiry = timeval_to_nttime(s->change.acct_expiry); + + s->change.fields ^= USERMOD_FIELD_ACCT_EXPIRY; } } |