From owner-freebsd-current Wed Aug 9 15:36:23 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id PAA00436 for current-outgoing; Wed, 9 Aug 1995 15:36:23 -0700 Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id PAA00430 for ; Wed, 9 Aug 1995 15:36:19 -0700 Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.11/8.6.9) id SAA26473; Wed, 9 Aug 1995 18:34:49 -0400 From: A boy and his worm gear Message-Id: <199508092234.SAA26473@skynet.ctr.columbia.edu> Subject: Re: proposed change to chpass(1) To: wollman@halloran-eldar.lcs.mit.edu (Garrett Wollman) Date: Wed, 9 Aug 1995 18:34:46 -0400 (EDT) Cc: freebsd-current@freebsd.org, wpaul@skynet.ctr.columbia.edu (A boy and his worm gear) In-Reply-To: <9508091823.AA04636@halloran-eldar.lcs.mit.edu> from "Garrett Wollman" at Aug 9, 95 02:23:49 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1739 Sender: current-owner@freebsd.org Precedence: bulk Of all the gin joints in all the world, Garrett Wollman had to walk into mine and say: > < said: > > > As near as I can tell from the code, this is intended behavior, > > though it's not documented in the man page. > > I think it's fairly clear from the letter chosen: [snip] Okay: apparently I read the man page, but I didn't really _read_ the man page. I suppose I asked for that. :) How about this then: *** pw_copy.c.orig Wed Aug 9 13:46:59 1995 --- pw_copy.c Wed Aug 9 18:19:10 1995 *************** *** 96,101 **** --- 96,108 ---- goto err; } if (!done) + #ifndef TOO_LENIENT_FOR_OUR_OWN_GOOD + if (getuid()) { + warnx("%s: not found in %s -- permission denied", + pw->pw_name, _PATH_MASTERPASSWD); + pw_error(NULL, 0, 1); + } else + #endif (void)fprintf(to, "%s:%s:%d:%d:%s:%ld:%ld:%s:%s:%s\n", pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, pw->pw_change, pw->pw_expire, pw->pw_gecos, This should still let the superuser use the -a flag while preventing things from getting confused when NIS is enabled. Am I getting warmer? -Bill -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Bill Paul (212) 854-6020 | System Manager Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Møøse Illuminati: ignore it and be confused, or join it and be confusing! ~~~~~~ "Welcome to All Things BSDish! If it's not BSDish, it's crap!" ~~~~~~~