]> git.cameronkatri.com Git - pw-darwin.git/log
pw-darwin.git
16 years agoUse arc4random_uniform() to avoid "modulo bias"
Andrey A. Chernov [Sat, 16 Aug 2008 15:41:03 +0000 (15:41 +0000)]
Use arc4random_uniform() to avoid "modulo bias"

Remove pw_getrand() unneded now: arc4random_uniform() is stronger then
pw_getrand()'s MD5 tricks (inactive) and its active version, mixing
arc4random() bytes in one, not make things better at all.

16 years agoThe original adduser/rmuser scripts in Perl used to modify the PATH
John Baldwin [Wed, 30 Jul 2008 18:37:21 +0000 (18:37 +0000)]
The original adduser/rmuser scripts in Perl used to modify the PATH
setting.  When the scripts were converted to Bourne shell, this was
removed.  The adduser script was changed to use an explicit path for
the pw(8) command so that /usr/sbin did not have to be in the user's
PATH.  The rmuser script continued to assume that /usr/sbin was in the
user's path, however.  This fixes the rmuser script to use an explicit
path for pw(8) similar to adduser.

MFC after: 2 weeks

16 years agoAdd support for a new login capability, cpumask which allows login
Brooks Davis [Fri, 25 Jul 2008 19:58:14 +0000 (19:58 +0000)]
Add support for a new login capability, cpumask which allows login
sessions to be pinned to cpus by login class.

16 years agoBefore updating the password database, the pw(8) utility first performs a
John Baldwin [Thu, 17 Jul 2008 13:47:59 +0000 (13:47 +0000)]
Before updating the password database, the pw(8) utility first performs a
sanity check by invoking "pwd_mkdb -C".  However, if this failed it
silently returned success.  Fix this so it fails the update operation
instead.

MFC after: 1 week

16 years agoMerge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing
John Baldwin [Tue, 1 Jul 2008 22:30:57 +0000 (22:30 +0000)]
Merge hexdump(9) to userland as hexdump(3) in libutil.  I'm tired of doing
this by hand in userland utilities.

MFC after: 1 month

16 years ago- Increase the size of the salt in pw(8) from 8 to 32 (same as in pam_unix(8)).
Antoine Brodin [Tue, 27 May 2008 19:04:31 +0000 (19:04 +0000)]
- Increase the size of the salt in pw(8) from 8 to 32 (same as in pam_unix(8)).
 This makes blowfish password hashes look normal when set using
pw(8)/adduser(8). [1]
- Make it possible to have a '/' in the salt.

PR: 121146 [1]
Submitted by: Jaakko Heinonen [1]
Approved by: rwatson (mentor)
MFC after: 1 month

16 years agoAdd four utility functions related to struct grp processing modeled in-part
Sean Farley [Wed, 23 Apr 2008 00:49:13 +0000 (00:49 +0000)]
Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
  - gr_equal()
    Perform a deep comparison of two struct grp's.  It does a thorough, yet
    unoptimized comparison of all the members regardless of order.

  - gr_make()
    Create a string (see group(5)) from a struct grp.

  - gr_dup()
    Duplicate a struct grp.  Returns a value that is a single contiguous
    block of memory.

  - gr_scan()
    Create a struct grp from a string (as produced by gr_make()).

MFC after: 3 weeks

16 years agoIn the description of the password field, -w was meant, not the
Christian Brueffer [Sun, 16 Mar 2008 21:36:05 +0000 (21:36 +0000)]
In the description of the password field, -w was meant, not the
nonexistant -p flag.

PR: 120122
Submitted by: Andy Kosela <andy.kosela@gmail.com>
MFC after: 3 days

16 years agoAdd the groupmod '-d' option to pw to allow the deletion of existing users
Sean Farley [Sat, 23 Feb 2008 01:25:22 +0000 (01:25 +0000)]
Add the groupmod '-d' option to pw to allow the deletion of existing users
from a group without the need to perform the same operation by replacing
the existing list via the '-M' option.  The '-M' option requires someone
to fetch the existing members with pw, deleting the undesired members from
the list and sending the altered list back to pw.

Approved by: wes (mentor)
MFC after: 5 days

16 years agostyle(9) (verified no object changes)
Sean Farley [Sat, 23 Feb 2008 01:17:42 +0000 (01:17 +0000)]
style(9) (verified no object changes)

Approved by: wes (mentor)
MFC after: 5 days

17 years agoAdd the -M command-line option, which will set home directory permissions.
Mike Makonnen [Sun, 27 Jan 2008 10:15:36 +0000 (10:15 +0000)]
Add the -M command-line option, which will set home directory permissions.
Works both in interactive or batch mode. This is a heavily modified version
of the patch submitted in the PR.

PR: bin/105060
MFC after: 1 week

17 years agoClarify in what formats the grouplist for the '-G' switch may be accepted.
Mike Makonnen [Fri, 25 Jan 2008 15:54:14 +0000 (15:54 +0000)]
Clarify in what formats the grouplist for the '-G' switch may be accepted.

Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>

17 years agoConstify the first argument to expand_number() so that it can
John Birrell [Sun, 18 Nov 2007 02:20:02 +0000 (02:20 +0000)]
Constify the first argument to expand_number() so that it can
be called with a const without the compiler grisling.

17 years agoAllow adding a user(s) to additional groups in batch mode as well.
Mike Makonnen [Sat, 20 Oct 2007 00:45:31 +0000 (00:45 +0000)]
Allow adding a user(s) to additional groups in batch mode as well.

Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> (modulo minor changes)
MFC after: 2 weeks

17 years agoThe POP daemon's temporary mail file has a leading dot ('.'). This was
Mike Makonnen [Fri, 19 Oct 2007 07:18:56 +0000 (07:18 +0000)]
The POP daemon's temporary mail file has a leading dot ('.'). This was
lost in the shell script rewrite of the rmuser command.

Submitted by: Ian Smith <smithi@nimnet.asn.au>

17 years agoImplement expand_number(3), which is the opposite of humanize_number(3), ie.
Pawel Jakub Dawidek [Sat, 1 Sep 2007 06:19:11 +0000 (06:19 +0000)]
Implement expand_number(3), which is the opposite of humanize_number(3), ie.
a number in human-readable form is converted to int64_t, for example:
123b -> 123
10k -> 10240
16G -> 17179869184

First version submitted by: Eric Anderson <anderson@freebsd.org>
Approved by: re (bmah)

17 years agoBack out previous commit until I figure out why my regression test fails.
Dag-Erling Smørgrav [Fri, 3 Aug 2007 09:20:28 +0000 (09:20 +0000)]
Back out previous commit until I figure out why my regression test fails.

Approved by: re (kensmith)

17 years agoUse fcntl(2)-style locks instead of less-portable flock(2)-style locks.
Dag-Erling Smørgrav [Fri, 3 Aug 2007 06:32:45 +0000 (06:32 +0000)]
Use fcntl(2)-style locks instead of less-portable flock(2)-style locks.

Approved by: re (kensmith)

17 years agoUpdate some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf.
Yaroslav Tykhiy [Thu, 14 Jun 2007 06:42:49 +0000 (06:42 +0000)]
Update some comments, mostly regarding LOGIN_MECLASS and ~/.login_conf.

17 years agoNit: avoid shadowing truncate(2) with a local variable.
Dag-Erling Smørgrav [Wed, 23 May 2007 12:09:33 +0000 (12:09 +0000)]
Nit: avoid shadowing truncate(2) with a local variable.

17 years agoFix stupid braino in previous commit.
Dag-Erling Smørgrav [Wed, 23 May 2007 10:06:03 +0000 (10:06 +0000)]
Fix stupid braino in previous commit.

