diff options
author | Jim McDonough <jmcd@samba.org> | 2004-02-12 16:16:53 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2004-02-12 16:16:53 +0000 |
commit | 1fa1e931a3ab031675f4e4e08119a531a1b98ab5 (patch) | |
tree | e386b5de6a1da1c656708928caaf7eccdcb74213 /source3/passdb | |
parent | 34232f9ec0eb8f0c78688581cb71ae8041aae535 (diff) | |
download | samba-1fa1e931a3ab031675f4e4e08119a531a1b98ab5.tar.gz samba-1fa1e931a3ab031675f4e4e08119a531a1b98ab5.tar.bz2 samba-1fa1e931a3ab031675f4e4e08119a531a1b98ab5.zip |
More sync between passdb on 3.0 and HEAD.
Replace unknown_3 with fields_present. Also causes rpc_samr structure field changes.
(This used to be commit 1976843345efb6ca4f9cebd964a61acd8ae11d41)
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 12 | ||||
-rw-r--r-- | source3/passdb/pdb_get_set.c | 17 |
2 files changed, 18 insertions, 11 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index db3ec6eb11..1549fd0e66 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -79,7 +79,7 @@ void pdb_fill_default_sam(SAM_ACCOUNT *user) user->private.logoff_time = user->private.kickoff_time = user->private.pass_must_change_time = get_time_t_max(); - user->private.unknown_3 = 0x00ffffff; /* don't know */ + user->private.fields_present = 0x00ffffff; user->private.logon_divs = 168; /* hours per week */ user->private.hours_len = 21; /* 21 times 8 bits = 168 */ memset(user->private.hours, 0xff, user->private.hours_len); /* available at all hours */ @@ -1332,7 +1332,7 @@ BOOL init_sam_from_buffer(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) fullname_len, homedir_len, logon_script_len, profile_path_len, acct_desc_len, workstations_len; - uint32 user_rid, group_rid, unknown_3, hours_len, unknown_6; + uint32 user_rid, group_rid, fields_present, hours_len, unknown_6; uint16 acct_ctrl, logon_divs; uint16 bad_password_count, logon_count; uint8 *hours; @@ -1371,7 +1371,7 @@ BOOL init_sam_from_buffer(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) &lm_pw_len, &lm_pw_ptr, &nt_pw_len, &nt_pw_ptr, &acct_ctrl, - &unknown_3, + &fields_present, &logon_divs, &hours_len, &hourslen, &hours, @@ -1449,7 +1449,7 @@ BOOL init_sam_from_buffer(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen) pdb_set_user_sid_from_rid(sampass, user_rid, PDB_SET); pdb_set_group_sid_from_rid(sampass, group_rid, PDB_SET); - pdb_set_unknown_3(sampass, unknown_3, PDB_SET); + pdb_set_fields_present(sampass, fields_present, PDB_SET); pdb_set_hours_len(sampass, hours_len, PDB_SET); pdb_set_bad_password_count(sampass, bad_password_count, PDB_SET); pdb_set_logon_count(sampass, logon_count, PDB_SET); @@ -1656,7 +1656,7 @@ uint32 init_buffer_from_sam (uint8 **buf, const SAM_ACCOUNT *sampass, BOOL size_ lm_pw_len, lm_pw, nt_pw_len, nt_pw, pdb_get_acct_ctrl(sampass), - pdb_get_unknown_3(sampass), + pdb_get_fields_present(sampass), pdb_get_logon_divs(sampass), pdb_get_hours_len(sampass), MAX_HOURS_LEN, pdb_get_hours(sampass), @@ -1699,7 +1699,7 @@ uint32 init_buffer_from_sam (uint8 **buf, const SAM_ACCOUNT *sampass, BOOL size_ lm_pw_len, lm_pw, nt_pw_len, nt_pw, pdb_get_acct_ctrl(sampass), - pdb_get_unknown_3(sampass), + pdb_get_fields_present(sampass), pdb_get_logon_divs(sampass), pdb_get_hours_len(sampass), MAX_HOURS_LEN, pdb_get_hours(sampass), diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 935b75cf75..2d6b065cbd 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -306,10 +306,10 @@ const char* pdb_get_munged_dial (const SAM_ACCOUNT *sampass) return (NULL); } -uint32 pdb_get_unknown_3 (const SAM_ACCOUNT *sampass) +uint32 pdb_get_fields_present (const SAM_ACCOUNT *sampass) { if (sampass) - return (sampass->private.unknown_3); + return (sampass->private.fields_present); else return (-1); } @@ -990,14 +990,14 @@ BOOL pdb_set_plaintext_pw_only (SAM_ACCOUNT *sampass, const char *password, enum return pdb_set_init_flags(sampass, PDB_PLAINTEXT_PW, flag); } -BOOL pdb_set_unknown_3 (SAM_ACCOUNT *sampass, uint32 unkn, enum pdb_value_state flag) +BOOL pdb_set_fields_present (SAM_ACCOUNT *sampass, uint32 fields_present, enum pdb_value_state flag) { if (!sampass) return False; - sampass->private.unknown_3 = unkn; + sampass->private.fields_present = fields_present; - return pdb_set_init_flags(sampass, PDB_UNKNOWN3, flag); + return pdb_set_init_flags(sampass, PDB_FIELDS_PRESENT, flag); } BOOL pdb_set_bad_password_count(SAM_ACCOUNT *sampass, uint16 bad_password_count, enum pdb_value_state flag) @@ -1147,3 +1147,10 @@ BOOL pdb_set_plaintext_passwd (SAM_ACCOUNT *sampass, const char *plaintext) return True; } + +/* check for any PDB_SET/CHANGED field and fill the appropriate mask bit */ +uint32 pdb_build_fields_present (SAM_ACCOUNT *sampass) +{ + /* value set to all for testing */ + return 0x00ffffff; +} |