summaryrefslogtreecommitdiffstats
path: root/src/util/util.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2016-06-22 10:33:09 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-07 10:29:23 +0200
commitbd769a08d18c791a18e913cf92f7f1651f56d3ff (patch)
treeff1c0f413fcc0703a556ee8b81e018c0432ce4e2 /src/util/util.h
parent64497d479e92ebc34717c20c3d017f1823f9e630 (diff)
downloadsssd-bd769a08d18c791a18e913cf92f7f1651f56d3ff.tar.gz
sssd-bd769a08d18c791a18e913cf92f7f1651f56d3ff.tar.xz
sssd-bd769a08d18c791a18e913cf92f7f1651f56d3ff.zip
LDAP: Qualify user and group names when saving the sudo users
If the sudoUser values we fetch from LDAP correspond to a user or a group name per: http://www.sudo.ws/man/1.8.14/sudoers.ldap.man.html then we parse the usernames into (name,domain) tuples and store them qualified. This patch not only makes the sudo provider work with qualified names, but also makes it possible to use qualified names on the LDAP side, allowing for example AD users from different domains to access sudo rules. Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/util/util.h')
-rw-r--r--src/util/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/util.h b/src/util/util.h
index 3b8acd1c5..3ed8444b5 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -381,6 +381,9 @@ errno_t sss_hash_create_ex(TALLOC_CTX *mem_ctx,
hash_delete_callback *delete_callback,
void *delete_private_data);
+/* Returns true if sudoUser value is a username or a groupname */
+bool is_user_or_group_name(const char *sudo_user_value);
+
/**
* @brief Add two list of strings
*