[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-committers
Subject:    [ProFTPD-committers] CVS: proftpd/src main.c,1.399,1.400
From:       "TJ Saunders" <castaglia () users ! sourceforge ! net>
Date:       2010-04-28 15:58:39
Message-ID: E1O79ep-0004wa-6I () sfp-cvsdas-2 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Update of /cvsroot/proftp/proftpd/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18987/src

Modified Files:
	main.c 
Log Message:

Stylistic changes; no functional changes.


Index: main.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/src/main.c,v
retrieving revision 1.399
retrieving revision 1.400
diff -u -r1.399 -r1.400
--- main.c	14 Apr 2010 15:53:22 -0000	1.399
+++ main.c	28 Apr 2010 15:58:36 -0000	1.400
@@ -3141,19 +3141,23 @@
     daemon_gids = make_array(permanent_pool, 2, sizeof(gid_t));
 
     if (pr_auth_getgroups(permanent_pool, (const char *) get_param_ptr(
-        main_server->conf, "UserName", FALSE), &daemon_gids, NULL) < 0)
+        main_server->conf, "UserName", FALSE), &daemon_gids, NULL) < 0) {
       pr_log_debug(DEBUG2, "unable to retrieve daemon supplemental groups");
+    }
 
-    if (set_groups(permanent_pool, daemon_gid, daemon_gids) < 0)
+    if (set_groups(permanent_pool, daemon_gid, daemon_gids) < 0) {
       pr_log_pri(PR_LOG_ERR, "unable to set daemon groups: %s",
         strerror(errno));
+    }
   }
 
-   if ((main_umask = (mode_t *) get_param_ptr(main_server->conf, "Umask",
-       FALSE)) == NULL)
-     umask((mode_t) 0022);
-   else
-     umask(*main_umask);
+  main_umask = get_param_ptr(main_server->conf, "Umask", FALSE);
+  if (main_umask == NULL) {
+    umask((mode_t) 0022);
+
+  } else {
+    umask(*main_umask);
+  }
 
   /* Give up root and save our uid/gid for later use (if supported)
    * If we aren't currently root, PRIVS_SETUP will get rid of setuid
@@ -3169,13 +3173,13 @@
 
   if (geteuid() != daemon_uid) {
     pr_log_pri(PR_LOG_ERR, "unable to set uid to %lu, current uid: %lu",
-		    (unsigned long)daemon_uid,(unsigned long)geteuid());
+      (unsigned long) daemon_uid, (unsigned long) geteuid());
     exit(1);
   }
 
   if (getegid() != daemon_gid) {
     pr_log_pri(PR_LOG_ERR, "unable to set gid to %lu, current gid: %lu",
-		    (unsigned long)daemon_gid,(unsigned long)getegid());
+      (unsigned long) daemon_gid, (unsigned long) getegid());
     exit(1);
   }
 #endif /* PR_DEVEL_COREDUMP */


------------------------------------------------------------------------------
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic