r11964: rename flag to password_properties in SAM_UNK_INFO_1 because that's what
authorGünther Deschner <gd@samba.org>
Tue, 29 Nov 2005 23:40:01 +0000 (23:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:40 +0000 (11:05 -0500)
it is. (SAM_UNK_INFO_1 should get a better name as well).

Guenther
(This used to be commit d94aaeb625c39b6205fe61c274aed57b1399bafc)

source3/rpc_parse/parse_samr.c
source3/rpc_server/srv_samr_nt.c
source3/rpcclient/cmd_samr.c

index b5aa2cd831a9d4b03aaf10d28623fc7cd4bf3219..0a055ff826a72c352e0bccb42e06087cf9eae65a 100644 (file)
@@ -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;
index 6ad5ec77068d9600e7313202c62a6b09c2aeb5a5..52b78d5e8dee214b14bcbcae6b9ee0b3d77bd86c 100644 (file)
@@ -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;
index 68ceead69d3ba53c93282ae6187abfde49bc78ee..35598fb50c0f37dd7e8da207b1024b59aeea0e27 100644 (file)
@@ -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)