From owner-freebsd-security Sun Nov 17 19:12:57 1996 Return-Path: owner-security Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA04412 for security-outgoing; Sun, 17 Nov 1996 19:12:57 -0800 (PST) Received: from postoffice.cso.uiuc.edu (postoffice.cso.uiuc.edu [128.174.5.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id TAA04398; Sun, 17 Nov 1996 19:12:49 -0800 (PST) Received: from alecto.physics.uiuc.edu (alecto.physics.uiuc.edu [128.174.83.167]) by postoffice.cso.uiuc.edu (8.6.12/8.6.12) with ESMTP id VAA147960; Sun, 17 Nov 1996 21:12:47 -0600 Received: by alecto.physics.uiuc.edu (940816.SGI.8.6.9/940406.SGI) id VAA27437; Sun, 17 Nov 1996 21:12:33 -0600 From: igor@alecto.physics.uiuc.edu (Igor Roshchin) Message-Id: <199611180312.VAA27437@alecto.physics.uiuc.edu> Subject: Re: New sendmail bug... To: roberto@keltia.freenix.fr (Ollivier Robert), eric@sendmail.org Date: Sun, 17 Nov 1996 21:12:33 -0600 (CST) Cc: freebsd-security@FreeBSD.org, freebsd-hackers@FreeBSD.org In-Reply-To: from "Ollivier Robert" at Nov 17, 96 12:58:53 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-security@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Hello! May be I am missing something, but I was not able to compile the patched version of the sendmail 8.7.6.4, as it appears in FreeBSD distribution (sup.freebsd.org). main.o: Undefined symbol `_vendor_daemon_setup' referenced from text segment *** Error code 1 Is it a problem due to the version of FreeBSD ? I tried it on 2.1.5-stable and 2.1.5-release; - results were the same. Thanks in advance for your suggestions. IgoR > > ------- main.c ------- > *** - Wed Dec 31 16:00:00 1969 > --- main.c Sat Nov 16 07:07:17 1996 > *************** > *** 493,507 **** > { > case MD_DAEMON: > case MD_FGDAEMON: > ! # ifdef DAEMON > ! if (RealUid != 0) > ! { > ! usrerr("Permission denied"); > ! exit(EX_USAGE); > ! } > ! vendor_daemon_setup(CurEnv); > ! /* fall through ... */ > ! # else > usrerr("Daemon mode not implemented"); > ExitStat = EX_USAGE; > break; > --- 493,499 ---- > { > case MD_DAEMON: > case MD_FGDAEMON: > ! # ifndef DAEMON > usrerr("Daemon mode not implemented"); > ExitStat = EX_USAGE; > break; > *************** > *** 899,904 **** > --- 891,904 ---- > /* fall through ... */ > > case MD_DAEMON: > + /* check for permissions */ > + if (RealUid != 0) > + { > + usrerr("Permission denied"); > + exit(EX_USAGE); > + } > + vendor_daemon_setup(CurEnv); > + > /* remove things that don't make sense in daemon mode */ > FullName = NULL; > GrabTo = FALSE; > *************** > *** 1932,1937 **** > --- 1932,1946 ---- > syslog(LOG_INFO, "restarting %s on signal", SaveArgv[0]); > #endif > releasesignal(SIGHUP); > + if (setuid(RealUid) < 0 || setgid(RealGid) < 0) > + { > + #ifdef LOG > + if (LogLevel > 0) > + syslog(LOG_ALERT, "could not set[ug]id(%d, %d): %m", > + RealUid, RealGid); > + #endif > + exit(EX_OSERR); > + } > execv(SaveArgv[0], (ARGV_T) SaveArgv); > #ifdef LOG > if (LogLevel > 0) > >