summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2005-08-05 01:23:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:15 -0500
commit6f6e42c8565c63c637bc9b5a73aa08bf3a48550a (patch)
tree5c064df78834d63955f70136bb955c4ce2b41347 /source4/libnet
parent36a2b361778a8c73b2e79087bf46d52e45d6afbf (diff)
downloadsamba-6f6e42c8565c63c637bc9b5a73aa08bf3a48550a.tar.gz
samba-6f6e42c8565c63c637bc9b5a73aa08bf3a48550a.tar.bz2
samba-6f6e42c8565c63c637bc9b5a73aa08bf3a48550a.zip
r9090: Another field in usermod function - account flags.
rafal (This used to be commit f0d51b78c040937bd27857c063fae215a3f0f465)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/composite.h1
-rw-r--r--source4/libnet/userman.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/source4/libnet/composite.h b/source4/libnet/composite.h
index 85aa1c08e1..6d805812c0 100644
--- a/source4/libnet/composite.h
+++ b/source4/libnet/composite.h
@@ -87,6 +87,7 @@ struct libnet_rpc_usermod {
struct timeval *acct_expiry;
struct timeval *allow_password_change;
struct timeval *force_password_change;
+ uint32_t acct_flags;
} change;
} in;
};
diff --git a/source4/libnet/userman.c b/source4/libnet/userman.c
index 3482bba18e..13d9b1330b 100644
--- a/source4/libnet/userman.c
+++ b/source4/libnet/userman.c
@@ -578,6 +578,12 @@ static uint32_t usermod_setfields(struct usermod_state *s, uint16_t *level,
i->info17.acct_expiry = timeval_to_nttime(s->change.acct_expiry);
s->change.fields ^= USERMOD_FIELD_ACCT_EXPIRY;
+
+ } else if (s->change.fields & USERMOD_FIELD_ACCT_FLAGS) {
+ *level = 16;
+ i->info16.acct_flags = s->change.acct_flags;
+
+ s->change.fields ^= USERMOD_FIELD_ACCT_FLAGS;
}
}