summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.h4
-rw-r--r--src/db/sysdb_search.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 5cec8484..53dbd7c1 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -143,8 +143,8 @@
#define SYSDB_GETCACHED_FILTER "(&"SYSDB_UC")("SYSDB_LAST_LOGIN">=%lu))"
-#define SYSDB_NETGR_FILTER "(&("SYSDB_NC")("SYSDB_NAME"=%s))"
-#define SYSDB_NETGR_TRIPLES_FILTER "(|("SYSDB_NAME"=%s)("SYSDB_MEMBEROF"=%s))"
+#define SYSDB_NETGR_FILTER "(&("SYSDB_NC")(|("SYSDB_NAME_ALIAS"=%s)("SYSDB_NAME"=%s)))"
+#define SYSDB_NETGR_TRIPLES_FILTER "(|("SYSDB_NAME"=%s)("SYSDB_NAME_ALIAS"=%s)("SYSDB_MEMBEROF"=%s))"
#define SYSDB_HAS_ENUMERATED "has_enumerated"
diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 2a09c5b4..1ab94770 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -786,7 +786,8 @@ errno_t sysdb_getnetgr(TALLOC_CTX *mem_ctx,
lret = ldb_search(sysdb->ldb, tmp_ctx, &result, base_dn,
LDB_SCOPE_SUBTREE, attrs,
SYSDB_NETGR_TRIPLES_FILTER,
- sanitized_netgroup, netgroup_dn);
+ sanitized_netgroup, sanitized_netgroup,
+ netgroup_dn);
ret = sysdb_error_to_errno(lret);
if (ret != EOK) {
goto done;
@@ -832,6 +833,7 @@ int sysdb_get_netgroup_attr(TALLOC_CTX *mem_ctx,
ret = ldb_search(sysdb->ldb, tmp_ctx, &result, base_dn,
LDB_SCOPE_SUBTREE, attributes,
SYSDB_NETGR_FILTER,
+ sanitized_netgroup,
sanitized_netgroup);
if (ret) {
ret = sysdb_error_to_errno(ret);