summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_parse/parse_samr.c6
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
-rw-r--r--source3/rpcclient/cmd_samr.c32
3 files changed, 29 insertions, 11 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index b5aa2cd831..0a055ff826 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -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;
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 6ad5ec7706..52b78d5e8d 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -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;
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 68ceead69d..35598fb50c 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -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);
+
+ 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: %s\n", display_time(info1->expire));
- printf("Min password age (allow changing in x days): %s\n", display_time(info1->min_passwordage));
+ 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)