17 years agoIf (flags & O_TRUNC), don't truncate the file until we've successfully
Dag-Erling Smørgrav [Wed, 23 May 2007 08:12:34 +0000 (08:12 +0000)]
If (flags & O_TRUNC), don't truncate the file until we've successfully
locked it.

MFC after: 3 weeks

17 years agoWell gag me with a spoon... I'm so used to working at high WARNS levels
Dag-Erling Smørgrav [Thu, 10 May 2007 15:01:42 +0000 (15:01 +0000)]
Well gag me with a spoon...   I'm so used to working at high WARNS levels
that I make stupid fundamental mistakes like this when I don't.

17 years agoRemove superfluous unexpanded RCS tag.
Dag-Erling Smørgrav [Thu, 10 May 2007 14:56:07 +0000 (14:56 +0000)]
Remove superfluous unexpanded RCS tag.

17 years agoDTRT when O_NONBLOCK is specified.
Dag-Erling Smørgrav [Thu, 10 May 2007 14:52:57 +0000 (14:52 +0000)]
DTRT when O_NONBLOCK is specified.

MFC after: 3 weeks

17 years agoI'm tired of seeing this done incorrectly and non-portably, so add a
Dag-Erling Smørgrav [Thu, 10 May 2007 14:43:31 +0000 (14:43 +0000)]
I'm tired of seeing this done incorrectly and non-portably, so add a
flopen(3) function which reliably opens and locks a file.

MFC after: 3 weeks

17 years agoBump .Dd for r1.5; fix grammatical problem.
Ceri Davies [Thu, 12 Apr 2007 08:39:13 +0000 (08:39 +0000)]
Bump .Dd for r1.5; fix grammatical problem.

17 years agoSpecify the correct way to modify this file, and warn that the
Mike Makonnen [Thu, 12 Apr 2007 08:35:58 +0000 (08:35 +0000)]
Specify the correct way to modify this file, and warn that the
user should not depend on the internal variables documented in
this man page.

MFC After: 2 weeks

17 years agoThere are a couple of bugs in rev. 1.27:
Mike Makonnen [Thu, 12 Apr 2007 08:17:56 +0000 (08:17 +0000)]
There are a couple of bugs in rev. 1.27:
1) The man page should describe the code, not the other way around.
2) Internal variables should not be documented or exposed, except in
   controlled circumstances (i.e. - That's what the -C flag is for).
   The variable should have been saved to the config file in save_config().
3) The next available userid doesn't get automatically updated. The
   end-result is the same (user gets added with the correct uid),
   but in an interactive session the default uid doesn't get updated in
   the display.

So,

