]> git.cameronkatri.com Git - pw-darwin.git/log
pw-darwin.git
10 years agoMinor style tweaks.
Pedro F. Giffuni [Wed, 13 Aug 2014 03:44:30 +0000 (03:44 +0000)]
Minor style tweaks.

Obtained from: OpenBSD (CVS rev. 1.7)
MFC after: 3 days

10 years agopw: fix up deletion of users from groups
Mateusz Guzik [Fri, 27 Jun 2014 18:51:19 +0000 (18:51 +0000)]
pw: fix up deletion of users from groups

Previuosly given 'foo,bar' members, removing 'foo' would result in an
infinite loop.

PR: 191427
Submitted by: Voradesh Yenbut <yenbut cs.washington.edu>
MFC after: 1 week

10 years agoFix changing the username
Baptiste Daroussin [Fri, 20 Jun 2014 10:38:08 +0000 (10:38 +0000)]
Fix changing the username

PR: 189172
Submitted by: fullermd@over-yonder.net
MFC after: 1 week

10 years agoRemoved compatibility with pre FreeBSD 2.2 pw_mkdb command
Baptiste Daroussin [Fri, 20 Jun 2014 10:34:32 +0000 (10:34 +0000)]
Removed compatibility with pre FreeBSD 2.2 pw_mkdb command
Fix some broken indentattion

PR: 189173
Submitted by: fullermd@over-yonder.net
MFC after: 1 week

10 years agouse .Mt to mark up email addresses consistently (part2)
Baptiste Daroussin [Fri, 20 Jun 2014 09:57:27 +0000 (09:57 +0000)]
use .Mt to mark up email addresses consistently (part2)

PR: 191174
Submitted by: Franco Fichtner  <franco@lastsummer.de>

10 years agoUse src.opts.mk in preference to bsd.own.mk except where we need stuff
Warner Losh [Tue, 6 May 2014 04:22:01 +0000 (04:22 +0000)]
Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.

10 years agoSimplify reading pw.conf(5) by using getline(3)
Baptiste Daroussin [Tue, 22 Apr 2014 21:07:56 +0000 (21:07 +0000)]
Simplify reading pw.conf(5) by using getline(3)

10 years agoFix pw(8) deletion of group "username" on userdel even if group "username"
Devin Teske [Thu, 13 Mar 2014 18:16:42 +0000 (18:16 +0000)]
Fix pw(8) deletion of group "username" on userdel even if group "username"
is not associated with user "username". E.g., user "foo" has primary group
"wheel" and is unassociated with group "foo", yet userdel would delete the
group "foo" when deleting user "foo" (despite the fact that user "foo" is
not associated with group "foo" in any way).

Patch committed with minor style(9) changes.

PR: bin/169471
Submitted by: Alexander Pyhalov <apyhalov@gmail.com>

10 years agoPart 2 of bug 187310.. had to commit separately due to local confusion.
Julian Elischer [Thu, 6 Mar 2014 19:58:03 +0000 (19:58 +0000)]
Part 2 of bug 187310.. had to commit separately due to local confusion.
Don't let pw crash when give certain input.

PR: 187310
Submitted by: Kim Shrier
MFC after: 1 week

10 years agoStop pw(8) from segfaulting when given certain input
Julian Elischer [Thu, 6 Mar 2014 19:26:08 +0000 (19:26 +0000)]
Stop pw(8) from segfaulting when given certain input

PR:187310
Submitted by: Kim Shrier
Obtained from: bug
MFC after: 1 week

10 years agomdoc: minor paragraph fixes.
Joel Dahl [Sat, 8 Feb 2014 13:37:02 +0000 (13:37 +0000)]
mdoc: minor paragraph fixes.

11 years agolibutil: Use O_CLOEXEC for internal file descriptors from open().
Jilles Tjoelker [Wed, 28 Aug 2013 21:10:37 +0000 (21:10 +0000)]
libutil: Use O_CLOEXEC for internal file descriptors from open().

11 years agoFall back to sha512 if passwd_format is not set.
Dag-Erling Smørgrav [Thu, 4 Jul 2013 07:59:11 +0000 (07:59 +0000)]
Fall back to sha512 if passwd_format is not set.

MFC after: 3 days

11 years agoThere is no reason to disallow setting the password or account expiry
Dag-Erling Smørgrav [Wed, 3 Jul 2013 09:48:24 +0000 (09:48 +0000)]
There is no reason to disallow setting the password or account expiry
date to the current date.

MFC after: 3 days

