diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-15 19:01:04 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-02-15 21:12:22 +0100 |
commit | 8bbf0ad2a04ceabdbdf21bb157b3f0f3423cd43c (patch) | |
tree | ddbcfd3d39279a4c44abee41878523b3a68fae1d /source3/passdb | |
parent | 63c556e306ca01a8f65d884275a530a8eced6b2c (diff) | |
download | samba-8bbf0ad2a04ceabdbdf21bb157b3f0f3423cd43c.tar.gz samba-8bbf0ad2a04ceabdbdf21bb157b3f0f3423cd43c.tar.bz2 samba-8bbf0ad2a04ceabdbdf21bb157b3f0f3423cd43c.zip |
s3: Support "country_code" in pdb_ads
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ads.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 1ff8042a9e..d45706a0e7 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -188,6 +188,7 @@ static NTSTATUS pdb_ads_init_sam_from_priv(struct pdb_methods *m, time_t tmp_time; struct dom_sid sid; uint64_t n; + uint32_t i; DATA_BLOB blob; str = tldap_talloc_single_attribute(entry, "samAccountName", sam); @@ -303,6 +304,11 @@ static NTSTATUS pdb_ads_init_sam_from_priv(struct pdb_methods *m, pdb_set_group_sid(sam, &sid, PDB_SET); } + + if (tldap_pull_uint32(entry, "countryCode", &i)) { + pdb_set_country_code(sam, i, PDB_SET); + } + status = NT_STATUS_OK; fail: TALLOC_FREE(frame); @@ -394,6 +400,10 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state, existing, mem_ctx, pmods, pnum_mods, "userParameters", "%s", pdb_get_munged_dial(sam)); + ret &= tldap_make_mod_fmt( + existing, mem_ctx, pmods, pnum_mods, "countryCode", + "%i", (int)pdb_get_country_code(sam)); + fail: return ret; } |