Commit Graph

80 Commits

Author SHA1 Message Date
ru
655e7db87e Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
phantom
cfd8109bf3 Use correct macro for path name
PR:		docs/13218
2000-11-22 17:53:17 +00:00
ru
0957874304 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
nectar
4ded299256 Add nsswitch support. By creating an /etc/nsswitch.conf file, you can
configure FreeBSD so that various databases such as passwd and group can be
looked up using flat files, NIS, or Hesiod.

= Hesiod has been added to libc (see hesiod(3)).

= A library routine for parsing nsswitch.conf and invoking callback
  functions as specified has been added to libc (see nsdispatch(3)).

= The following C library functions have been modified to use nsdispatch:
    . getgrent, getgrnam, getgrgid
    . getpwent, getpwnam, getpwuid
    . getusershell
    . getaddrinfo
    . gethostbyname, gethostbyname2, gethostbyaddr
    . getnetbyname, getnetbyaddr
    . getipnodebyname, getipnodebyaddr, getnodebyname, getnodebyaddr

= host.conf has been removed from src/etc.  rc.network has been modified
  to warn that host.conf is no longer used at boot time.  In addition, if
  there is a host.conf but no nsswitch.conf, the latter is created at boot
  time from the former.

Obtained from:	NetBSD
2000-09-06 18:16:48 +00:00
sheldonh
95b98853f3 Use an MD5 checksum to test for file changes; the previous method
of using file mtimes could result in chpasss(1) erroneously
detecting that no changes were made for non-interactive edits.

PR:		4238
Reported by:	Jens Schweikhardt <schweikh@noc.dfn.de>
Submitted by:	Daniel Hagan <dhagan@cs.vt.edu>
2000-04-12 08:49:14 +00:00
sheldonh
c0e8952a50 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
sheldonh
d39e57413d Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
imp
4d755df4e9 Extra sanity checks in information from file edited by user. This
precludes using chfn, et al, to generate a divot in /etc.

Submitted by: Lukasz Luzar
Forgotten about for months by: imp
1999-12-21 19:30:09 +00:00
peter
96af418f42 Revert the libcrypt/libmd stuff back to how it was. This should not have
happened as it was working around problems elsewhere (ie: binutils/ld
not doing the right thing according to the ELF design).  libcrypt has
been adjusted to not need the runtime -lmd.  It's still not quite right
(ld is supposed to work damnit) but at least it doesn't impact all the
users of libcrypt in Marcel's cross-build model.
1999-12-18 13:55:17 +00:00
phantom
c4ed5e550d Document -e flag.
PR:		docs/14936
Submitted by:	Stephen J. Roznowski <sjr@home.com>
1999-12-17 14:43:33 +00:00
marcel
3239491159 Add libmd (or move it after libcrypt). We don't want the linker to be
smart because it will definitely get it wrong. This popped up during
cross-linking.
1999-12-16 10:55:45 +00:00
sheldonh
419e022a57 Replace the -q option to pwd_mkdb with a test for PW_SCAN_BIG_IDS in
the environment.  This allows big ID warnings to be suppressed for
vipw and chpass as well.

Since the environment variable test is only performed for callers
of pw_scan() that do not set pw_big_ids_warning, the test can still
be overriden.  Currently, chpass and pwd_mkdb are the only users
of pw_scan() and neither of them overrides the environment variable
test.
1999-12-02 16:39:15 +00:00
phantom
7a8df80f8a mdoc(7)'fy
Mostly submitted by: "Philippe Charnier" <charnier@xp11.frmug.org>
1999-11-18 16:04:53 +00:00
phantom
4b7034d789 mdoc(7)'fy 1999-10-30 15:12:25 +00:00
gallatin
cc930f166f fix a serious bug where, on alpha, due to a an int/long type mismatch,
the uid arg to use_yp() was getting clobbered by the call to my_yp_match().
This led to a problem where a NIS user could edit root's passwd information.
1999-10-20 15:20:00 +00:00
peter
6323ca50a4 Unifdef -DPASSWD_IGNORE_COMMENTS. This wasn't really optional and
we have enough pseudo-options already.
1999-09-06 17:30:03 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
chris
24ff4e8603 Fix a bunch of broken cross-references 1999-08-18 05:55:22 +00:00
sheldonh
d1624c460d Allow comments and blank lines as advertised in passwd(5).
PR:	12828
Submitted by:	Yasuhiro Fukuma <yasuf@big.or.jp>
1999-07-29 16:30:35 +00:00
imp
b8d073ef7a More egcs warning fixes:
o main returns int not void
	o use return 0 at end of main when needed
	o use braces to avoid potentially ambiguous else
	o don't default to type int
	o #ifdef 0 -> #if 0

Reviewed by: obrien and chuckr
1999-04-25 22:37:58 +00:00
wpaul
4ba8a558c9 Close PR #10264. Don't bail directly out of passwd/chpass in my_yp_match().
Instead, treat the inability to retrieve a record from the server as a
match failure and let things take its course.

Part of the problem here is that NIS _is_ turned on, however the master
server is actually not an NIS server: it's an NIS+ server. And the client
is bound to an NIS+ replica server that's running in YP compat mode.
The code which tries to figure out of the user is local or NIS gets
confused by this.
1999-03-01 16:11:13 +00:00
ghelmer
6b7db68bbc Change the prompt for the office location field from "Location:"
to "Office Location:" to disambiguate what is expected.  Add a note
to the man page to indicate that the office location and office phone
fields are concatenated and printed with the heading "Office:" by
finger(1).  Swap the order of the home and office phone fields in the
man page to match the order of the fields in the editor.