11 years agoFix -Wunsequenced warning
Tim Kientzle [Sat, 29 Jun 2013 15:54:17 +0000 (15:54 +0000)]
Fix -Wunsequenced warning

Submitted by:   dt71@gmx.com

11 years agomdoc sweep
Joel Dahl [Mon, 13 May 2013 18:13:50 +0000 (18:13 +0000)]
mdoc sweep

11 years agocommit correct tested fix for gr_util.c
Diane Bruce [Sat, 9 Mar 2013 13:30:06 +0000 (13:30 +0000)]
commit correct tested fix for gr_util.c

Approved by: theraven

11 years agoCleanup gr_add() so it does not leak mem
Diane Bruce [Thu, 7 Mar 2013 19:00:00 +0000 (19:00 +0000)]
Cleanup gr_add() so it does not leak mem
This is part of ongoing work on sbin/pw

M    libutil.h
M    gr_util.c

Approved by: theraven

11 years agoPrevent a null pointer dereference in pw userdel when deleting
Daniel Eischen [Fri, 1 Feb 2013 05:19:49 +0000 (05:19 +0000)]
Prevent a null pointer dereference in pw userdel when deleting
a user whose group != username.

12 years agoIFC @ r245509
Neel Natu [Thu, 17 Jan 2013 07:04:37 +0000 (07:04 +0000)]
IFC @ r245509

12 years agoRemove unused variables
Eitan Adler [Wed, 16 Jan 2013 05:03:49 +0000 (05:03 +0000)]
Remove unused variables

Approved by: cperciva
MFC After: 3 days

12 years agolibutil: fix typo in comment for gr_fini.
Mateusz Guzik [Sun, 13 Jan 2013 22:08:18 +0000 (22:08 +0000)]
libutil: fix typo in comment for gr_fini.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agolibutil: utilize strsep instead of strcat in a loop in gr_make
Mateusz Guzik [Sun, 13 Jan 2013 21:28:47 +0000 (21:28 +0000)]
libutil: utilize strsep instead of strcat in a loop in gr_make

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agolibutil: move group_line_format into the scop of its only user.
Mateusz Guzik [Sun, 13 Jan 2013 21:26:57 +0000 (21:26 +0000)]
libutil: move group_line_format into the scop of its only user.

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agolibutil: eliminate 'found' variable in gr_equal
Mateusz Guzik [Sun, 13 Jan 2013 21:25:43 +0000 (21:25 +0000)]
libutil: eliminate 'found' variable in gr_equal

Submitted by: Christoph Mallon <christoph.mallon gmx.de>

12 years agoIFC @ r245178
Neel Natu [Wed, 9 Jan 2013 02:26:50 +0000 (02:26 +0000)]
IFC @ r245178

12 years agopw: free group returned by gr_add
Mateusz Guzik [Sun, 6 Jan 2013 21:56:58 +0000 (21:56 +0000)]
pw: free group returned by gr_add

12 years agoIFC @ r244983.
Neel Natu [Fri, 4 Jan 2013 19:28:32 +0000 (19:28 +0000)]
IFC @ r244983.

12 years agoSimplify pointing dst after the end of all the gr_mem pointers in newgr
Baptiste Daroussin [Fri, 28 Dec 2012 20:44:10 +0000 (20:44 +0000)]
Simplify pointing dst after the end of all the gr_mem pointers in newgr

Submitted by: pjd
Reviewed by: db

12 years agoerrno = ENOMEM was supposed to be removed not return (NULL);
Baptiste Daroussin [Fri, 28 Dec 2012 20:30:04 +0000 (20:30 +0000)]
errno = ENOMEM was supposed to be removed not return (NULL);

Submitted by: gcooper

12 years agomalloc() sets errno to ENOMEM already.
Baptiste Daroussin [Fri, 28 Dec 2012 20:21:14 +0000 (20:21 +0000)]
malloc() sets errno to ENOMEM already.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

12 years agoDo not leave parts of the new group uninitialized in gr_dup().
Baptiste Daroussin [Fri, 28 Dec 2012 20:19:54 +0000 (20:19 +0000)]
Do not leave parts of the new group uninitialized in gr_dup().

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
Reported by: pjd

12 years agoavoid arithmetic on uintptr_t
Baptiste Daroussin [Thu, 27 Dec 2012 20:47:34 +0000 (20:47 +0000)]
avoid arithmetic on uintptr_t

Submitted by: pjd
Reviewed by: jilles

