From owner-cvs-all Fri Jul 10 18:15:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA02777 for cvs-all-outgoing; Fri, 10 Jul 1998 18:15:08 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA02772 for ; Fri, 10 Jul 1998 18:15:03 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id LAA00069; Sat, 11 Jul 1998 11:14:56 +1000 Date: Sat, 11 Jul 1998 11:14:56 +1000 From: Bruce Evans Message-Id: <199807110114.LAA00069@godzilla.zeta.org.au> To: bde@zeta.org.au, ghelmer@scl.ameslab.gov Subject: Re: cvs commit: src/usr.bin/msgs msgs.c Cc: cvs-committers@FreeBSD.ORG, imp@village.org, roberto@keltia.freenix.fr Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >So, as I understand it now, the change > > seteuid(uid = getuid()); > setuid(uid); > >should be reverted to the original > > setuid(uid = getuid()); > >It seemed like an innocuous change. Thanks for catching this and educating >me. Well, it is innocuous, except it reduces portabilty (seteuid() isn't in POSIX.1). Here is an attempt at a portable version: uid = getuid(); (void)setuid(uid); (void)setuid(uid); I think this works under OpenBSD. It is obviously innocuous, but not obviously correct. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message