summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/passdb.h2
-rw-r--r--source3/include/proto.h3
-rw-r--r--source3/passdb/pdb_get_set.c12
3 files changed, 17 insertions, 0 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 5bc122e006..dc50533cdf 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -71,6 +71,7 @@ enum pdb_elements {
PDB_BAD_PASSWORD_COUNT,
PDB_LOGON_COUNT,
PDB_COUNTRY_CODE,
+ PDB_CODE_PAGE,
PDB_UNKNOWN6,
PDB_LMPASSWD,
PDB_NTPASSWD,
@@ -168,6 +169,7 @@ struct samu {
uint16_t logon_count;
uint16_t country_code;
+ uint16_t code_page;
uint32_t unknown_6; /* 0x0000 04ec */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 8b8ee6444b..83ac33ac23 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3736,6 +3736,7 @@ 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);
+uint16_t pdb_get_code_page(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);
@@ -3772,6 +3773,8 @@ bool pdb_set_bad_password_count(struct samu *sampass, uint16_t bad_password_coun
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_code_page(struct samu *sampass, uint16_t code_page,
+ 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 950b1942f2..07a63e24e6 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -310,6 +310,11 @@ uint16_t pdb_get_country_code(const struct samu *sampass)
return sampass->country_code;
}
+uint16_t pdb_get_code_page(const struct samu *sampass)
+{
+ return sampass->code_page;
+}
+
uint32_t pdb_get_unknown_6(const struct samu *sampass)
{
return sampass->unknown_6;
@@ -900,6 +905,13 @@ bool pdb_set_country_code(struct samu *sampass, uint16_t country_code,
return pdb_set_init_flags(sampass, PDB_COUNTRY_CODE, flag);
}
+bool pdb_set_code_page(struct samu *sampass, uint16_t code_page,
+ enum pdb_value_state flag)
+{
+ sampass->code_page = code_page;
+ return pdb_set_init_flags(sampass, PDB_CODE_PAGE, flag);
+}
+
bool pdb_set_unknown_6(struct samu *sampass, uint32_t unkn, enum pdb_value_state flag)
{
sampass->unknown_6 = unkn;