summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb.h
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-03-16 12:34:26 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-03-23 05:05:00 -0400
commitf33d34ea282b151518cd9befb9cd281aaccfa966 (patch)
treefb0ac9c93aaf0b65d21a74db06ad693816d055f6 /src/db/sysdb.h
parent2fb62d06da345b5adb3357373c29ce9e212c5640 (diff)
downloadsssd_unused-f33d34ea282b151518cd9befb9cd281aaccfa966.tar.gz
sssd_unused-f33d34ea282b151518cd9befb9cd281aaccfa966.tar.xz
sssd_unused-f33d34ea282b151518cd9befb9cd281aaccfa966.zip
Ignore alternate names for users and groups
Create sysdb_get_rdn() function This function takes a DN formatted string and returns the RDN value from it. Add sysdb_attrs_primary_name() This function will check a sysdb_attrs struct for the primary name of the entity it represents. If there are multiple entries, it will pick the one that matches the RDN. If none match, it will throw an error. Ignore aliases for users Users in ldap with multiple values for their username attribute will now be compared against the RDN of the entry to determine the "primary" username. We will save only this primary name to the ldb cache. RFC2307: Ignore aliases for groups Groups in ldap with multiple values for their groupname attribute will now be compared against the RDN of the entry to determine the "primary" group name. We will save only this primary group name to the ldb cache. RFC2307bis: Ignore aliases for groups Groups in ldap with multiple values for their groupname attribute will now be compared against the RDN of the entry to determine the "primary" group name. We will save only this primary group name to the ldb cache.
Diffstat (limited to 'src/db/sysdb.h')
-rw-r--r--src/db/sysdb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index ae0b33ce..e9842655 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -215,11 +215,17 @@ int sysdb_attrs_users_from_ldb_vals(struct sysdb_attrs *attrs,
const char *domain,
struct ldb_val *values,
int num_values);
+errno_t sysdb_attrs_primary_name(struct sysdb_ctx *sysdb,
+ struct sysdb_attrs *attrs,
+ const char *ldap_attr,
+ const char **_primary);
/* convert an ldb error into an errno error */
int sysdb_error_to_errno(int ldberr);
/* DNs related helper functions */
+errno_t sysdb_get_rdn(struct sysdb_ctx *ctx, void *memctx,
+ const char *_dn, char **_name, char **_val);
struct ldb_dn *sysdb_user_dn(struct sysdb_ctx *ctx, void *memctx,
const char *domain, const char *name);
struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *ctx, void *memctx,