diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2013-11-25 13:43:30 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-11-28 10:39:06 +0100 |
commit | e167b504d0cb3f3e69c9f556fe7dfabacd6bb694 (patch) | |
tree | ebb974a95f5ad892a9330703d335b69179de8bf8 /src/tests/sysdb-tests.c | |
parent | f74d7744f1b12fe0492eadfc8cf30afcb4092e40 (diff) | |
download | sssd-e167b504d0cb3f3e69c9f556fe7dfabacd6bb694.tar.gz sssd-e167b504d0cb3f3e69c9f556fe7dfabacd6bb694.tar.xz sssd-e167b504d0cb3f3e69c9f556fe7dfabacd6bb694.zip |
SYSDB: Sanitize filter before sysdb_search_groups
sysdb_delete_user fails with EIO if user does not exist and contains
backslashes.
ldb could not parse filter (&(objectclass=group)(ghost=usr\\\\001)),
because ghost value was not sanitized
Resolves:
https://fedorahosted.org/sssd/ticket/2163
Diffstat (limited to 'src/tests/sysdb-tests.c')
-rw-r--r-- | src/tests/sysdb-tests.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index f7e0638b5..9880ba0c7 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -3916,6 +3916,10 @@ START_TEST(test_odd_characters) fail_unless(ret == EOK, "sysdb_delete_user error [%d][%s]", ret, strerror(ret)); + /* Delete non existing User */ + ret = sysdb_delete_user(test_ctx->domain, odd_username, 10000); + fail_unless(ret == ENOENT, "sysdb_delete_user error [%d][%s]", + ret, strerror(ret)); /* Delete Group */ ret = sysdb_delete_group(test_ctx->domain, odd_groupname, 20000); |