summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-07-05 15:54:21 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-07-06 21:54:21 +0200
commit7f15ca4427ae07520a457fa8f19991f6e350205b (patch)
treee43935d9e53b763dab782a72103adc2aedd69c5e /source4/rpc_server/samr
parent9c8135785ad7b2bee4a0d37470dc37fed04a6516 (diff)
downloadsamba-7f15ca4427ae07520a457fa8f19991f6e350205b.tar.gz
samba-7f15ca4427ae07520a457fa8f19991f6e350205b.tar.bz2
samba-7f15ca4427ae07520a457fa8f19991f6e350205b.zip
s4:SAMR rpc server - "QueryUserInfo" - send back the password expired flag on level 21
Taken from the s3 server code
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 882bf3fbcd..1361b681f1 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -3063,10 +3063,15 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
QUERY_RID (msg, info21.rid, "objectSid");
QUERY_UINT (msg, info21.primary_gid, "primaryGroupID");
QUERY_AFLAGS(msg, info21.acct_flags, "userAccountControl");
- info->info21.fields_present = 0x00FFFFFF;
+ info->info21.fields_present = 0x08FFFFFF;
QUERY_LHOURS(msg, info21.logon_hours, "logonHours");
QUERY_UINT (msg, info21.bad_password_count, "badPwdCount");
QUERY_UINT (msg, info21.logon_count, "logonCount");
+ if ((info->info21.acct_flags & ACB_PW_EXPIRED) != 0) {
+ info->info21.password_expired = PASS_MUST_CHANGE_AT_NEXT_LOGON;
+ } else {
+ info->info21.password_expired = PASS_DONT_CHANGE_AT_NEXT_LOGON;
+ }
QUERY_UINT (msg, info21.country_code, "countryCode");
QUERY_UINT (msg, info21.code_page, "codePage");
break;