Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2002 23:59:42 -0700 (PDT)
From:      Juan Salaverria <rael@vectorstar.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/42980: devel/distcc: distccd can't be started by users with gid 0
Message-ID:  <200209200659.g8K6xgxF012412@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         42980
>Category:       ports
>Synopsis:       devel/distcc: distccd can't be started by users with gid 0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 20 00:00:18 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Juan Salaverria
>Release:        4.6.2-RELEASE
>Organization:
>Environment:
FreeBSD arokh.trantor.org 4.6.2-RELEASE 
FreeBSD 4.6.2-RELEASE #0: Thu Sep  5 23:15:21 ART 2002
rael@arokh.trantor.org:/usr/src/sys/compile/GENERIC_SND  i386     
>Description:
According to the documentation the daemon cannot be started by a root user for security reasons. In the sources this is accomplished by refusing to run distccd from a user with uid=0 and gid=0. In Linux the gid 0 belongs to the root group, but in FreeBSD this is the gid of the wheel group.

>How-To-Repeat:
Run distccd from any user with default login group 0
>Fix:
--- src/daemon.c.ori    Thu Aug 15 10:52:41 2002
+++ src/daemon.c        Sun Sep 15 15:33:59 2002
@@ -169,7 +169,7 @@
 int dcc_refuse_root(void)
 {
     /* Just be careful */
-    if (getuid() == 0  ||  geteuid() == 0  ||  getgid() == 0 || getegid() == 0) {
+    if (getuid() == 0  ||  geteuid() == 0) {
         rs_log_crit("distccd must not be run as root!");
         return EXIT_DISTCC_FAILED;
     }


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209200659.g8K6xgxF012412>