summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb.h
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-03-16 12:29:37 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-03-23 04:58:37 -0400
commitd86c2d2995933d61fc3c63f74ec260b5c8c75bf9 (patch)
treeb480ea82383bedf7408bed830fd1c658486cb02f /src/db/sysdb.h
parent42d8e67c26df2b7660507d26b9a50911bdd3cf18 (diff)
downloadsssd_unused-d86c2d2995933d61fc3c63f74ec260b5c8c75bf9.tar.gz
sssd_unused-d86c2d2995933d61fc3c63f74ec260b5c8c75bf9.tar.xz
sssd_unused-d86c2d2995933d61fc3c63f74ec260b5c8c75bf9.zip
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.
Diffstat (limited to 'src/db/sysdb.h')
-rw-r--r--src/db/sysdb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index caef6163..e9842655 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -215,6 +215,10 @@ 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);