o Use the uidstart variable instead of uuid (bug #3)
o Actually save the variable to adduser.conf (bug #2)
o (bug #1 to be fixed in an upcomming commit to adduser.conf.5)

MFC After: 2 weeks

17 years agoErrm... I don't see how rev. 1.26 could have possibly worked or been tested.
Mike Makonnen [Thu, 12 Apr 2007 07:38:26 +0000 (07:38 +0000)]
Errm... I don't see how rev. 1.26 could have possibly worked or been tested.
Fix it for real.

Submitted by: Johnny Lee <johnny@bmtk.com>
MFC After: 2 weeks

17 years agoDo the right thing with symlinks in the skeleton directory.
Lukas Ertl [Fri, 30 Mar 2007 13:18:52 +0000 (13:18 +0000)]
Do the right thing with symlinks in the skeleton directory.

PR:     bin/63659

17 years agoAccept passwords which contain whitespace.
Lukas Ertl [Fri, 30 Mar 2007 12:57:25 +0000 (12:57 +0000)]
Accept passwords which contain whitespace.

PR:     bin/53434

17 years agoAdd home directory creation mode to pw.conf(5) and be a bit
Lukas Ertl [Fri, 30 Mar 2007 11:23:10 +0000 (11:23 +0000)]
Add home directory creation mode to pw.conf(5) and be a bit
more specific about the effect of the current umask on -M.

17 years agoAdd -M argument to usage() output.
Lukas Ertl [Fri, 30 Mar 2007 10:02:47 +0000 (10:02 +0000)]
Add -M argument to usage() output.

17 years agoIntroduce the new option -M to allow to set the permissions of
Lukas Ertl [Mon, 26 Mar 2007 23:29:20 +0000 (23:29 +0000)]
Introduce the new option -M to allow to set the permissions of
the user's newly created home directory.  If omitted, it's derived
from the current umask.

PR:      bin/16880, bin/83253 (partially), bin/104248
MFC in:  1 month

17 years agoCheck if the new user already exists right after entering the
Lukas Ertl [Mon, 26 Mar 2007 22:22:10 +0000 (22:22 +0000)]
Check if the new user already exists right after entering the
username instead of watching the final call to pw(8) fail.

18 years agoRemove California Regent's clause 3, per letter
Warner Losh [Tue, 9 Jan 2007 01:02:06 +0000 (01:02 +0000)]
Remove California Regent's clause 3, per letter

18 years agoPer Regents of the University of Calfornia letter, remove advertising
Warner Losh [Tue, 9 Jan 2007 00:28:16 +0000 (00:28 +0000)]
Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.

18 years agoFlush my typo fix queue for this directory.
Ceri Davies [Tue, 5 Dec 2006 23:20:14 +0000 (23:20 +0000)]
Flush my typo fix queue for this directory.

18 years agoFix typos.
Ceri Davies [Tue, 5 Dec 2006 23:05:53 +0000 (23:05 +0000)]
Fix typos.

18 years agoBetter mdoc(7). Bump doc date.
Tom Rhodes [Mon, 9 Oct 2006 19:01:02 +0000 (19:01 +0000)]
Better mdoc(7).  Bump doc date.

Kicked by: ru

18 years agoNote the naming convention of files in share/skel and explain the "dot"
Tom Rhodes [Mon, 9 Oct 2006 17:57:40 +0000 (17:57 +0000)]
Note the naming convention of files in share/skel and explain the "dot"
prefix is removed.

PR: 103828

18 years agoMarkup fixes.
Ruslan Ermilov [Fri, 29 Sep 2006 17:57:04 +0000 (17:57 +0000)]
Markup fixes.

18 years agoFix bug introduced in rev 1.23:
Dmitry Morozovsky [Mon, 25 Sep 2006 15:06:24 +0000 (15:06 +0000)]
Fix bug introduced in rev 1.23:

pw_equal does not check crypted password field, so one cannot change
crypted password keeping other fields intact.

Approved by: des
MCF after: 3 days

18 years agoo Fix groupadd getopt line and make 'pw groupadd -o' work.
Maxim Konovalov [Mon, 18 Sep 2006 14:00:39 +0000 (14:00 +0000)]
o Fix groupadd getopt line and make 'pw groupadd -o' work.

PR: bin/100684
Submitted by: Devon H. O'Dell
MFC after: 3 weeks

18 years agoMinor comment fix.
Thomas Quinot [Fri, 8 Sep 2006 08:14:32 +0000 (08:14 +0000)]
Minor comment fix.

18 years ago(pw_copy): Handle the case of a malformed line in master.passwd
Thomas Quinot [Mon, 4 Sep 2006 15:09:21 +0000 (15:09 +0000)]
(pw_copy): Handle the case of a malformed line in master.passwd
 (copy it silently, do not dereference NULL pointer).

PR:             bin/102848
Reviewed by:    security-officer (cperciva)
MFC after:      1 week

18 years agoAdd adding_user.8 to SEE ALSO, note that usernames may contain any character
Tom Rhodes [Wed, 7 Jun 2006 04:58:54 +0000 (04:58 +0000)]
Add adding_user.8 to SEE ALSO, note that usernames may contain any character
but not being with a hyphen, similar to adding_user.8.

PR: 35732

18 years agoReimplementation of world/kernel build options. For details, see:
Ruslan Ermilov [Fri, 17 Mar 2006 18:54:44 +0000 (18:54 +0000)]
Reimplementation of world/kernel build options.  For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)

18 years agoPOSIXed strtoll() (and ours one too) can set errno to EINVAL, so check
Andrey A. Chernov [Tue, 14 Mar 2006 19:53:03 +0000 (19:53 +0000)]
POSIXed strtoll() (and ours one too) can set errno to EINVAL, so check
it first.

Approved by:    andre

18 years agoImport of OpenBSD's strtonum(3) which is a nicer version of strtoll(3)
Andre Oppermann [Tue, 14 Mar 2006 16:57:30 +0000 (16:57 +0000)]
Import of OpenBSD's strtonum(3) which is a nicer version of strtoll(3)
providing proper error checking and other improvements.

Obtained from: OpenBSD
Requested by: flz (to port Open[BGP|OSPF]D)
MFC after: 3 days

18 years agoAdd utility functions for checking if a given kernel module is loaded,
Dag-Erling Smørgrav [Sat, 18 Feb 2006 11:25:28 +0000 (11:25 +0000)]
Add utility functions for checking if a given kernel module is loaded,
and loading it.

19 years agoHonour the "uuid" directive in adduser.conf
Matteo Riondato [Sun, 22 Jan 2006 18:37:51 +0000 (18:37 +0000)]
Honour the "uuid" directive in adduser.conf

PR: conf/87914
Approved by: philip (mentor)
MFC after: 3 days

19 years agoAdd a family of functions for reliable pidfiles handling.
Pawel Jakub Dawidek [Wed, 24 Aug 2005 17:21:38 +0000 (17:21 +0000)]
Add a family of functions for reliable pidfiles handling.

Idea from: jmg
Discussed on: arch@

19 years agoCross-reference pw(8) into chpass(1), passwd(1), and vipw(8).
Sean Chittenden [Tue, 2 Aug 2005 21:38:03 +0000 (21:38 +0000)]
Cross-reference pw(8) into chpass(1), passwd(1), and vipw(8).

19 years agoChange /home symbolic link, so it will point to usr/home instead of /usr/home.
Pawel Jakub Dawidek [Sun, 31 Jul 2005 08:25:53 +0000 (08:25 +0000)]
Change /home symbolic link, so it will point to usr/home instead of /usr/home.

Previous symlink was confusing:

# cd /jails/virtual_system_1/home
# realpath .
/usr/home

...and slower.

OK'ed by: rwatson, phk

19 years agoFix a particularly egregious grammar error.
Adam Weinberger [Tue, 24 May 2005 04:50:07 +0000 (04:50 +0000)]
Fix a particularly egregious grammar error.

Approved by: wpaul
MFC after: 1 day

19 years ago - Act according to the documentation (man page):
Robert Drehmel [Thu, 28 Apr 2005 12:44:02 +0000 (12:44 +0000)]
 - Act according to the documentation (man page):
   When adding users from a preformatted file, do not exit
   silently when empty lines or lines starting with a '#'
   are encountered - ignore them instead.
 - Fix a spelling error in a comment.

PR: bin/80058

19 years agoProperly spell default in a comment.
Tom Rhodes [Fri, 22 Apr 2005 23:11:57 +0000 (23:11 +0000)]
Properly spell default in a comment.

19 years agoRemove unused variables.
Stefan Farfeleder [Sat, 9 Apr 2005 14:59:10 +0000 (14:59 +0000)]
Remove unused variables.

19 years agoThe variable `arglist' has internal linkage in pw.c, don't declare it as extern
Stefan Farfeleder [Thu, 10 Feb 2005 09:05:27 +0000 (09:05 +0000)]
The variable `arglist' has internal linkage in pw.c, don't declare it as extern
here.

20 years agoSort sections.
Ruslan Ermilov [Tue, 18 Jan 2005 20:02:45 +0000 (20:02 +0000)]
Sort sections.

20 years agoSort sections.
Ruslan Ermilov [Tue, 18 Jan 2005 13:43:56 +0000 (13:43 +0000)]
Sort sections.

20 years agoAdded the EXIT STATUS section where appropriate.
Ruslan Ermilov [Mon, 17 Jan 2005 07:44:44 +0000 (07:44 +0000)]
Added the EXIT STATUS section where appropriate.

20 years agoMore NO_NIS cleanup: LINKS and MLINKS
Andrey A. Chernov [Wed, 29 Dec 2004 08:13:20 +0000 (08:13 +0000)]
More NO_NIS cleanup: LINKS and MLINKS

20 years agoGrammar in a comment.
Ruslan Ermilov [Sat, 18 Dec 2004 12:31:12 +0000 (12:31 +0000)]
Grammar in a comment.

20 years agoAdd knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
Bjoern A. Zeeb [Sat, 13 Nov 2004 20:40:32 +0000 (20:40 +0000)]
Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on  no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks

20 years agoDon't rely on NULL being a pointer, add a cast before passing it to a variadic
Stefan Farfeleder [Sun, 3 Oct 2004 14:40:27 +0000 (14:40 +0000)]
Don't rely on NULL being a pointer, add a cast before passing it to a variadic
function.

20 years agoIn fullpath_from_shell(), move the nologin detection before the cat | while
Peter Pentchev [Thu, 23 Sep 2004 13:09:42 +0000 (13:09 +0000)]
In fullpath_from_shell(), move the nologin detection before the cat | while
loop to avoid an incorrect display of the nologin path twice.

PR: 71786
Submitted by: Andrew Hayden <andrew.hayden@gmail.com>
Reviewed by: mtm
MFC after: 3 days

20 years agoAlso, match the full path to the special nologin shell.
Mike Makonnen [Sat, 28 Aug 2004 14:32:10 +0000 (14:32 +0000)]
Also, match the full path to the special nologin shell.
Previously, it would recognize it as a valid shell only
if the basename (nologin) was specified. Now, it will
recognize both the basename and the full path.

NOTE: The full path as adduser(8) understands it is /usr/sbin/nologin.
      There is a symlink, /sbin/nologin, but that's deprecated and
      only there for backwards compatibility.

20 years agoRemove useless .Pp. Typo: gcos -> gecos (as spelled in passwd(5)).
Philippe Charnier [Mon, 26 Jul 2004 19:49:29 +0000 (19:49 +0000)]
Remove useless .Pp. Typo: gcos -> gecos (as spelled in passwd(5)).

20 years agoMechanically kill hard sentence breaks.
Ruslan Ermilov [Fri, 2 Jul 2004 23:13:00 +0000 (23:13 +0000)]
Mechanically kill hard sentence breaks.

20 years agoMechanically kill hard sentence breaks.
Ruslan Ermilov [Fri, 2 Jul 2004 22:22:35 +0000 (22:22 +0000)]
Mechanically kill hard sentence breaks.

20 years agoUse strlcpy(3) to replace the idiomatic
Robert Drehmel [Thu, 17 Jun 2004 14:07:16 +0000 (14:07 +0000)]
Use strlcpy(3) to replace the idiomatic

  strncpy(d, s, l);
  d[l - 1] = '\0';

statements.

20 years agoFix a bug which occurred when the home directory given by the
Robert Drehmel [Thu, 17 Jun 2004 10:29:12 +0000 (10:29 +0000)]
Fix a bug which occurred when the home directory given by the
-d option was equal to the one already saved and which caused
the pw utility to avoid updating values passed by other options
processed before the -d option in the code path.

Spotted by: Richard Caley <rjc@interactive.co.uk>

20 years agoAssorted markup, grammar, and spelling fixes.
Ruslan Ermilov [Sun, 13 Jun 2004 18:03:44 +0000 (18:03 +0000)]
Assorted markup, grammar, and spelling fixes.

20 years agoAdd note that rmuser will clean up any IPC mechanisms owned by the user.
Christian S.J. Peron [Tue, 8 Jun 2004 14:52:55 +0000 (14:52 +0000)]
Add note that rmuser will clean up any IPC mechanisms owned by the user.

Approved by: bmilekic (mentor)

20 years agoAccept full path names in addition to base names for shells.
Mike Makonnen [Sun, 6 Jun 2004 17:55:55 +0000 (17:55 +0000)]
Accept full path names in addition to base names for shells.

Make explicit in the documentation that valid shells need to be
supplied only if the -S option is not given.

20 years agoFixed a typo.
Ruslan Ermilov [Fri, 4 Jun 2004 19:21:26 +0000 (19:21 +0000)]
Fixed a typo.

20 years agoAdd humanize_number(3) to libutil for formating numbers into a human
Pawel Jakub Dawidek [Mon, 24 May 2004 22:19:27 +0000 (22:19 +0000)]
Add humanize_number(3) to libutil for formating numbers into a human
readable form.

Obtained from: NetBSD

20 years agoDon't depend on NULL's expansion being a pointer, cast it before it is passed
Stefan Farfeleder [Tue, 18 May 2004 15:53:58 +0000 (15:53 +0000)]
Don't depend on NULL's expansion being a pointer, cast it before it is passed
to variadic functions.

Approved by: das (mentor)

20 years agoBring the description for login_getclassbyname in sync with the function's
Diomidis Spinellis [Tue, 11 May 2004 11:05:26 +0000 (11:05 +0000)]
Bring the description for login_getclassbyname in sync with the function's
arguments.  The function has as a second argument a struct passwd * pointer,
not a directory name.

MFC after: 2 weeks

20 years agoThis manual page will not first appear in 4.10 as RELENG_4 has a different
Tom Rhodes [Wed, 7 Apr 2004 22:16:04 +0000 (22:16 +0000)]
This manual page will not first appear in 4.10 as RELENG_4 has a different
version of the adduser utility.

Noticed by: simon

20 years agoFix today's faux pas by:
Tom Rhodes [Tue, 30 Mar 2004 22:31:22 +0000 (22:31 +0000)]
Fix today's faux pas by:

Removing the -compact option passed to .Bl macro to avoid useless .Pp macros;
Adding a missing period;
Using .Xr with .Nd since makewhatis(1) has no support for cases where the Xref is absent.

Informed by: ru

20 years agoAdd an adduser.conf manual page.
Tom Rhodes [Tue, 30 Mar 2004 21:50:42 +0000 (21:50 +0000)]
Add an adduser.conf manual page.
Hook it to the build in Makefile.
Xref from adduser.8.
Update adduser.8's BUGS section.
Bump the date on adduser.8.

20 years agoSychronize with reality: nologin(8) is now in /usr/sbin
Colin Percival [Tue, 30 Mar 2004 19:24:56 +0000 (19:24 +0000)]
Sychronize with reality: nologin(8) is now in /usr/sbin

Reminded by: trhodes

20 years agoo Add an -S option to not attempt to ascertain the validity of a shell.
Mike Makonnen [Tue, 16 Mar 2004 13:46:29 +0000 (13:46 +0000)]
o Add an -S option to not attempt to ascertain the validity of a shell.
o Add a -D option to not attempt to create the home directory.
o Treat the /nonexistent home directory specially. It means the user has
  no home directory and it should not be created.
o Update Copyright year and my email.

20 years agoShift file locking to source file instead of temp file. This fixes
Ken Smith [Mon, 8 Mar 2004 20:31:37 +0000 (20:31 +0000)]
Shift file locking to source file instead of temp file.  This fixes
data buffering issue that corrupts files if two pw(8)'s run at the
same time as well as changing pw(8) so it uses the same locking
mechanism as PAM, vipw(8), pwd_mkdb(8), etc.

PR: bin/23501
Submitted by: Alex Kapranoff <alex (at) kapran (dot) bitmcnit (dot) bryansk (dot) su>
Approved by: rwatson (mentor)
MFC after: 5 days

20 years agoTypo fix.
Marc Fonvieille [Wed, 3 Mar 2004 09:15:07 +0000 (09:15 +0000)]
Typo fix.

PR: docs/63677
Submitted by: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
MFC after: 1 week

20 years agoMake rmuser now also remove ipc resources. Also, fix a few minor
Jens Schweikhardt [Sun, 29 Feb 2004 09:54:15 +0000 (09:54 +0000)]
Make rmuser now also remove ipc resources. Also, fix a few minor
shell style problems (superfluous backslashes at EOL).

PR: 55980
Submitted by: Chris S.J.Peron <maneo@bsdpro.com>
MFC after: 2 weeks

20 years agoAdd the clean_environment call to libutil.h also.
Tim Kientzle [Thu, 26 Feb 2004 22:44:11 +0000 (22:44 +0000)]
Add the clean_environment call to libutil.h also.

MFC after: 2 weeks

21 years agoRemove unused includes. Make it WARNS=6 friendly. Concerning bin/2442, make
Philippe Charnier [Sun, 18 Jan 2004 21:46:39 +0000 (21:46 +0000)]
Remove unused includes. Make it WARNS=6 friendly. Concerning bin/2442, make
a new function dup_shell() to replace ok_shell() and make it unconditionnally
strdup() its result to make the caller's code simplier. Change ok_shell() to
just return an integer value suitable for tests (it was used mainly for that
purpose). Do not use strdup() in the caller's code but rely on dup_shell()
that will do the job for us.

PR: bin/2442

21 years agoadd missing endusershell() call. Original version was incorrect.
Philippe Charnier [Sun, 18 Jan 2004 21:33:25 +0000 (21:33 +0000)]
add missing endusershell() call. Original version was incorrect.
PR: bin/2442
Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>

21 years agoAdd a `-H <fd>' option that is like `-h <fd>', but accepts an already
Ian Dowse [Sun, 11 Jan 2004 18:28:08 +0000 (18:28 +0000)]
Add a `-H <fd>' option that is like `-h <fd>', but accepts an already
encrypted password on the specified file descriptor.

PR: bin/22033
MFC after: 2 weeks

21 years ago(mostly) Clean up some const warnings here. The code takes some liberties
Peter Wemm [Sun, 26 Oct 2003 03:51:47 +0000 (03:51 +0000)]
(mostly) Clean up some const warnings here.  The code takes some liberties
because it is the originator of various const strings and knows that they
came from malloc.

21 years agoANSIfy, WARNSify, CONSTify. Bit of style(9)-ify.
Mark Murray [Sat, 18 Oct 2003 10:04:16 +0000 (10:04 +0000)]
ANSIfy, WARNSify, CONSTify. Bit of style(9)-ify.

21 years agomdoc(7): Properly mark C headers.
Ruslan Ermilov [Wed, 10 Sep 2003 19:24:35 +0000 (19:24 +0000)]
mdoc(7): Properly mark C headers.

21 years agomdoc(7): Use the new feature of the .In macro.
Ruslan Ermilov [Mon, 8 Sep 2003 19:57:22 +0000 (19:57 +0000)]
mdoc(7): Use the new feature of the .In macro.

21 years agoDo not compare unsigned int values with ULONG_MAX. The comparison is
Alexander Kabaev [Fri, 11 Jul 2003 05:47:05 +0000 (05:47 +0000)]
Do not compare unsigned int values with ULONG_MAX. The comparison is
always false on 64bit platforms and GCC 3.3.1 issues warning there.

21 years agoTypo.
Mike Makonnen [Tue, 24 Jun 2003 15:20:43 +0000 (15:20 +0000)]
Typo.
This has worked so far because the variable was empty by default.

Submitted by: Kostyuk Oleg <cub@cub.org.ua>