If any programs interact with chpass(1) and expect "Location:" instead
of "Office Location:" as the prompt, either this change will have to be
reverted or the other programs will have to be changed.

PR:		docs/7533
1999-02-23 02:41:26 +00:00
des
5e764fdd0e Ignore errors from chflags. This makes it possible to make installworld
with DESTDIR set to an NFS-mounted file system.
1999-02-14 13:56:15 +00:00
danny
5377d91075 Allow two digit years 1969-2068 1999-01-18 22:15:09 +00:00
bde
0768a086d9 Fixed disordering of cross references in previous commit. 1998-12-13 15:32:26 +00:00
dillon
74ec114a24 Add reference to login.conf(5) 1998-12-13 02:48:43 +00:00
dillon
434e2f8d6d PR: docs/9045
Update chpass(1) manual page.  Change the definition of the class
    field and also reorganize the field list to match that of the
    /etc/master.passwd file, to avoid confusion.
1998-12-13 02:47:00 +00:00
archie
b24c3efc8e Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
bde
bbe147c4bc Fixed printf format errors. Assume that uid_t's are representable as
unsigned longs.
1998-10-17 14:08:12 +00:00
bde
825d75c99d Fixed printf format errors. Assume that time_t's are representable as
longs.
1998-10-17 14:06:20 +00:00
obrien
04be6dc763 Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:06 +00:00
markm
070f3c5668 Bump up the E_SHELL constant after an extra field was added, thus making
this refer to the wrong data.
Submitted by:	axl@iafrica.com (Sheldon Hearn)
1998-09-03 17:32:22 +00:00
thepish
b483cc0548 Submitted by: Peter Hawkins <thepish@freebsd.org>
Document last mod (extended gcos)
1998-08-14 03:47:38 +00:00
thepish
45eec99ab2 Submitted by: Peter Hawkins <thepish@FreeBSD.org>
Add functionality for support for more than 4 subfields within gcos. chsh,
chpass etc did not parse beyond the 4th field previously and so truncated
gcos on updating the database.
1998-08-14 03:18:32 +00:00
steve
3d0fd8d3eb Correct the description of the last four fields.
PR:		6926
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-13 19:14:14 +00:00
bde
dc8537950a Fixed `make -j9' by putting generated headers in ${SRCS}. Removed bogus
dependencies of generated .c files on generated headers (these made
`make -JN' work provided `depend' was made first).  Sorted sources lists.
1998-04-26 16:31:14 +00:00
charnier
42512dd5ce Add rcsid. Correct -Wall warning. 1998-03-23 07:41:49 +00:00
bde
3d3fa47715 Removed extra (non-trailing) arg in a call to warnx(). 1997-12-18 15:27:43 +00:00
markm
04212e736f Quieten -Wall. 1997-09-28 08:46:12 +00:00
wosch
0d629ebede Add manpage links ypchpass.1, ypchfn.1, ypchsh.1 1997-09-13 12:21:25 +00:00
wpaul
4d7ee0414c Modify passwd and chpass to use new AF_LOCAL RPC interface instead of
old kludged-up 'yppasswd_comm' support.
1997-07-29 15:45:36 +00:00
charnier
b26aead557 Free a malloc'ed variable before exiting. Compute line number when parsing
input file, it helps finding errors.
Obtained from: OpenBSD.
1997-06-25 06:59:55 +00:00
wpaul
40220a5186 Fix for PR #3141: check for NULL before strdup()ing pw->pw_class.
(I'm not sure why this happens, though I suspect it may be because
the server is configured with only passwd maps instead of both passwd
and master.passwd maps. This is allowed, but I think in this case
pw_class is left NULL, hence the problem.)

Also applied similar patch to chpass/pw_yp.c just for paranoia's sake.
1997-03-29 20:29:12 +00:00
imp
cd84ece5fd compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
mpp
f0837da8d0 If an administrator somehow manages to break the hardlinks
on chpass & passwd and turn the links into individual files
with the schg flag set, make install will fail to install all
of the proper links.

Fixed by removing the schg flag on all of the links before installing.

Closes PR# 2040.

Submitted by:	 Ph. Charnier <charnier@xp11.frmug.org>
1997-02-26 05:31:52 +00:00
peter
aef78d145b Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
wosch
ab0d7e7c60 Sort cross references. 1997-01-15 23:25:55 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
peter
5f3ec649e4 pw_scan() was being used to convert a string into a struct passwd, with
an auto stack variable that was about to disappear.  It broke with some
nis passwd changes because of a gethostbyname() call that uses a fair bit
of stack..  This was a timebomb waiting to go off at any time and could
have been causing subtle corruption for a while.

AARGH!!

This is HIGHLY reccomended for 2.2 and presumably 2.1.6
1996-11-15 17:36:20 +00:00
wpaul
3c96e97ed5 Add a flag to allow the 'use NIS or local?' logic to tell when NIS is
enabled in /etc/master.passwd & friends. This allows the 'USER_YP_AND_LOCAL'
case to make a more sensible guess (if NIS is enabled, default to NIS,
otherwise default to local -- this is better than defaulting to NIS
all the time).
1996-10-23 14:43:39 +00:00