12 years agocast to uintptr_t to properly calculate offset
Baptiste Daroussin [Thu, 27 Dec 2012 20:31:12 +0000 (20:31 +0000)]
cast to uintptr_t to properly calculate offset

Reported by: mdf
Submitted by: db

12 years agoAdd O_CLOEXEC to flopen
Baptiste Daroussin [Thu, 27 Dec 2012 20:24:44 +0000 (20:24 +0000)]
Add O_CLOEXEC to flopen

Requested by: jilles

12 years agoSimplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil.
Baptiste Daroussin [Thu, 27 Dec 2012 19:43:29 +0000 (19:43 +0000)]
Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil.

12 years agogr_dup: simplify duplication of group
Baptiste Daroussin [Thu, 27 Dec 2012 19:33:43 +0000 (19:33 +0000)]
gr_dup: simplify duplication of group

Submitted by: db

12 years ago- Clean up previous gr_add use malloc instead of calloc
Baptiste Daroussin [Thu, 27 Dec 2012 16:51:29 +0000 (16:51 +0000)]
- Clean up previous gr_add use malloc instead of calloc
- Fix tinderbox error

Submitted by: db

12 years agoFix a regression in "pw group show" introduced r242349:
Baptiste Daroussin [Thu, 27 Dec 2012 14:44:13 +0000 (14:44 +0000)]
Fix a regression in "pw group show" introduced r242349:
print a newline after printing each group line.

PR: bin/174731
Submitted by: Jan Beich <jbeich@tormail.org>

12 years agoSimplify the code by using the new gr_add function
Baptiste Daroussin [Thu, 27 Dec 2012 14:35:06 +0000 (14:35 +0000)]
Simplify the code by using the new gr_add function

12 years agoNew gr_add function to provide a clean and safe method to append a new member
Baptiste Daroussin [Thu, 27 Dec 2012 14:30:19 +0000 (14:30 +0000)]
New gr_add function to provide a clean and safe method to append a new member
into an existing group.

Submitted by: db

12 years agoUse flopen(3) instead of open(2) + flock(2)
Baptiste Daroussin [Thu, 27 Dec 2012 14:09:50 +0000 (14:09 +0000)]
Use flopen(3) instead of open(2) + flock(2)

12 years agoSimplify copying of group members by using memcpy
Baptiste Daroussin [Wed, 26 Dec 2012 23:16:24 +0000 (23:16 +0000)]
Simplify copying of group members by using memcpy

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

12 years agoFix off-by-one error in memory allocation: j entries, one new and a null
Baptiste Daroussin [Wed, 26 Dec 2012 23:14:33 +0000 (23:14 +0000)]
Fix off-by-one error in memory allocation: j entries, one new and a null
terminator is j + 2.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

12 years agoIn case of the deletion of a user those whole database has to be regenerated,
Baptiste Daroussin [Wed, 26 Dec 2012 18:28:17 +0000 (18:28 +0000)]
In case of the deletion of a user those whole database has to be regenerated,
otherwise the user planned to be deleted remain in the pwd.db while removed from
the plain text password file.

12 years agoFix creating a user and adding it to a group
Baptiste Daroussin [Wed, 26 Dec 2012 18:14:45 +0000 (18:14 +0000)]
Fix creating a user and adding it to a group

Reported by: "Sam Fourman Jr." <sfourman@gmail.com>, dim

12 years agoSimplify string duplication: use strdup instead of malloc + strcpy
Eitan Adler [Wed, 5 Dec 2012 13:56:56 +0000 (13:56 +0000)]
Simplify string duplication: use strdup instead of malloc + strcpy

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoAvoid overflowing the file buffer
Eitan Adler [Wed, 5 Dec 2012 13:56:52 +0000 (13:56 +0000)]
Avoid overflowing the file buffer

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoUse strdup instead of malloc + strcpy
Eitan Adler [Wed, 5 Dec 2012 13:56:49 +0000 (13:56 +0000)]
Use strdup instead of malloc + strcpy

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoAvoid overflow of file buffer
Eitan Adler [Wed, 5 Dec 2012 13:56:46 +0000 (13:56 +0000)]
Avoid overflow of file buffer

Submitted by: db
Approved by: cperciva
MFC after: 2 weeks

12 years agoRemove useless check for NULL prior to free.
Eitan Adler [Wed, 5 Dec 2012 13:56:43 +0000 (13:56 +0000)]
Remove useless check for NULL prior to free.

Approved by: cperciva
MFC after: 2 weeks

