From 9a592ee3fc195f20732c6b1f90894a0be25ccc19 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 19 Apr 2014 16:11:47 -0400 Subject: 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 Reviewed-by: Pavel Reichl --- src/monitor/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/monitor') 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); -- cgit