summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/tests/sysdb-tests.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 5bd2c50eb..aad641dca 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -195,6 +195,7 @@
SYSDB_DEFAULT_ATTRS, \
SYSDB_ORIG_DN, \
SYSDB_SID_STR, \
+ SYSDB_NAME, \
NULL}
#define SYSDB_TMPL_USER SYSDB_NAME"=%s,"SYSDB_TMPL_USER_BASE
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index b3baa37e2..34ed4696b 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -1330,6 +1330,11 @@ START_TEST (test_sysdb_initgroups)
"Did not find the expected UID (found %d expected %d)",
uid, _i);
+ fail_unless(strcmp(ldb_msg_find_attr_as_string(user, SYSDB_NAME, NULL),
+ username) == 0,
+ "Wrong username\n");
+
+
gid = ldb_msg_find_attr_as_uint(group, SYSDB_GIDNUM, 0);
fail_unless(gid == _i + 1000,
"Did not find the expected GID (found %d expected %d)",