mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
r11964: rename flag to password_properties in SAM_UNK_INFO_1 because that's what
it is. (SAM_UNK_INFO_1 should get a better name as well). Guenther (This used to be commit d94aaeb625c39b6205fe61c274aed57b1399bafc)
This commit is contained in:
parent
41eb1127fd
commit
6ffd82ea77
@ -778,11 +778,11 @@ inits a structure.
|
||||
********************************************************************/
|
||||
|
||||
void init_unk_info1(SAM_UNK_INFO_1 *u_1, uint16 min_pass_len, uint16 pass_hist,
|
||||
uint32 flag, NTTIME nt_expire, NTTIME nt_min_age)
|
||||
uint32 password_properties, NTTIME nt_expire, NTTIME nt_min_age)
|
||||
{
|
||||
u_1->min_length_password = min_pass_len;
|
||||
u_1->password_history = pass_hist;
|
||||
u_1->flag = flag;
|
||||
u_1->password_properties = password_properties;
|
||||
|
||||
/* password never expire */
|
||||
u_1->expire.high = nt_expire.high;
|
||||
@ -811,7 +811,7 @@ static BOOL sam_io_unk_info1(const char *desc, SAM_UNK_INFO_1 * u_1,
|
||||
return False;
|
||||
if(!prs_uint16("password_history", ps, depth, &u_1->password_history))
|
||||
return False;
|
||||
if(!prs_uint32("flag", ps, depth, &u_1->flag))
|
||||
if(!prs_uint32("password_properties", ps, depth, &u_1->password_properties))
|
||||
return False;
|
||||
if(!smb_io_time("expire", &u_1->expire, ps, depth))
|
||||
return False;
|
||||
|
@ -4834,7 +4834,7 @@ NTSTATUS _samr_set_dom_info(pipes_struct *p, SAMR_Q_SET_DOMAIN_INFO *q_u, SAMR_R
|
||||
|
||||
pdb_set_account_policy(AP_MIN_PASSWORD_LEN, (uint32)q_u->ctr->info.inf1.min_length_password);
|
||||
pdb_set_account_policy(AP_PASSWORD_HISTORY, (uint32)q_u->ctr->info.inf1.password_history);
|
||||
pdb_set_account_policy(AP_USER_MUST_LOGON_TO_CHG_PASS, (uint32)q_u->ctr->info.inf1.flag);
|
||||
pdb_set_account_policy(AP_USER_MUST_LOGON_TO_CHG_PASS, (uint32)q_u->ctr->info.inf1.password_properties);
|
||||
pdb_set_account_policy(AP_MAX_PASSWORD_AGE, (int)u_expire);
|
||||
pdb_set_account_policy(AP_MIN_PASSWORD_AGE, (int)u_min_age);
|
||||
break;
|
||||
|
@ -165,14 +165,32 @@ static const char* server_role_str(uint32 server_role)
|
||||
static void display_sam_unk_info_1(SAM_UNK_INFO_1 *info1)
|
||||
{
|
||||
|
||||
printf("Minimum password length: %d\n", info1->min_length_password);
|
||||
printf("Password uniqueness (remember x passwords): %d\n", info1->password_history);
|
||||
printf("flag: ");
|
||||
if(info1->flag&&2==2) printf("users must open a session to change password ");
|
||||
printf("\n");
|
||||
printf("Minimum password length:\t\t\t%d\n", info1->min_length_password);
|
||||
printf("Password uniqueness (remember x passwords):\t%d\n", info1->password_history);
|
||||
printf("Password Properties:\t\t\t\t0x%08x\n", info1->password_properties);
|
||||
|
||||
printf("password expire in: %s\n", display_time(info1->expire));
|
||||
printf("Min password age (allow changing in x days): %s\n", display_time(info1->min_passwordage));
|
||||
if (info1->password_properties & DOMAIN_PASSWORD_COMPLEX)
|
||||
printf("\tDOMAIN_PASSWORD_COMPLEX\n");
|
||||
|
||||
if (info1->password_properties & DOMAIN_PASSWORD_NO_ANON_CHANGE) {
|
||||
printf("\tDOMAIN_PASSWORD_NO_ANON_CHANGE\n");
|
||||
printf("users must open a session to change password ");
|
||||
}
|
||||
|
||||
if (info1->password_properties & DOMAIN_PASSWORD_NO_CLEAR_CHANGE)
|
||||
printf("\tDOMAIN_PASSWORD_NO_CLEAR_CHANGE\n");
|
||||
|
||||
if (info1->password_properties & DOMAIN_LOCKOUT_ADMINS)
|
||||
printf("\tDOMAIN_LOCKOUT_ADMINS\n");
|
||||
|
||||
if (info1->password_properties & DOMAIN_PASSWORD_STORE_CLEARTEXT)
|
||||
printf("\tDOMAIN_PASSWORD_STORE_CLEARTEXT\n");
|
||||
|
||||
if (info1->password_properties & DOMAIN_REFUSE_PASSWORD_CHANGE)
|
||||
printf("\tDOMAIN_REFUSE_PASSWORD_CHANGE\n");
|
||||
|
||||
printf("password expire in:\t\t\t\t%s\n", display_time(info1->expire));
|
||||
printf("Min password age (allow changing in x days):\t%s\n", display_time(info1->min_passwordage));
|
||||
}
|
||||
|
||||
static void display_sam_unk_info_2(SAM_UNK_INFO_2 *info2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user