diff options
author | Sumit Bose <sbose@redhat.com> | 2011-06-23 17:42:52 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-08-31 12:52:52 +0200 |
commit | 4f6de78a12a2b9adf4532e7e54637bf29c5d1067 (patch) | |
tree | 7b526f175e498f35dda921404854f4d61fdf28c5 /source3 | |
parent | f864767034f5e463ce3f06e13920dedf55f494e4 (diff) | |
download | samba-4f6de78a12a2b9adf4532e7e54637bf29c5d1067.tar.gz samba-4f6de78a12a2b9adf4532e7e54637bf29c5d1067.tar.bz2 samba-4f6de78a12a2b9adf4532e7e54637bf29c5d1067.zip |
s3-pdb_ipa: Add posix offset to struct pdb_trusted_domain
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/passdb.h | 1 | ||||
-rw-r--r-- | source3/passdb/pdb_ipa.c | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h index 546bcb0cb1..b42491d834 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -267,6 +267,7 @@ struct pdb_trusted_domain { uint32_t trust_direction; uint32_t trust_type; uint32_t trust_attributes; + uint32_t *trust_posix_offset; DATA_BLOB trust_forest_trust_info; }; diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c index bc27520c9d..65164e5865 100644 --- a/source3/passdb/pdb_ipa.c +++ b/source3/passdb/pdb_ipa.c @@ -35,6 +35,7 @@ #define LDAP_ATTRIBUTE_TRUST_TYPE "sambaTrustType" #define LDAP_ATTRIBUTE_TRUST_ATTRIBUTES "sambaTrustAttributes" #define LDAP_ATTRIBUTE_TRUST_DIRECTION "sambaTrustDirection" +#define LDAP_ATTRIBUTE_TRUST_POSIX_OFFSET "sambaTrustPosixOffset" #define LDAP_ATTRIBUTE_TRUST_PARTNER "sambaTrustPartner" #define LDAP_ATTRIBUTE_FLAT_NAME "sambaFlatName" #define LDAP_ATTRIBUTE_TRUST_AUTH_OUTGOING "sambaTrustAuthOutgoing" @@ -364,6 +365,17 @@ static bool fill_pdb_trusted_domain(TALLOC_CTX *mem_ctx, return false; } + td->trust_posix_offset = talloc(td, uint32_t); + if (td->trust_posix_offset == NULL) { + return false; + } + res = get_uint32_t_from_ldap_msg(ldap_state, entry, + LDAP_ATTRIBUTE_TRUST_POSIX_OFFSET, + td->trust_posix_offset); + if (!res) { + return false; + } + get_data_blob_from_ldap_msg(td, ldap_state, entry, LDAP_ATTRIBUTE_TRUST_FOREST_TRUST_INFO, &td->trust_forest_trust_info); @@ -520,6 +532,16 @@ static NTSTATUS ipasam_set_trusted_domain(struct pdb_methods *methods, } } + if (td->trust_posix_offset != NULL) { + res = smbldap_make_mod_uint32_t(priv2ld(ldap_state), entry, + &mods, + LDAP_ATTRIBUTE_TRUST_POSIX_OFFSET, + *td->trust_posix_offset); + if (!res) { + return NT_STATUS_UNSUCCESSFUL; + } + } + if (td->trust_auth_outgoing.data != NULL) { smbldap_make_mod_blob(priv2ld(ldap_state), entry, &mods, LDAP_ATTRIBUTE_TRUST_AUTH_OUTGOING, |