diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-07 11:27:26 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-07 11:10:23 +0000 |
commit | 786a76720c10c01a9636c6cf892cce42d05d647d (patch) | |
tree | e9ea0c6a8e73bf133e219d23a1497ede0066b9e3 /source4/dsdb/samdb/ldb_modules/samldb.c | |
parent | d6d5f80348c949c2b4984b9f211d1fff02b50948 (diff) | |
download | samba-786a76720c10c01a9636c6cf892cce42d05d647d.tar.gz samba-786a76720c10c01a9636c6cf892cce42d05d647d.tar.bz2 samba-786a76720c10c01a9636c6cf892cce42d05d647d.zip |
s4:ldb_modules/util.c - "dsdb_get_single_valued_attr" - support the attribute fetch also on LDB add operations
We've to completely ignore the flags in that case.
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov 7 11:10:23 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/samldb.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index ee43d84398..04b8dff0e0 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1009,7 +1009,8 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) struct ldb_dn *prev_prim_group_dn, *new_prim_group_dn; int ret; - el = dsdb_get_single_valued_attr(ac->msg, "primaryGroupID"); + el = dsdb_get_single_valued_attr(ac->msg, "primaryGroupID", + ac->req->operation); if (el == NULL) { /* we are not affected */ return LDB_SUCCESS; @@ -1154,7 +1155,8 @@ static int samldb_user_account_control_change(struct samldb_ctx *ac) struct ldb_message *tmp_msg; int ret; - el = dsdb_get_single_valued_attr(ac->msg, "userAccountControl"); + el = dsdb_get_single_valued_attr(ac->msg, "userAccountControl", + ac->req->operation); if (el == NULL) { /* we are not affected */ return LDB_SUCCESS; @@ -1227,7 +1229,8 @@ static int samldb_group_type_change(struct samldb_ctx *ac) struct ldb_message *tmp_msg; int ret; - el = dsdb_get_single_valued_attr(ac->msg, "groupType"); + el = dsdb_get_single_valued_attr(ac->msg, "groupType", + ac->req->operation); if (el == NULL) { /* we are not affected */ return LDB_SUCCESS; @@ -1313,7 +1316,8 @@ static int samldb_sam_accountname_check(struct samldb_ctx *ac) struct ldb_message *tmp_msg; int ret; - el = dsdb_get_single_valued_attr(ac->msg, "sAMAccountName"); + el = dsdb_get_single_valued_attr(ac->msg, "sAMAccountName", + ac->req->operation); if (el == NULL) { /* we are not affected */ return LDB_SUCCESS; @@ -1487,8 +1491,10 @@ static int samldb_service_principal_names_change(struct samldb_ctx *ac) unsigned int i; int ret; - el = dsdb_get_single_valued_attr(ac->msg, "dNSHostName"); - el2 = dsdb_get_single_valued_attr(ac->msg, "sAMAccountName"); + el = dsdb_get_single_valued_attr(ac->msg, "dNSHostName", + ac->req->operation); + el2 = dsdb_get_single_valued_attr(ac->msg, "sAMAccountName", + ac->req->operation); if ((el == NULL) && (el2 == NULL)) { /* we are not affected */ return LDB_SUCCESS; |