summaryrefslogtreecommitdiffstats
path: root/src/tests/files-tests.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-04-19 16:11:47 -0400
committerJakub Hrozek <jhrozek@redhat.com>2014-04-28 21:57:01 +0200
commit9a592ee3fc195f20732c6b1f90894a0be25ccc19 (patch)
tree320d37f03789f3d938a51dae0aaec82c9ad5f9a4 /src/tests/files-tests.c
parent8e09148b68a3fd8b06fcb746054f3cfa250b40f8 (diff)
downloadsssd-9a592ee3fc195f20732c6b1f90894a0be25ccc19.tar.gz
sssd-9a592ee3fc195f20732c6b1f90894a0be25ccc19.tar.xz
sssd-9a592ee3fc195f20732c6b1f90894a0be25ccc19.zip
util: Change file check fns to use a mode mask
Instead of using a custom way to chck file type, use the system provided macros and a mode mask to decide when we want to check. Additionally a mask also allows us to selectively check permissions. Related: https://bugzilla.redhat.com/1089098 Resolves: https://fedorahosted.org/sssd/ticket/2321 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Pavel Reichl <preichl@redhat.com>
Diffstat (limited to 'src/tests/files-tests.c')
-rw-r--r--src/tests/files-tests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/files-tests.c b/src/tests/files-tests.c
index 2a0e7ce41..8b649e77f 100644
--- a/src/tests/files-tests.c
+++ b/src/tests/files-tests.c
@@ -192,7 +192,7 @@ START_TEST(test_simple_copy)
fail_unless(ret == 0, "destination directory not there\n");
tmp = talloc_asprintf(test_ctx, "%s/bar", dst_path);
- ret = check_and_open_readonly(tmp, &fd, uid, gid, 0700, CHECK_REG);
+ ret = check_and_open_readonly(tmp, &fd, uid, gid, S_IFREG|S_IRWXU, 0);
fail_unless(ret == EOK, "Cannot open %s\n");
close(fd);
talloc_free(tmp);