12 years agoIFC @r243836
Neel Natu [Tue, 4 Dec 2012 04:37:42 +0000 (04:37 +0000)]
IFC @r243836

12 years agoIn NIS mode first chmod(2) the temporary file and is succeed then rename(2)
Baptiste Daroussin [Tue, 20 Nov 2012 14:05:46 +0000 (14:05 +0000)]
In NIS mode first chmod(2) the temporary file  and is succeed then rename(2)

12 years agoonly rename(2) after chmod(2) has succeed
Baptiste Daroussin [Tue, 20 Nov 2012 14:03:09 +0000 (14:03 +0000)]
only rename(2) after chmod(2) has succeed
report error if chmod(2) fails

Reported by: jh

12 years agoCorrectly set the password file mode after renaming in NIS mode
Baptiste Daroussin [Tue, 20 Nov 2012 10:59:41 +0000 (10:59 +0000)]
Correctly set the password file mode after renaming in NIS mode

12 years agochange mode the group file to 0644 after a successfull rename(2)
Baptiste Daroussin [Tue, 20 Nov 2012 07:22:07 +0000 (07:22 +0000)]
change mode the group file to 0644 after a successfull rename(2)

12 years agoIFC @ r243164
Neel Natu [Sat, 17 Nov 2012 02:55:47 +0000 (02:55 +0000)]
IFC @ r243164

12 years agoAvoid possible null deref if ypclnt_new returns null
Eitan Adler [Thu, 15 Nov 2012 15:06:18 +0000 (15:06 +0000)]
Avoid possible null deref if ypclnt_new returns null

PR: bin/172979
Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Approved by: cperciva
MFC after: 3 days

12 years agoIFC @ r242684
Neel Natu [Sun, 11 Nov 2012 03:26:14 +0000 (03:26 +0000)]
IFC @ r242684

12 years agoTeach pw(8) about how to use pw/gr API to reduce code duplication
Baptiste Daroussin [Tue, 30 Oct 2012 08:00:53 +0000 (08:00 +0000)]
Teach pw(8) about how to use pw/gr API to reduce code duplication

MFC after: 2 months

12 years agobackout r242319, racy and not done in the right place
Baptiste Daroussin [Mon, 29 Oct 2012 18:06:09 +0000 (18:06 +0000)]
backout r242319, racy and not done in the right place

Reported by: Garrett Cooper  <yanegomi@gmail.com>

12 years agomake pw_init and gr_init fail if the specified master password or group file is
Baptiste Daroussin [Mon, 29 Oct 2012 17:19:43 +0000 (17:19 +0000)]
make pw_init and gr_init fail if the specified master password or group file is
a directory.

MFC after: 1 month

12 years agoDo not treat empty name as an uid 0
Baptiste Daroussin [Mon, 1 Oct 2012 17:00:33 +0000 (17:00 +0000)]
Do not treat empty name as an uid 0

Reported by: Robert Bonomi <bonomi@mail.r-bonomi.com>

12 years agoRemove useless atoi(3), previous strspn(3) makes sure that a_name->val is a
Baptiste Daroussin [Mon, 1 Oct 2012 16:42:07 +0000 (16:42 +0000)]
Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a
number.
This also allow pw user show to work as expected.

PR: bin/172112
Submitted by: "Ilya A. Arkhipov" <rum1cro@yandex.ru>
MFC after: 1 month

12 years agoMake sure that each va_start has one and only one matching va_end,
Kevin Lo [Fri, 28 Sep 2012 07:51:30 +0000 (07:51 +0000)]
Make sure that each va_start has one and only one matching va_end,
especially in error cases.

12 years agoRemove a reference to CVS and to freefall from a user-facing man page.
Isabell Long [Sat, 15 Sep 2012 16:24:03 +0000 (16:24 +0000)]
Remove a reference to CVS and to freefall from a user-facing man page.

PR: docs/171658
Reported by: Chris Petrik (c dot petrik dot sosa at gmail dot com)
Approved by: gabor (mentor)
MFC after: 5 days

12 years agoIFC @ r238370
Peter Grehan [Wed, 11 Jul 2012 19:54:21 +0000 (19:54 +0000)]
IFC @ r238370

