]> git.cameronkatri.com Git - pw-darwin.git/log
pw-darwin.git
24 years agoPrepare for mdoc(7)NG.
Ruslan Ermilov [Tue, 19 Dec 2000 16:00:12 +0000 (16:00 +0000)]
Prepare for mdoc(7)NG.

24 years agoMake the comment generated in /etc/pw.conf match reality
Doug Barton [Mon, 18 Dec 2000 01:35:56 +0000 (01:35 +0000)]
Make the comment generated in /etc/pw.conf match reality

PR: misc/23451
Submitted by: Ben Rosengart, ben@narcissus.net

24 years ago* Fix a long line that I introduced in the last commit
Doug Barton [Sun, 17 Dec 2000 23:42:45 +0000 (23:42 +0000)]
* Fix a long line that I introduced in the last commit
* Backslash escape non-alphanumeric chars in the login name so that perl
  doesn't choke on things like '$'.

24 years agomdoc(7) police: removed history info from the .Os FreeBSD call.
Ruslan Ermilov [Thu, 14 Dec 2000 11:52:05 +0000 (11:52 +0000)]
mdoc(7) police: removed history info from the .Os FreeBSD call.

24 years agoAdd `_PATH_DEVZERO'.
David E. O'Brien [Sat, 9 Dec 2000 09:35:55 +0000 (09:35 +0000)]
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.

24 years agoUse correct macro for path name
Alexey Zelkin [Wed, 22 Nov 2000 17:53:17 +0000 (17:53 +0000)]
Use correct macro for path name

PR: docs/13218

24 years agoIf a user is in the database, rmuser ought to be able to remove them.
Doug Barton [Tue, 21 Nov 2000 05:52:35 +0000 (05:52 +0000)]
If a user is in the database, rmuser ought to be able to remove them.
Address this by using getpwnam(), thus killing several birds with
the same stone. My fix is slightly more aggressive than the
originators. :)

PR: misc/22278

24 years agomdoc(7) police: use the new features of the Nm macro.
Ruslan Ermilov [Mon, 20 Nov 2000 20:10:44 +0000 (20:10 +0000)]
mdoc(7) police: use the new features of the Nm macro.

24 years agomdoc(7) police: use the new features of the Nm macro.
Ruslan Ermilov [Mon, 20 Nov 2000 19:21:22 +0000 (19:21 +0000)]
mdoc(7) police: use the new features of the Nm macro.

24 years agoAvoid use of direct troff requests in mdoc(7) manual pages.
Ruslan Ermilov [Fri, 10 Nov 2000 17:46:15 +0000 (17:46 +0000)]
Avoid use of direct troff requests in mdoc(7) manual pages.

24 years ago Added PROPERTY_MAX_VALUE and PROPERTY_MAX_NAME defines to libutil.h so
Murray Stokely [Wed, 8 Nov 2000 11:57:03 +0000 (11:57 +0000)]
  Added PROPERTY_MAX_VALUE and PROPERTY_MAX_NAME defines to libutil.h so
that applications know how large of a buffer they must allocate before
calling property_find().  Also added a $FreeBSD$ tag while I'm here.

Approved by: jkh

24 years agoFix problems people were having with large -O levels with GCC and
Brian Feldman [Fri, 27 Oct 2000 01:19:02 +0000 (01:19 +0000)]
Fix problems people were having with large -O levels with GCC and
getting libutil/libcrypt to work properly.  I've determined that GCC
thinks it can inline all functions, including weak-symboled ones, if
it feels like it.

Create a new stub.c and move any stubs there to prevent inlining.
Thanks to jdp and William S. Duncanson for helping me finally find the
problem.

24 years agoAdd nsswitch support. By creating an /etc/nsswitch.conf file, you can
Jacques Vidrine [Wed, 6 Sep 2000 18:16:48 +0000 (18:16 +0000)]
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

24 years agoConstify the arg to logout(3). It is const-safe.
Peter Wemm [Mon, 4 Sep 2000 08:13:49 +0000 (08:13 +0000)]
Constify the arg to logout(3).  It is const-safe.
(cosmetic: drop some "register" qualifications too.)

24 years agoMove setproctitle() from libutil to libc (after a repo-copy)
Brian Somers [Sat, 2 Sep 2000 01:51:36 +0000 (01:51 +0000)]
Move setproctitle() from libutil to libc (after a repo-copy)
and bump __FreeBSD_version to 500012 to mark the occasion.

setproctitle() is prototyped in unistd.h as opposed to stdlib.h
where OpenBSD and NetBSD have it.

Reviewed by: peter

24 years agoAdd weak symbol pragma for crypt_set_format().
Jeroen Ruigrok van der Werven [Wed, 23 Aug 2000 11:54:10 +0000 (11:54 +0000)]
Add weak symbol pragma for crypt_set_format().

Approved by: green

24 years agoStick login_setcryptfmt() in its own file to make pulling in of
Brian Feldman [Wed, 23 Aug 2000 03:45:57 +0000 (03:45 +0000)]
Stick login_setcryptfmt() in its own file to make pulling in of
-lcrypt only happen if truly necessary.

24 years agoAdd working and easy crypt(3)-switching. Yes, we need a whole new API
Brian Feldman [Tue, 22 Aug 2000 02:15:54 +0000 (02:15 +0000)]
Add working and easy crypt(3)-switching.  Yes, we need a whole new API
for crypt(3) by now.  In any case:

Add crypt_set_format(3) + documentation to -lcrypt.
Add login_setcryptfmt(3) + documentation to -lutil.
Support for switching crypt formats in passwd(8).
Support for switching crypt formats in pw(8).

The simple synopsis is:
edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :)

Reviewed by: peter

24 years agoComplete migration of aliases file to /etc/mail/aliases.
Gregory Neil Shapiro [Sun, 13 Aug 2000 18:38:58 +0000 (18:38 +0000)]
Complete migration of aliases file to /etc/mail/aliases.
The maintainers of share/examples/diskless/README.TEMPLATING and mergemaster
have been contacted so those may be updated as well.

24 years agoMove test for -w flag outside of the code dealing with -D (defaults).
David Nugent [Thu, 20 Jul 2000 05:11:56 +0000 (05:11 +0000)]
Move test for -w flag outside of the code dealing with -D (defaults).
This should cause -w's argument not to be ignored in the usermod case,
so it will affect modification of the user's password instead of using
the pw.conf (or internal default=no '*') password method.
PR: bin/11168

24 years agoAllow -g with an empty argument in the -D case. This allows -g "" to set
David Nugent [Thu, 20 Jul 2000 04:37:00 +0000 (04:37 +0000)]
Allow -g with an empty argument in the -D case. This allows -g "" to set
no default group (and thus fall back to user-based groups instead).
PR: bin/5717

24 years agoFix another missed case where usermod would not set the "modified" flag:
David Nugent [Thu, 20 Jul 2000 00:09:29 +0000 (00:09 +0000)]
Fix another missed case where usermod would not set the "modified" flag:
-h - to set no password. But only mark modified if the account is not
already locked (i.e. first char of crypt password field is '*').
PR: bin/19999

24 years agoCatch up to the fact that we now have tcsh in the tree.
David Nugent [Sun, 16 Jul 2000 01:46:26 +0000 (01:46 +0000)]
Catch up to the fact that we now have tcsh in the tree.

24 years agoSupport propogation of file flags when building a homedir from the
David Nugent [Thu, 13 Jul 2000 23:52:49 +0000 (23:52 +0000)]
Support propogation of file flags when building a homedir from the
skeleton directory.
sprintf() -> snprintf() cleanup.
PR: bin/8756
Submitted by: "Nickolay N. Dudorov" <nnd@itfs.nsk.su>

24 years agoDon't call warn() without a format string.
Kris Kennaway [Wed, 12 Jul 2000 00:50:15 +0000 (00:50 +0000)]
Don't call warn() without a format string.

24 years agoFix breakage introduced by bypassing update for additional 'mod'
David Nugent [Mon, 3 Jul 2000 12:13:10 +0000 (12:13 +0000)]
Fix breakage introduced by bypassing update for additional 'mod'
functionality when nothing had actually changed; -d changes would
not set the 'something had changed flag'. Actually test for a
change in homedir.
PR: bin/19649

24 years agoDon't dereference NULL in the userdel case.
David Nugent [Mon, 26 Jun 2000 01:11:44 +0000 (01:11 +0000)]
Don't dereference NULL in the userdel case.

24 years agoLocalize ctype too.
Andrey A. Chernov [Sat, 24 Jun 2000 13:36:13 +0000 (13:36 +0000)]
Localize ctype too.
Add weekday to showuser expired fields

24 years agoLocalize time/date.
Andrey A. Chernov [Thu, 22 Jun 2000 16:48:41 +0000 (16:48 +0000)]
Localize time/date.
Use ISO 8601 date in logs.
Fix wrong argument type in ctype functions.

24 years agoFix obvious braino in assignment statement. usermod -g should work again.
David Nugent [Sun, 18 Jun 2000 02:48:56 +0000 (02:48 +0000)]
Fix obvious braino in assignment statement. usermod -g should work again.
PR: 17877
Submitted by: pius@zyan.com

24 years agoBe a little more strict about handling command line args. This allows user and
David Nugent [Sun, 18 Jun 2000 02:39:17 +0000 (02:39 +0000)]
Be a little more strict about handling command line args. This allows user and
group names like 'help' 'mod' 'user' 'group' etc. to work correctly without
requiring the -n style invocation.
PR: misc/17069

24 years agoFix a long-standing bug in the rename case previously masked by another bug
David Nugent [Sun, 18 Jun 2000 02:18:15 +0000 (02:18 +0000)]
Fix a long-standing bug in the rename case previously masked by another bug
just fixed in .db file updating.

24 years agoSecond and hopefully final fix to .db sync when renaming a user; we must run
David Nugent [Sun, 18 Jun 2000 02:16:07 +0000 (02:16 +0000)]
Second and hopefully final fix to .db sync when renaming a user; we must run
a full reindex in this case to remove the old record. #ifdef -u capability
since this is available on FreeBSD only.
PR: bin/16418
Problem pointed out by: Masachika ISHIZUKA <ishizuka@ish.org>

24 years agoFix db syncronization when username is changed with -l under usermod.
David Nugent [Tue, 6 Jun 2000 07:33:00 +0000 (07:33 +0000)]
Fix db syncronization when username is changed with -l under usermod.
pw(8) was calling pwd_mkdb -u oldusername instead of newusername, so
the update appears to have failed until the next full pwd_mkdb
syncronization.

PR: bin/16418

24 years agoBack out the previous change to the queue(3) interface.
Jake Burkholder [Fri, 26 May 2000 02:09:24 +0000 (02:09 +0000)]
Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by: msmith and others

24 years agoChange the way that the queue(3) structures are declared; don't assume that
Jake Burkholder [Tue, 23 May 2000 20:41:01 +0000 (20:41 +0000)]
Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by: phk
Reviewed by: phk
Approved by: mdodd

24 years agoFix a memory leak with lc->lc_cap in login_close().
Tim Vanderhoek [Sun, 21 May 2000 02:50:36 +0000 (02:50 +0000)]
Fix a memory leak with lc->lc_cap in login_close().

PR: bin/17084

24 years agoUse an MD5 checksum to test for file changes; the previous method
Sheldon Hearn [Wed, 12 Apr 2000 08:49:14 +0000 (08:49 +0000)]
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>

24 years agoUn-botch my botched reduction in permitted characters in the permitted
Mark Newton [Tue, 14 Mar 2000 14:27:34 +0000 (14:27 +0000)]
Un-botch my botched reduction in permitted characters in the permitted
username check which resulted from my attempt to expand them.

PR: bin/17372
Reviewed by: sheldonh

24 years agoFix the case where username validity test would incorrectly fail if
Mark Newton [Tue, 14 Mar 2000 14:19:17 +0000 (14:19 +0000)]
Fix the case where username validity test would incorrectly fail if
the specified username contained uppercase alphabetics.

PR: bin/17372

24 years agoFix various unsigned vs signed errors that caused problems with uids
Paul Richards [Thu, 9 Mar 2000 18:11:16 +0000 (18:11 +0000)]
Fix various unsigned vs signed errors that caused problems with uids
and gids bigger than 16 bits. Added checks for uids and gids that are
bigger than 32 bits.

Approved by: jkh (partly, this fix is bigger than I first intended)

24 years agoRemove more single-space hard sentence breaks.
Sheldon Hearn [Mon, 6 Mar 2000 09:45:37 +0000 (09:45 +0000)]
Remove more single-space hard sentence breaks.

24 years agoRemove more single-space hard sentence breaks.
Sheldon Hearn [Thu, 2 Mar 2000 14:54:02 +0000 (14:54 +0000)]
Remove more single-space hard sentence breaks.

24 years agoRemove single-space hard sentence breaks. These degrade the quality
Sheldon Hearn [Wed, 1 Mar 2000 14:09:25 +0000 (14:09 +0000)]
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.

24 years agoRemove single-space hard sentence breaks. These degrade the quality
Sheldon Hearn [Wed, 1 Mar 2000 12:20:22 +0000 (12:20 +0000)]
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.

24 years agoUse a more conventional copyright message.
Peter Wemm [Wed, 26 Jan 2000 07:17:00 +0000 (07:17 +0000)]
Use a more conventional copyright message.

24 years agoseveral tcp apps IPv6 update
Yoshinobu Inoue [Tue, 25 Jan 2000 14:52:10 +0000 (14:52 +0000)]
several tcp apps IPv6 update
 -inetd
 -rshd
 -rlogind
 -telnetd
 -rsh
 -rlogin

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project

25 years agoPortability fixes for other bsd4.4 derivatives.
David Nugent [Sat, 15 Jan 2000 00:20:22 +0000 (00:20 +0000)]
Portability fixes for other bsd4.4 derivatives.

25 years agoConnect fparseln(3) for mailwrapper(8)
Peter Wemm [Wed, 29 Dec 1999 17:50:34 +0000 (17:50 +0000)]
Connect fparseln(3) for mailwrapper(8)

25 years agoExtra sanity checks in information from file edited by user. This
Warner Losh [Tue, 21 Dec 1999 19:30:09 +0000 (19:30 +0000)]
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

25 years agoRevert the libcrypt/libmd stuff back to how it was. This should not have
Peter Wemm [Sat, 18 Dec 1999 13:55:17 +0000 (13:55 +0000)]
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.

25 years agoDocument -e flag.
Alexey Zelkin [Fri, 17 Dec 1999 14:43:33 +0000 (14:43 +0000)]
Document -e flag.

PR: docs/14936
Submitted by: Stephen J. Roznowski <sjr@home.com>

25 years agoAdd libmd (or move it after libcrypt). We don't want the linker to be
Marcel Moolenaar [Thu, 16 Dec 1999 10:55:45 +0000 (10:55 +0000)]
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.

25 years agoReplace the -q option to pwd_mkdb with a test for PW_SCAN_BIG_IDS in
Sheldon Hearn [Thu, 2 Dec 1999 16:39:15 +0000 (16:39 +0000)]
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.

25 years agoAllow empty UIDs if we are processing NIS records. I am not entirely
Eivind Eklund [Mon, 22 Nov 1999 12:42:38 +0000 (12:42 +0000)]
Allow empty UIDs if we are processing NIS records.  I am not entirely
happy with how this end up and will re-visit the entire empty field
problem, but this patch solves the NIS problem for now.

Submitted by: Dan Nelson <dan@emsphone.com>
PR: 14865,14984

25 years agomdoc(7)'fy
Alexey Zelkin [Thu, 18 Nov 1999 16:04:53 +0000 (16:04 +0000)]
mdoc(7)'fy

Mostly submitted by: "Philippe Charnier" <charnier@xp11.frmug.org>

25 years agoAdd to pwd_mkdb a -q option to silence warnings about large IDs. Add a
Sheldon Hearn [Mon, 15 Nov 1999 16:45:37 +0000 (16:45 +0000)]
Add to pwd_mkdb a -q option to silence warnings about large IDs.  Add a
suitably ominous warning in the manual page.

The diff applied is not the one provided in the attributed PR.

PR: 13344
Reviewed by: bde

25 years agoFlag empty UID entries as errors (to stop typos from turning into
Eivind Eklund [Sat, 6 Nov 1999 20:21:04 +0000 (20:21 +0000)]
Flag empty UID entries as errors (to stop typos from turning into
alternate root accounts).

25 years agomdoc(7)'fy
Alexey Zelkin [Sat, 30 Oct 1999 15:12:25 +0000 (15:12 +0000)]
mdoc(7)'fy

25 years agoDon't try updating the passwd file if no data has changed. This allows things
David Nugent [Tue, 26 Oct 1999 15:07:20 +0000 (15:07 +0000)]
Don't try updating the passwd file if no data has changed. This allows things
like "pw usermod <name> -m" to work for non-local NIS users; since no attempt
is made to update the password entry, the home directory will be created and
populated as expected without error.

25 years agoAdd new functionality "lock" and "unlock" to provide a simple password
David Nugent [Tue, 26 Oct 1999 08:34:09 +0000 (08:34 +0000)]
Add new functionality "lock" and "unlock" to provide a simple password
locking mechanism for users. This works by prepending the string
"*LOCKED*" to the password field in master.passwd to prevent successful
decoding.

25 years agoMissed statement in password update relating to the previous change
David Nugent [Tue, 26 Oct 1999 08:30:20 +0000 (08:30 +0000)]
Missed statement in password update relating to the previous change
to fileupdate() which prevented pwd_mkdb(1) from being run.

25 years agoClean up error handling in fileupdate(), which now returns 0 on success
David Nugent [Tue, 26 Oct 1999 04:27:14 +0000 (04:27 +0000)]
Clean up error handling in fileupdate(), which now returns 0 on success
instead of a boolean. This replicated through he front-end sub-functions
relating to add, delete, modify entries in passwd & group files
Errno is now preserved so output of errc()/warnc() will be less obfuscated
by subsequent errors when reporting the problem.

Add more intelligent error handling when attempting to modify/delete NIS
entries with no corresponding local database entry.

[MFC to stable in a couple of weeks to keep both in sync]

25 years agofix a serious bug where, on alpha, due to a an int/long type mismatch,
Andrew Gallatin [Wed, 20 Oct 1999 15:20:00 +0000 (15:20 +0000)]
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.

25 years agoUnifdef -DPASSWD_IGNORE_COMMENTS. This wasn't really optional and
Peter Wemm [Mon, 6 Sep 1999 17:30:03 +0000 (17:30 +0000)]
Unifdef -DPASSWD_IGNORE_COMMENTS.  This wasn't really optional and
we have enough pseudo-options already.

25 years agoBack out previous commit. I mistook passing commentary from bde for
Sheldon Hearn [Tue, 31 Aug 1999 13:11:39 +0000 (13:11 +0000)]
Back out previous commit. I mistook passing commentary from bde for
review.

Requested by: bde

25 years agoOnly do a full pwd_mkdb for deletions; other operations may use the -u
Sheldon Hearn [Mon, 30 Aug 1999 10:35:38 +0000 (10:35 +0000)]
Only do a full pwd_mkdb for deletions; other operations may use the -u
option as an optimization.

PR: 13346
Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>

25 years agoOnly issue a warning for the first occurrence of a UID > USHRT_MAX and
Sheldon Hearn [Mon, 30 Aug 1999 09:55:42 +0000 (09:55 +0000)]
Only issue a warning for the first occurrence of a UID > USHRT_MAX and
the first occurrence of a GID > USHRT_MAX.

PR: 13344
Reviewed by: bde

25 years ago$Id$ -> $FreeBSD$
Peter Wemm [Sat, 28 Aug 1999 01:35:59 +0000 (01:35 +0000)]
$Id$ -> $FreeBSD$

25 years ago$Id$ -> $FreeBSD$
Peter Wemm [Sat, 28 Aug 1999 01:08:13 +0000 (01:08 +0000)]
$Id$ -> $FreeBSD$

25 years ago$Id$ -> $FreeBSD$
Peter Wemm [Sat, 28 Aug 1999 00:22:10 +0000 (00:22 +0000)]
$Id$ -> $FreeBSD$

25 years agoFix a bunch of broken cross-references
Chris Costello [Wed, 18 Aug 1999 05:55:22 +0000 (05:55 +0000)]
Fix a bunch of broken cross-references

25 years agoAllow comments and blank lines as advertised in passwd(5).
Sheldon Hearn [Thu, 29 Jul 1999 16:30:35 +0000 (16:30 +0000)]
Allow comments and blank lines as advertised in passwd(5).

PR: 12828
Submitted by: Yasuhiro Fukuma <yasuf@big.or.jp>

25 years agoRemove some more warnings.
David Nugent [Wed, 28 Jul 1999 12:49:34 +0000 (12:49 +0000)]
Remove some more warnings.

25 years agoRemove references to the non-existent addgroup(8) and rmgroup(8)
Nik Clayton [Tue, 27 Jul 1999 18:22:18 +0000 (18:22 +0000)]
Remove references to the non-existent addgroup(8) and rmgroup(8)
commands.

PR:             docs/12659
Submitted by:   Mark Diekhans <markd@Grizzly.COM>

25 years agoGrammar and spelling fixes
Kris Kennaway [Wed, 30 Jun 1999 12:49:56 +0000 (12:49 +0000)]
Grammar and spelling fixes

Obtained from: OpenBSD

25 years agoMove call to umask(0) back into pw_util(), because the latter
Pierre Beyssac [Tue, 29 Jun 1999 01:04:10 +0000 (01:04 +0000)]
Move call to umask(0) back into pw_util(), because the latter
function is also used by chpass(1) and passwd(1).

25 years agoForce umask to 077 (instead of 000) during the edit phase, to get
Pierre Beyssac [Sat, 26 Jun 1999 12:15:39 +0000 (12:15 +0000)]
Force umask to 077 (instead of 000) during the edit phase, to get
secure permissions in case the user attempts to save something to
a file of his own.

Move umask stuff out of pw_init() into main() for better visibility
of overall umask tweaking logic.

PR: misc/11797

25 years agoAdd -d option to vipw(8) to allow selection of an alternative directory
Sheldon Hearn [Sat, 26 Jun 1999 07:16:42 +0000 (07:16 +0000)]
Add -d option to vipw(8) to allow selection of an alternative directory
for the password files.

PR: 2703
Submitted by: jmg

25 years agoMore egcs warning fixes:
Warner Losh [Sun, 25 Apr 1999 22:37:58 +0000 (22:37 +0000)]
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

25 years agooops, add pwd!=NULL check to previous fix
Andrey A. Chernov [Sat, 24 Apr 1999 17:17:42 +0000 (17:17 +0000)]
oops, add pwd!=NULL check to previous fix

25 years agoSwitch to user UID/GID before checking/reading its ~/.login_conf
Andrey A. Chernov [Sat, 24 Apr 1999 17:01:58 +0000 (17:01 +0000)]
Switch to user UID/GID before checking/reading its ~/.login_conf
- some NFSes have root read access disabled

25 years agoAdd realhostname() - a function to correctly lookup
Brian Somers [Tue, 6 Apr 1999 23:02:35 +0000 (23:02 +0000)]
Add realhostname() - a function to correctly lookup
a name by address and ensure that the name resolves
back to the original address.

25 years agoFix date parsing to allow '0' (none) date value.
David Nugent [Mon, 15 Mar 1999 08:16:01 +0000 (08:16 +0000)]
Fix date parsing to allow '0' (none) date value.

25 years agoAdd the ability to print user records in unix version 7 (old) format.
David Nugent [Tue, 2 Mar 1999 00:53:33 +0000 (00:53 +0000)]
Add the ability to print user records in unix version 7 (old) format.

25 years agoClose PR #10264. Don't bail directly out of passwd/chpass in my_yp_match().
Bill Paul [Mon, 1 Mar 1999 16:11:13 +0000 (16:11 +0000)]
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.

25 years agoFix minor nit with command line parsing for pw -V DIR action.
David Nugent [Tue, 23 Feb 1999 11:01:50 +0000 (11:01 +0000)]
Fix minor nit with command line parsing for pw -V DIR action.

25 years agoFix tpyo (sic) and missing 'else' (bad cut n' paste).
David Nugent [Tue, 23 Feb 1999 10:35:47 +0000 (10:35 +0000)]
Fix tpyo (sic) and missing 'else' (bad cut n' paste).

25 years ago1) Do not blindly ignore file update errors which may occur due to concurrent
David Nugent [Tue, 23 Feb 1999 07:15:11 +0000 (07:15 +0000)]
1) Do not blindly ignore file update errors which may occur due to concurrent
   updating
2) Add -V <etcdir>, which allows maintaining user/group database in alternate
   locations other than /etc.

25 years agoChange the prompt for the office location field from "Location:"
Guy Helmer [Tue, 23 Feb 1999 02:41:26 +0000 (02:41 +0000)]
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

25 years agoIgnore errors from chflags. This makes it possible to make installworld
Dag-Erling Smørgrav [Sun, 14 Feb 1999 13:56:15 +0000 (13:56 +0000)]
Ignore errors from chflags. This makes it possible to make installworld
with DESTDIR set to an NFS-mounted file system.

25 years agoAdded myself as maintainer.
Wolfram Schneider [Tue, 9 Feb 1999 17:23:03 +0000 (17:23 +0000)]
Added myself as maintainer.

25 years agoDon't assume a_name is a number just because the first character
Dag-Erling Smørgrav [Mon, 8 Feb 1999 21:26:44 +0000 (21:26 +0000)]
Don't assume a_name is a number just because the first character
is a digit.

PR: bin/9484
Submitted by: Matthew D. Fuller <fullermd@futuresouth.com>

26 years agoAllow two digit years 1969-2068
Daniel O'Callaghan [Mon, 18 Jan 1999 22:15:09 +0000 (22:15 +0000)]
Allow two digit years 1969-2068

26 years agoPrint yyyy/mm/dd in /var/log/adduser, instead of yy/mm/dd
Daniel O'Callaghan [Fri, 15 Jan 1999 10:26:59 +0000 (10:26 +0000)]
Print yyyy/mm/dd in /var/log/adduser, instead of yy/mm/dd
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>

26 years agoRemove bogus file locking in main().
David Nugent [Fri, 8 Jan 1999 10:52:38 +0000 (10:52 +0000)]
Remove bogus file locking in main().

26 years ago-Clarification of last commit-
Bill Fumerola [Mon, 4 Jan 1999 14:07:53 +0000 (14:07 +0000)]
-Clarification of last commit-
The char that the random letters and numbers are being pulled from is
ended with a '\0'. Using sizeof() includes this '\0' in the 'pool' of
possible characters. This patch decrements by one the size so we don't
accidently end the new password prematurly.

26 years agoLet's make sure we're at the end of the password string before we apply a \0
Bill Fumerola [Sat, 2 Jan 1999 04:37:46 +0000 (04:37 +0000)]
Let's make sure we're at the end of the password string before we apply a \0
and terminate it. This patch ensures passwords will be the correct length of 8,
which is what is implied in the source (but not reflected in the man page).

PR: bin/7817
Reviewed by: Alfred Perlstein <bright@hotjobs.com>
Submitted by: Hiroshi Nishikawa <nis@pluto.dti.ne.jp>

26 years agoFix the spelling of `FreeBSD'.
Joerg Wunsch [Sun, 27 Dec 1998 12:01:07 +0000 (12:01 +0000)]
Fix the spelling of `FreeBSD'.

Submitted by: Peter Philipp <pjp@bsd-daemon.net>

26 years agoDeclare setproctitle() as printf0-like.
Bruce Evans [Wed, 16 Dec 1998 17:52:15 +0000 (17:52 +0000)]
Declare setproctitle() as printf0-like.