| Lines 95-101
          
      
      
        Link Here | 
        
          | 95 | 	int null, log; | 95 | 	int null, log; | 
        
          | 96 | 	int fd; | 96 | 	int fd; | 
        
          | 97 |  | 97 |  | 
          
            
              | 98 | 	fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL); | 98 | 	fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, S_IRWXU); | 
        
          | 99 | 	if (fd < 0) { | 99 | 	if (fd < 0) { | 
        
          | 100 | 		univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "pidfile %s exists, aborting...", pidfile); | 100 | 		univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "pidfile %s exists, aborting...", pidfile); | 
        
          | 101 | 		return 1; | 101 | 		return 1; | 
  
    | Lines 119-125
          
      
      
        Link Here | 
        
          | 119 | 	} | 119 | 	} | 
        
          | 120 | 	dup2(null, STDIN_FILENO); | 120 | 	dup2(null, STDIN_FILENO); | 
        
          | 121 | 	dup2(null, STDOUT_FILENO); | 121 | 	dup2(null, STDOUT_FILENO); | 
          
            
              | 122 | 	if ((log=open("/var/log/univention/listener.log", O_WRONLY | O_CREAT | O_APPEND)) == -1) | 122 | 	if ((log=open("/var/log/univention/listener.log", O_WRONLY | O_CREAT | O_APPEND, S_IRWXU)) == -1) | 
        
          | 123 | 		log=null; | 123 | 		log=null; | 
        
          | 124 | 	dup2(log, STDERR_FILENO); | 124 | 	dup2(log, STDERR_FILENO); | 
        
          | 125 | 	 | 125 | 	 |