Baptiste Daroussin
68cea7d570
Remove useless cast in printf and printf-like functions:
...
use %u for uid_t and gid_t
2015-05-31 22:07:03 +00:00
Baptiste Daroussin
7fc593dd82
Move cleanup functions to the right place
2015-05-31 12:04:06 +00:00
Baptiste Daroussin
2e6d97a407
Remove useless test before free()
2015-05-31 11:56:59 +00:00
Baptiste Daroussin
c69b42d00b
Return early in case we cannot read the configuration file
...
This drops one level of indentation
2015-05-31 11:55:28 +00:00
Baptiste Daroussin
a1d3bf2e8f
Use calloc(3) instead of malloc(3) + memset(3)
...
While here check the return of calloc(3)
2015-05-10 11:18:01 +00:00
Baptiste Daroussin
36dc2e6885
The initial logic for allocating the new string was wrong, the conversion
...
to strndup(3) duplicated the same mistake, actually strdup(3) is good enough
to allocate the new string.
2015-05-10 10:15:36 +00:00
Baptiste Daroussin
a84caa72b0
Use strndup(3) instead of malloc(3) + memcpy(3)
...
Check the return of strndup
2015-05-10 10:02:09 +00:00
Baptiste Daroussin
2c3065da9c
Remove useless call to extendarray
2015-05-10 09:33:15 +00:00
Baptiste Daroussin
8592cfc58e
Remove now unused LNBUFSZ buffer size
2015-05-09 22:08:30 +00:00
Baptiste Daroussin
5963cf64b5
Return from the function as early as possible
...
This reduces the depth of the if statements and improves clarity of the code
2015-05-09 21:53:33 +00:00
Baptiste Daroussin
a8e37ee0ac
Use sbuf(9) instead of homebrewed buffered string
2015-05-09 19:00:16 +00:00
Baptiste Daroussin
c145c34c09
Simplify reading pw.conf(5) by using getline(3)
2014-04-22 21:07:56 +00:00
Jung-uk Kim
644af48df6
Stop hard-coding default directory mode as 0777.
2011-03-08 20:13:29 +00:00
Lukas Ertl
85204142eb
Add home directory creation mode to pw.conf(5) and be a bit
...
more specific about the effect of the current umask on -M.
2007-03-30 11:23:10 +00:00
Brian Somers
2313781df2
Handle snprintf() returning < 0 (not just -1)
...
MFC after: 2 weeks
2001-08-20 15:09:34 +00:00
Brian Somers
36c1612b5e
Handle snprintf() returning -1.
...
MFC after: 2 weeks
2001-08-20 13:24:39 +00:00
Doug Barton
fc308a5491
Make the comment generated in /etc/pw.conf match reality
...
PR: misc/23451
Submitted by: Ben Rosengart, ben@narcissus.net
2000-12-18 01:35:56 +00:00
David Nugent
670eb236c0
Catch up to the fact that we now have tcsh in the tree.
2000-07-16 01:46:26 +00:00
Peter Wemm
97d92980a9
$Id$ -> $FreeBSD$
1999-08-28 01:35:59 +00:00
David Nugent
479bcf69f7
Remove some more warnings.
1999-07-28 12:49:34 +00:00
David Nugent
5f12594a29
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.
1999-02-23 07:15:11 +00:00
Philippe Charnier
1dcc6ec750
Use err(3) instead of local redefinition. Add rcsid string.
1997-10-10 06:23:42 +00:00
David Nugent
d3329f56fa
Unquote default group in pw.conf.
...
PR: 4365
Submitted by: "Andrew L. Moore" <alm@mclink.com>
1997-09-01 09:33:08 +00:00
Peter Wemm
476602a9d0
Revert $FreeBSD$ to $Id$
1997-02-22 16:15:28 +00:00
Jordan K. Hubbard
1130b656e5
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
David Nugent
f1d684fad9
Adds optional NIS passwd file updating and optionally rebuilding
...
NIS maps.
Suggested by: Peter Wemm
1997-01-05 07:15:37 +00:00
David Nugent
0970881ff6
1) 200 users per group limitation removed and pw
...
will handle lines of any length in /etc/group.
2) Fixed bug with usermod -d not updating user's home
directory.
3) Minor formatting display changes/fixes with *show -P.
1996-12-21 15:35:45 +00:00
Joerg Wunsch
ad7cf975be
Copyright update by the author, to be more in line with our sample
...
copyright.
Submitted by: David Nugent
1996-12-10 23:59:04 +00:00
Joerg Wunsch
d6f907dc7a
pw(8) -- a backend utility to manage the user and group databases.
...
sysinstall's new User&group menu will use it, hence it's a 2.2
candidate despite of providing new functionality.
Submitted by: David L. Nugent, <davidn@blaze.net.au>
1996-12-09 14:05:35 +00:00