summaryrefslogtreecommitdiff
path: root/src/responder/common
diff options
context:
space:
mode:
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);