--- univention-directory-listener.orig/src/main.c 2011-12-23 01:42:45.000000000 +0100 +++ univention-directory-listener/src/main.c 2011-12-23 01:41:59.000000000 +0100 @@ -95,7 +95,7 @@ int null, log; int fd; - fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL); + fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, S_IRWXU); if (fd < 0) { univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "pidfile %s exists, aborting...", pidfile); return 1; @@ -119,7 +119,7 @@ } dup2(null, STDIN_FILENO); dup2(null, STDOUT_FILENO); - if ((log=open("/var/log/univention/listener.log", O_WRONLY | O_CREAT | O_APPEND)) == -1) + if ((log=open("/var/log/univention/listener.log", O_WRONLY | O_CREAT | O_APPEND, S_IRWXU)) == -1) log=null; dup2(log, STDERR_FILENO);