summaryrefslogtreecommitdiff
path: root/src/responder/common
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-09-21 18:30:30 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-10-01 21:45:21 +0200
commit1542b85f13d72329685bdd97aa879c36d11f81be (patch)
treef8623dd7d926741197ec488d5a5ff047c57e2222 /src/responder/common
parent00516601e579f2ae4a287332966860cb0af152f9 (diff)
downloadsssd-1542b85f13d72329685bdd97aa879c36d11f81be.tar.gz
sssd-1542b85f13d72329685bdd97aa879c36d11f81be.tar.bz2
sssd-1542b85f13d72329685bdd97aa879c36d11f81be.zip
Add new option default_domain_suffix
Diffstat (limited to 'src/responder/common')
-rw-r--r--src/responder/common/negcache.c10
-rw-r--r--src/responder/common/responder.h3
-rw-r--r--src/responder/common/responder_common.c10
3 files changed, 20 insertions, 3 deletions
diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c
index b59b1f34..5be1ea68 100644
--- a/src/responder/common/negcache.c
+++ b/src/responder/common/negcache.c
@@ -596,7 +596,9 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
filter_set = true;
for (i = 0; (filter_list && filter_list[i]); i++) {
- ret = sss_parse_name_for_domains(tmpctx, domain_list, filter_list[i],
+ ret = sss_parse_name_for_domains(tmpctx, domain_list,
+ rctx->default_domain,
+ filter_list[i],
&domainname, &name);
if (ret != EOK) {
DEBUG(1, ("Invalid name in filterUsers list: [%s] (%d)\n",
@@ -641,7 +643,8 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
else if (ret != EOK) goto done;
for (i = 0; (filter_list && filter_list[i]); i++) {
- ret = sss_parse_name_for_domains(tmpctx, domain_list, filter_list[i],
+ ret = sss_parse_name_for_domains(tmpctx, domain_list,
+ rctx->default_domain, filter_list[i],
&domainname, &name);
if (ret != EOK) {
DEBUG(1, ("Invalid name in filterUsers list: [%s] (%d)\n",
@@ -738,7 +741,8 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache,
else if (ret != EOK) goto done;
for (i = 0; (filter_list && filter_list[i]); i++) {
- ret = sss_parse_name_for_domains(tmpctx, domain_list, filter_list[i],
+ ret = sss_parse_name_for_domains(tmpctx, domain_list,
+ rctx->default_domain, filter_list[i],
&domainname, &name);
if (ret != EOK) {
DEBUG(1, ("Invalid name in filterGroups list: [%s] (%d)\n",
diff --git a/src/responder/common/responder.h b/src/responder/common/responder.h
index c09262d1..5bab0d3c 100644
--- a/src/responder/common/responder.h
+++ b/src/responder/common/responder.h
@@ -101,6 +101,8 @@ struct resp_ctx {
size_t allowed_uids_count;
uid_t *allowed_uids;
+ char *default_domain;
+
void *pvt_ctx;
};
@@ -160,6 +162,7 @@ int sss_parse_name(TALLOC_CTX *memctx,
int sss_parse_name_for_domains(TALLOC_CTX *memctx,
struct sss_domain_info *domains,
+ const char *default_domain,
const char *orig, char **domain, char **name);
int sss_dp_get_domain_conn(struct resp_ctx *rctx, const char *domain,
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 37a08d94..2f8cd84d 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -783,6 +783,16 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
return ret;
}
+ ret = confdb_get_string(rctx->cdb, rctx, CONFDB_MONITOR_CONF_ENTRY,
+ CONFDB_MONITOR_DEFAULT_DOMAIN, NULL,
+ &rctx->default_domain);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Cannnot get the default domain [%d]: %s\n",
+ ret, strerror(ret)));
+ return ret;
+ }
+
ret = sss_monitor_init(rctx, rctx->ev, monitor_intf,
svc_name, svc_version, rctx,
&rctx->mon_conn);