diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-02 19:15:17 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-05-14 16:51:48 +0200 |
commit | cf2cc44d6293165379d6470b8bf6bb6a87d62b31 (patch) | |
tree | a58d3d2ca1b32308e96995ef33e59c6b4a1936fe /src/tests/sysdb-tests.c | |
parent | 4e3ff98739191aef3e305785076fd82104a552e4 (diff) | |
download | sssd-cf2cc44d6293165379d6470b8bf6bb6a87d62b31.tar.gz sssd-cf2cc44d6293165379d6470b8bf6bb6a87d62b31.tar.xz sssd-cf2cc44d6293165379d6470b8bf6bb6a87d62b31.zip |
SYSDB: return SYSDB_NAME from sysdb_initgroups
For the GetGroupsList function it would be handy to get the user names as
well with a single sysdb_initgroups() call. This patch adds SYSDB_NAME to
the default attribute list.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/tests/sysdb-tests.c')
-rw-r--r-- | src/tests/sysdb-tests.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index ffd11c523..3e4d5f7f0 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -1309,6 +1309,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)", |