1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s4:SAMR rpc server - "QueryUserInfo" - send back the password expired flag on level 21

Taken from the s3 server code
This commit is contained in:
Matthias Dieter Wallnöfer 2010-07-05 15:54:21 +02:00
parent 9c8135785a
commit 7f15ca4427

View File

@ -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;