12 years agoRevert user comparison back to user names as some user can share uids (root/toor
Baptiste Daroussin [Tue, 19 Jun 2012 11:39:56 +0000 (11:39 +0000)]
Revert user comparison back to user names as some user can share uids (root/toor
for example)

get the username information from old_pw structures to still allow renaming of a
user.

Reported by: Claude Buisson <clbuisson@orange.fr>
Approved by: des (mentor)
MFC after: 3 weeks

12 years agomdoc: add missing width argument to Bl -tag.
Joel Dahl [Sun, 3 Jun 2012 06:57:47 +0000 (06:57 +0000)]
mdoc: add missing width argument to Bl -tag.

12 years agoA new jail(8) with a configuration file, ultimately to replace the work
Jamie Gritton [Thu, 26 Apr 2012 17:36:05 +0000 (17:36 +0000)]
A new jail(8) with a configuration file, ultimately to replace the work
currently done by /etc/rc.d/jail.

MFC after: 3 months

12 years agoIFC @ r234692
Peter Grehan [Thu, 26 Apr 2012 07:52:28 +0000 (07:52 +0000)]
IFC @ r234692

sys/amd64/include/cpufunc.h
sys/amd64/include/fpu.h
sys/amd64/amd64/fpu.c
sys/amd64/vmm/vmm.c

 - Add API to allow vmm FPU state init/save/restore.

FP stuff discussed with: kib

12 years agoRemove trailing whitespace per mdoc lint warning
Eitan Adler [Thu, 29 Mar 2012 05:02:12 +0000 (05:02 +0000)]
Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days

12 years agoWhen using uidstart in /etc/adduser.conf, get the next
Daniel Eischen [Sat, 25 Feb 2012 07:58:59 +0000 (07:58 +0000)]
When using uidstart in /etc/adduser.conf, get the next
available user id and show it in the "Uid [xxx]" prompt.

PR: 163863
Submitted by: Moritz Wilhelmy (mw at wzff dot de)
MFC after: 2 weeks

12 years agoHandle NULL return from crypt(3). Mostly from DragonFly
Kevin Lo [Wed, 22 Feb 2012 06:27:20 +0000 (06:27 +0000)]
Handle NULL return from crypt(3). Mostly from DragonFly

12 years agoreadlink len-1
Kevin Lo [Tue, 14 Feb 2012 10:17:03 +0000 (10:17 +0000)]
readlink len-1

12 years agoRemove unnecessary cast
Kevin Lo [Tue, 14 Feb 2012 10:11:45 +0000 (10:11 +0000)]
Remove unnecessary cast

12 years agoDetect file modification properly by using tv_nsec.
Ed Schouten [Fri, 10 Feb 2012 13:40:32 +0000 (13:40 +0000)]
Detect file modification properly by using tv_nsec.

POSIX 2008 standardizes st_mtim, meaning we can simply use nanosecond
precision to detect file modification.

MFC after: 2 weeks

12 years agoConsensus between bde and pjd seemed to be that if the function names
Guy Helmer [Thu, 26 Jan 2012 20:40:22 +0000 (20:40 +0000)]
Consensus between bde and pjd seemed to be that if the function names
are lined up, then any * after a long type should appear after the
type instead of being in front of the function name on the following
line.

12 years agoMake the comments consistent (capitalization, punctuation, and
Guy Helmer [Thu, 26 Jan 2012 20:35:01 +0000 (20:35 +0000)]
Make the comments consistent (capitalization, punctuation, and
format).

Requested by bde

12 years agoRestore the parenthesis that are necessary around the constant values.
Guy Helmer [Thu, 26 Jan 2012 20:33:08 +0000 (20:33 +0000)]
Restore the parenthesis that are necessary around the constant values.

Requested by bde.

13 years agoFix more disorder in prototypes and constants.
Guy Helmer [Mon, 16 Jan 2012 21:19:23 +0000 (21:19 +0000)]
Fix more disorder in prototypes and constants.
Fix header comments for each section of constants.
Fix whitespace in #define lines.
Fix unnecessary parenthesis in constants.

13 years agoMove struct pidfh definition into pidfile.c, and leave a forward declaration
Guy Helmer [Thu, 12 Jan 2012 22:49:36 +0000 (22:49 +0000)]
Move struct pidfh definition into pidfile.c, and leave a forward declaration
for pidfh in libutil.h in its place.
This allows us to hide the contents of the pidfh structure, and also
allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the
pidfile_* function prototypes.

Suggested by pjd.

13 years agoMore prototype formatting fixes, struct member formatting fixes,
Guy Helmer [Thu, 12 Jan 2012 14:40:25 +0000 (14:40 +0000)]
More prototype formatting fixes, struct member formatting fixes,
and namespace fix for property_find() prototype.

Provided by bde.

13 years agoFix prototype formatting (indentation, long lines, and continued lines).
Guy Helmer [Wed, 11 Jan 2012 22:45:15 +0000 (22:45 +0000)]
Fix prototype formatting (indentation, long lines, and continued lines).

Requested by bde.

13 years agoFix namespace issues with prototype parameter names.
Guy Helmer [Wed, 11 Jan 2012 22:33:41 +0000 (22:33 +0000)]
Fix namespace issues with prototype parameter names.
Add missing prototype parameter names.

Requested by bde.

13 years agoFix forward structure declaration and prototype disorder.
Guy Helmer [Wed, 11 Jan 2012 22:12:45 +0000 (22:12 +0000)]
Fix forward structure declaration and prototype disorder.

Requested by bde.

13 years agoConstify arguments.
Pawel Jakub Dawidek [Wed, 11 Jan 2012 00:31:04 +0000 (00:31 +0000)]
Constify arguments.

13 years agoAdd pidfile_fileno() to obtain the file descriptor for an open
Guy Helmer [Tue, 10 Jan 2012 19:53:25 +0000 (19:53 +0000)]
Add pidfile_fileno() to obtain the file descriptor for an open
pidfile.

13 years agoAdd new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd
Baptiste Daroussin [Thu, 5 Jan 2012 10:40:24 +0000 (10:40 +0000)]
Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd
while here, fix missing parentheses of the return statement of pw_make.

Approved by: des (mentor)

13 years agoIFC to head to catch up the bhyve branch
Sean Bruno [Wed, 4 Jan 2012 02:01:27 +0000 (02:01 +0000)]
IFC to head to catch up the bhyve branch

Approved by: grehan@

13 years agoSpelling fixes for usr.sbin/
Ulrich Spörlein [Fri, 30 Dec 2011 10:58:14 +0000 (10:58 +0000)]
Spelling fixes for usr.sbin/

13 years ago- document the -l option to usermod
Eitan Adler [Thu, 22 Dec 2011 03:36:54 +0000 (03:36 +0000)]
- document the -l option to usermod

PR: docs/161588
Submitted by: "Luchesar V. ILIEV" <luchesar.iliev@gmail.com>
Approved by: gjb
MFC after: 1 week

13 years agoIn usr.sbin/pw/pw_user.c, use the correct printf length modifier for a
Dimitry Andric [Sat, 17 Dec 2011 23:46:47 +0000 (23:46 +0000)]
In usr.sbin/pw/pw_user.c, use the correct printf length modifier for a
ptrdiff_t.

MFC after: 1 week

13 years agoModify pw_copy:
Baptiste Daroussin [Thu, 15 Dec 2011 22:07:36 +0000 (22:07 +0000)]
Modify pw_copy:
- if pw is NULL and oldpw is not NULL then the oldpw is deleted
- if pw->pw_name != oldpw->pw_name but pw->pw_uid == oldpw->pw_uid
then it renames the user

add new gr_* functions so now gr_util API is similar to pw_util API,
this allow to manipulate groups in a safe way.

Reviewed by: des
Approved by: des
MFC after: 1 month

13 years agoIFC @ r227804
Peter Grehan [Tue, 22 Nov 2011 02:27:59 +0000 (02:27 +0000)]
IFC @ r227804

Pull in the virtio drivers from head.

13 years agoMark the structure fields as const.
Ed Schouten [Sun, 6 Nov 2011 17:20:44 +0000 (17:20 +0000)]
Mark the structure fields as const.

This allows us to simply place these strings as constants in the table
itself, letting the compiler decide to simply merge duplicate strings.

13 years agoIFC @ r225592
Peter Grehan [Thu, 15 Sep 2011 22:14:35 +0000 (22:14 +0000)]
IFC @ r225592

sys/dev/bvm/bvm_console.c - move up to the new alt-break order.

13 years agoBackout r223115 which potentially caused a POLA violation, by restoring
Xin LI [Sun, 31 Jul 2011 03:00:00 +0000 (03:00 +0000)]
Backout r223115 which potentially caused a POLA violation, by restoring
historic behavior (create the default base directory in pw.conf) before
I came up with a better fix for this.

Requested by: nwhitehorn
Approved by: re (kib)

13 years agoIFC @ r222830
Peter Grehan [Tue, 28 Jun 2011 06:26:03 +0000 (06:26 +0000)]
IFC @ r222830

13 years agoDon't attempt to create the base directory when -d is specified.
Xin LI [Wed, 15 Jun 2011 19:09:58 +0000 (19:09 +0000)]
Don't attempt to create the base directory when -d is specified.

MFC after: 1 month