Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Aug 1995 18:34:46 -0400 (EDT)
From:      A boy and his worm gear <wpaul@skynet.ctr.columbia.edu>
To:        wollman@halloran-eldar.lcs.mit.edu (Garrett Wollman)
Cc:        freebsd-current@freebsd.org, wpaul@skynet.ctr.columbia.edu (A boy and his worm gear)
Subject:   Re: proposed change to chpass(1)
Message-ID:  <199508092234.SAA26473@skynet.ctr.columbia.edu>
In-Reply-To: <9508091823.AA04636@halloran-eldar.lcs.mit.edu> from "Garrett Wollman" at Aug 9, 95 02:23:49 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the world, Garrett Wollman had to walk
into mine and say:
 
> <<On Wed, 9 Aug 1995 14:03:44 -0400 (EDT), A boy and his worm gear <wpaul@skynet.ctr.columbia.edu> 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!" ~~~~~~~



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