summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-15 19:09:51 +0100
committerVolker Lendecke <vl@samba.org>2011-02-15 21:12:22 +0100
commit63c556e306ca01a8f65d884275a530a8eced6b2c (patch)
tree6d048ced8549cbfceeee9c10ac23c8d019f1a52b
parentd9d0fef862b198f43ead20193fae8283a192af73 (diff)
downloadsamba-63c556e306ca01a8f65d884275a530a8eced6b2c.tar.gz
samba-63c556e306ca01a8f65d884275a530a8eced6b2c.tar.bz2
samba-63c556e306ca01a8f65d884275a530a8eced6b2c.zip
s3: Pass "country_code" through samr
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c4
-rw-r--r--source3/rpc_server/samr/srv_samr_util.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index 7a69894425..7432e01601 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -2488,7 +2488,7 @@ static NTSTATUS get_user_info_2(TALLOC_CTX *mem_ctx,
{
r->comment.string = talloc_strdup(mem_ctx, pdb_get_comment(pw));
r->reserved.string = NULL;
- r->country_code = 0;
+ r->country_code = pdb_get_country_code(pw);
r->code_page = 0;
return NT_STATUS_OK;
@@ -2974,7 +2974,7 @@ static NTSTATUS get_user_info_21(TALLOC_CTX *mem_ctx,
r->fields_present = pdb_build_fields_present(pw);
r->password_expired = (pdb_get_pass_must_change_time(pw) == 0) ?
PASS_MUST_CHANGE_AT_NEXT_LOGON : 0;
- r->country_code = 0;
+ r->country_code = pdb_get_country_code(pw);
r->code_page = 0;
r->lm_password_set = 0;
r->nt_password_set = 0;
diff --git a/source3/rpc_server/samr/srv_samr_util.c b/source3/rpc_server/samr/srv_samr_util.c
index 6fc4ade3cf..77d40e0251 100644
--- a/source3/rpc_server/samr/srv_samr_util.c
+++ b/source3/rpc_server/samr/srv_samr_util.c
@@ -640,6 +640,15 @@ void copy_id21_to_sam_passwd(const char *log_prefix,
}
}
}
+
+ if (from->fields_present & SAMR_FIELD_COUNTRY_CODE) {
+ DEBUG(10,("%s SAMR_FIELD_COUNTRY_CODE: %08X -> %08X\n", l,
+ pdb_get_country_code(to), from->country_code));
+ if (from->country_code != pdb_get_country_code(to)) {
+ pdb_set_country_code(to,
+ from->country_code, PDB_CHANGED);
+ }
+ }
}