]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Maintain the assumption that uids are long (as is done
authorJim Jagielski <jim@apache.org>
Fri, 31 Oct 2008 13:35:46 +0000 (13:35 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 31 Oct 2008 13:35:46 +0000 (13:35 +0000)
with other code sections), as well as be aware of
signs.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@709406 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/unix/mod_unixd.c

index bc5b52fe6860cbdae58bd5bafb52167d0b95239b..5d9ee5e054690570ab65a6060aa3f9e0d071baef 100644 (file)
@@ -84,13 +84,13 @@ static int set_group_privs(void)
 
         if (unixd_config.user_name[0] == '#') {
             struct passwd *ent;
-            uid_t uid = atoi(&unixd_config.user_name[1]);
+            uid_t uid = atol(&unixd_config.user_name[1]);
 
             if ((ent = getpwuid(uid)) == NULL) {
                 ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
-                         "getpwuid: couldn't determine user name from uid %u, "
+                         "getpwuid: couldn't determine user name from uid %ld, "
                          "you probably need to modify the User directive",
-                         (unsigned)uid);
+                         (long)uid);
                 return -1;
             }