diff options
author | Simo Sorce <simo@redhat.com> | 2014-04-19 16:11:47 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-04-28 21:57:01 +0200 |
commit | 9a592ee3fc195f20732c6b1f90894a0be25ccc19 (patch) | |
tree | 320d37f03789f3d938a51dae0aaec82c9ad5f9a4 /src/monitor | |
parent | 8e09148b68a3fd8b06fcb746054f3cfa250b40f8 (diff) | |
download | sssd-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/monitor')
-rw-r--r-- | src/monitor/monitor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 845968dff..85655de75 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2775,7 +2775,8 @@ int main(int argc, const char *argv[]) #endif /* Warn if nscd seems to be running */ - ret = check_file(NSCD_SOCKET_PATH, -1, -1, -1, CHECK_SOCK, NULL, false); + ret = check_file(NSCD_SOCKET_PATH, + -1, -1, S_IFSOCK, S_IFMT, NULL, false); if (ret == EOK) { ret = sss_nscd_parse_conf(NSCD_CONF_PATH); |