diff options
-rw-r--r-- | source3/include/passdb.h | 3 | ||||
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/passdb/pdb_get_set.c | 12 |
3 files changed, 18 insertions, 0 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h index ac6dd21ace..5bc122e006 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -70,6 +70,7 @@ enum pdb_elements { PDB_FIELDS_PRESENT, PDB_BAD_PASSWORD_COUNT, PDB_LOGON_COUNT, + PDB_COUNTRY_CODE, PDB_UNKNOWN6, PDB_LMPASSWD, PDB_NTPASSWD, @@ -166,6 +167,8 @@ struct samu { uint16_t bad_password_count; uint16_t logon_count; + uint16_t country_code; + uint32_t unknown_6; /* 0x0000 04ec */ /* a tag for who added the private methods */ diff --git a/source3/include/proto.h b/source3/include/proto.h index f584216f0b..8b8ee6444b 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -3735,6 +3735,7 @@ const char *pdb_get_comment(const struct samu *sampass); const char *pdb_get_munged_dial(const struct samu *sampass); uint16_t pdb_get_bad_password_count(const struct samu *sampass); uint16_t pdb_get_logon_count(const struct samu *sampass); +uint16_t pdb_get_country_code(const struct samu *sampass); uint32_t pdb_get_unknown_6(const struct samu *sampass); void *pdb_get_backend_private_data(const struct samu *sampass, const struct pdb_methods *my_methods); bool pdb_set_acct_ctrl(struct samu *sampass, uint32_t acct_ctrl, enum pdb_value_state flag); @@ -3769,6 +3770,8 @@ bool pdb_set_pw_history(struct samu *sampass, const uint8_t *pwd, uint32_t histo bool pdb_set_plaintext_pw_only(struct samu *sampass, const char *password, enum pdb_value_state flag); bool pdb_set_bad_password_count(struct samu *sampass, uint16_t bad_password_count, enum pdb_value_state flag); bool pdb_set_logon_count(struct samu *sampass, uint16_t logon_count, enum pdb_value_state flag); +bool pdb_set_country_code(struct samu *sampass, uint16_t country_code, + enum pdb_value_state flag); bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum pdb_value_state flag); bool pdb_set_hours(struct samu *sampass, const uint8_t *hours, enum pdb_value_state flag); bool pdb_set_backend_private_data(struct samu *sampass, void *private_data, diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 762c23fe52..950b1942f2 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -305,6 +305,11 @@ uint16_t pdb_get_logon_count(const struct samu *sampass) return sampass->logon_count; } +uint16_t pdb_get_country_code(const struct samu *sampass) +{ + return sampass->country_code; +} + uint32_t pdb_get_unknown_6(const struct samu *sampass) { return sampass->unknown_6; @@ -888,6 +893,13 @@ bool pdb_set_logon_count(struct samu *sampass, uint16_t logon_count, enum pdb_va return pdb_set_init_flags(sampass, PDB_LOGON_COUNT, flag); } +bool pdb_set_country_code(struct samu *sampass, uint16_t country_code, + enum pdb_value_state flag) +{ + sampass->country_code = country_code; + return pdb_set_init_flags(sampass, PDB_COUNTRY_CODE, flag); +} + bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum pdb_value_state flag) { sampass->unknown_6 = unkn; |