Baptiste Daroussin
59856c7d26
pw: fail if an invalid entry is found while parsing master.passwd and group
...
PR: 198554
Reported by: diaran <fbsd@centraltech.co.uk>
MFC after: 2 days
2015-07-07 21:05:20 +00:00
Baptiste Daroussin
391ad8ceb8
Remove dead code
2015-07-05 10:14:34 +00:00
Baptiste Daroussin
f6eae381a5
Also validate hours via strptime_l(3)
...
Simplify the code, by only using one parser, ensure the dates (hours and dates)
are valid
2015-07-05 10:11:35 +00:00
Baptiste Daroussin
330e423084
Validate expiration dates
...
Use strptime_l(3) to validate the dates provided in input
2015-07-05 09:48:03 +00:00
Baptiste Daroussin
1f8d909274
Fix validation of crypted password
...
Small cleanups
2015-07-04 15:56:59 +00:00
Baptiste Daroussin
9d028e08ce
Also validate inputs of pw groupmod -h and groupmod -H
2015-07-04 15:54:11 +00:00
Baptiste Daroussin
11621f9650
Validate input of pw usermod -h and pwusermod -H
...
Push the code that set the password into a separate function to improve
readability
Add regression tests about pw usermod -h and pw usermod -H
2015-07-04 15:27:04 +00:00
Baptiste Daroussin
4369c82dc6
Change the documentation to reflect where the -V option should be used
...
Suggested by: kientzle
2015-06-14 21:50:38 +00:00
Simon J. Gerraty
ccfb965433
Add META_MODE support.
...
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704
dirdeps.mk now sets DEP_RELDIR
2015-06-08 23:35:17 +00:00
Baptiste Daroussin
3bfc59e83b
backout remove of -q option for pw [user|group] next
...
While the return code is broken, some corner case usage depends on the
functionnality, so backout until we get better regression tests covering those
corner case usage.
2015-06-08 05:27:34 +00:00
Baptiste Daroussin
6328a4be57
Fix typo
2015-06-08 05:06:17 +00:00
Baptiste Daroussin
a57d4bf3a1
Fix mistakes than came along with r284139
2015-06-07 21:59:43 +00:00
Baptiste Daroussin
0958dffde2
Remove '-q' support for pw [user|group] next
...
the intent of -q in this command is to return as exit status the value of the
next group/user id, which does not make sense given exit status are limited to
values between 0 and 255.
2015-06-07 21:57:20 +00:00
Baptiste Daroussin
1718a38ffd
Fix setting uid/gid min/max via pw
2015-06-07 20:59:59 +00:00
Baptiste Daroussin
a68fbadb63
Fix generating configuration file
2015-06-07 20:44:06 +00:00
Baptiste Daroussin
91860967e2
Fix duplicate checking
2015-06-07 19:59:01 +00:00
Baptiste Daroussin
c40bbdb4af
Remove uneeded code (already done by pw_make_v7)
2015-06-07 19:39:06 +00:00
Baptiste Daroussin
bae068d22e
In case of rename validate the length of the new name
...
Check early that the new name fits MAXLOGNAME and store it in pwconf
2015-06-07 19:33:25 +00:00
Baptiste Daroussin
a923718979
Refactor input validation
...
Mutualize code to validate inputs of both 'user' and 'group' command
Test that the input name fits into MAXLOGNAME
2015-06-07 19:03:41 +00:00
Baptiste Daroussin
3438d7decf
Finish converting -7 to pwconf
2015-06-07 15:54:57 +00:00
Baptiste Daroussin
c86f7ad56d
Handle -7 via gloval pwconf
2015-06-07 15:33:08 +00:00
Baptiste Daroussin
bbe09b2e19
Initialize conf using menset(3)
2015-06-07 15:29:58 +00:00
Baptiste Daroussin
2166b4d190
Handle pretty print (-P) via global pwconf
2015-06-07 15:27:17 +00:00
Baptiste Daroussin
363cefdbb1
Handle dryrun (-N) via global pwconf
2015-06-07 15:09:53 +00:00
Baptiste Daroussin
be7f5ba991
Sort headers
2015-06-07 14:57:16 +00:00
Baptiste Daroussin
82a3c75aa8
Handle -C and -Y locally and stop adding them to arglist
2015-06-07 14:54:07 +00:00
Baptiste Daroussin
2cc63cd136
Add a new global struct pwconf to store etcpath, rootdir and struct userconf
...
Do not add anymore -R and -V to arglist
Add an error message if both -V and -R are set in arguments
2015-06-07 14:34:38 +00:00
Baptiste Daroussin
fe084e12a5
Fix pw userdel -r not deleting homedir
2015-06-07 14:32:52 +00:00
Baptiste Daroussin
a68be5f7eb
Test explicitly the result of strcmp to be consistent with the rest of the code
2015-06-07 11:38:26 +00:00
Baptiste Daroussin
fc606d2b2c
Improve readability by reducing indentations levels
2015-06-07 11:35:34 +00:00
Baptiste Daroussin
75a030d4f8
Remove one level of indentation
2015-06-07 11:30:33 +00:00
Baptiste Daroussin
581a66ea58
Move user deletion code into a separate function to improve readability
2015-06-07 11:26:28 +00:00
Baptiste Daroussin
1238a919d2
Instead of always casting the pw_checkname input to u_char * and casting it back
...
to char *, change pw_checkname to directly take char * in input
2015-06-07 10:57:02 +00:00
Glen Barber
a5b912ff43
Document pw(8) '-R' option, added in r283961.
...
MFC after: 1 week
X-MFC-after: r283961
Sponsored by: The FreeBSD Foundation
2015-06-03 19:17:45 +00:00
Baptiste Daroussin
ac72be285f
New pw -R rootdir option
...
This allows to set an alternate root directory in which the users/groups will be
manipulated
Requested by: gjb, ian
Tested by: gjb
2015-06-03 19:08:25 +00:00
Baptiste Daroussin
6138e089bc
Cast to gid_t for groups not uid_t
2015-05-31 22:12:31 +00:00
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
ee2582c212
Cast -1 to uid_t and bump WARNING level to 3
2015-05-31 21:44:09 +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
5710dc534c
Make pw_user()/pw_group() more consitent about errors
...
Some of errors were returned to the main function, some others caused a direct
exit via err(3).
The main function is only interested in EXIT_SUCCESS, so in all other cases
replace warn(3) + return err by err(3)
2015-05-31 11:23:19 +00:00
Baptiste Daroussin
850f836ad8
Remove uneeded intermediate variable
2015-05-31 10:18:10 +00:00
Baptiste Daroussin
e55af20b47
Remove uneeded intermediate variable
2015-05-31 10:14:13 +00:00
Baptiste Daroussin
197419154e
Use asprintf instead of malloc + snprintf and test the memory allocation
2015-05-31 10:02:01 +00:00
Baptiste Daroussin
6b6b47d0e3
Remove dead declaration
...
PR: 195928
MFC after: 2 days
2015-05-29 10:07:20 +00:00
Simon J. Gerraty
98e0ffaefb
Merge sync of head
2015-05-27 01:19:58 +00:00
Baptiste Daroussin
234626f722
Remove extendline definition
...
Remove now unused PWBUFSZ define
2015-05-10 11:24:16 +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
35ddfb6d6c
The pwdb function is only used once to check the database rename it
...
pwdb_check and simplify it accordingly
2015-05-10 09:23:03 +00:00
Baptiste Daroussin
b1a215787d
if the check of the pw db fails return the failed value
2015-05-10 09:11:12 +00:00
Baptiste Daroussin
ee348c32ad
Some style(9) fixes
2015-05-10 09:02:15 +00:00
Baptiste Daroussin
2518db8bb0
Replace sprintf(3) with snprintf(3)
2015-05-09 22:48:48 +00:00
Baptiste Daroussin
5d8ece9a4b
Use snprintf(3) instead of sprintf(3)
...
Remove useless "else"
2015-05-09 22:43:44 +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
4bc8ff0802
Remove some uneeded headers
2015-05-09 19:29:55 +00:00
Baptiste Daroussin
ce82bf7261
Remove unneeded headers
2015-05-09 19:22:33 +00:00
Baptiste Daroussin
b2298745ac
Replace malloc(3) + strcpy(3) + strcat(3) by asprintf(3)
2015-05-09 19:12:16 +00:00
Baptiste Daroussin
0602630cc7
Use snprintf(3) instead of strcpy(3) + strncat(3)
2015-05-09 19:09:34 +00:00
Baptiste Daroussin
a8e37ee0ac
Use sbuf(9) instead of homebrewed buffered string
2015-05-09 19:00:16 +00:00
Brad Davis
2cf395883e
Fix a race condition by allowing up to 5 seconds of difference between the time stamps.
...
PR: 197861
Approved by: will
2015-02-24 22:22:06 +00:00
Brad Davis
258e07800c
Add tests for account and password expiration.
...
Approved by: will
2015-02-17 14:48:16 +00:00
Brad Davis
cec1a873d7
Really fix the pw_usernext tests.
...
PR: 197612
Approved by: will
2015-02-15 21:42:10 +00:00
Brad Davis
270d667cd2
Remove an extra curly bracket that was causing intermittent failures.
...
PR: 197612
Submitted by: Robert O'Niel <oneil.rs@gmail.com>
Approved by: will
2015-02-14 18:22:31 +00:00
Brad Davis
e9cc10049e
Add tests for `pw usernext'.
...
PR: 197120
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will
2015-02-09 21:15:52 +00:00
Baptiste Daroussin
4b2b10bd25
Revert r277652
...
uid and gid are never and should never be negative. The pw(8) manpage clearly
states the -u and -g arguments are for uids/gids, hence using negative values is
abusing a bug in former versions of pw(8)
2015-01-26 16:50:42 +00:00
Baptiste Daroussin
70a89b8588
Allow negative numbers in -u and -g options
...
PR: 196514
MFC after: 1 week
2015-01-24 19:13:03 +00:00
Brad Davis
d03f0c5199
Add tests for pw -N
...
PR: 150449
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will
2014-12-16 14:50:33 +00:00
Brad Davis
c3baf459e6
Restructure to make it easier to extend in the future
...
Reviewed by: will
Suggested by: ngie
2014-12-09 23:26:47 +00:00
Brad Davis
6e740aa64a
Add some tests for user modification. [1]
...
Fix a missing test in the Makefile from my previous commit.
PR: 195834 [1]
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will
2014-12-09 22:11:56 +00:00
Brad Davis
bfce762f3f
Break out the tests into a file per command and clean up some long lines
...
Approved by: will
2014-12-09 21:43:03 +00:00
Brad Davis
2ffc3ce50a
Add more tests for pw(8) useradd.
...
PR: 195832
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will
2014-12-09 20:36:07 +00:00
Brad Davis
a736c8ae2a
Convert to LIBADD.
...
Reviewed by: bapt
2014-11-24 21:49:01 +00:00
Brad Davis
ecc3c92f90
Replace the pw(1) calls with a variable, to make it easier to to change across all the tests as needed.
...
Reviewed by: will
2014-11-19 23:07:46 +00:00
Simon J. Gerraty
9268022b74
Merge from head@274682
2014-11-19 01:07:58 +00:00
Brad Davis
f3bcbf2399
Clean up some language
...
Reviewed by: will
2014-11-17 15:44:00 +00:00
Brad Davis
45ba9627e4
Add a test for locking and unlocking user accounts
...
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Reviewed by: will
2014-11-15 05:12:30 +00:00
Baptiste Daroussin
90edef4fe0
Fix wrong message when using pw -V with a non existent directory
...
Add a regression test about it
PR: 194971
Submitted by: Freddy DISSAUX <bugzilla@dsx.bsdsx.fr>
2014-11-12 22:27:53 +00:00
Enji Cooper
e5f33ae3e7
Require root when running the pw_delete and pw_modify test programs (pw(8)
...
requires it)
2014-11-03 09:26:39 +00:00
Enji Cooper
bf1e083e01
Integrate usr.sbin/useradd/t_useradd.sh from NetBSD into FreeBSD as pw_test
...
- Suffix useradd/userdel commands with pw
- Remove the atf_expect_fail for bin/39546
Phabric: D921
Reviewed by: brd
Sponsored by: EMC / Isilon Storage Division
2014-11-03 06:07:55 +00:00
Baptiste Daroussin
6e6c53f063
Fix renaming a group via the gr_copy function
...
Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod
PR: 187189
Reported by: mcdouga9@egr.msu.edu
Tested by: mcdouga9@egr.msu.edu
Patch by: Marc de la Gueronniere
2014-10-28 16:27:29 +00:00
Baptiste Daroussin
0def1c7441
Ensure pw userdel -u <invalid> do not try to remove root
...
Check the uid passed is actually a number as early as possible
MFC after: 1 week
2014-10-28 15:46:22 +00:00
Baptiste Daroussin
3b640d6bfc
Fix atf syntax
2014-10-28 15:33:15 +00:00
Baptiste Daroussin
156ebc2878
Do not delete the group wheel when bad argument is passed to pw groupdel -g
...
Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel
Add a regression test about it
PR: 90114
Reported by: bkoenig@cs.tu-berlin.de
MFC after: 1 week
2014-10-28 14:54:04 +00:00
Baptiste Daroussin
6697d7663b
Fix a regression in pw usermod -G list
...
The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.
While here add a regression test about this bug
PR: 185666
Reported by: sub.mesa@gmail.com
MFC after: 1 week
2014-10-28 14:19:17 +00:00
Baptiste Daroussin
fb7830888d
When a group is renamed then the group has been invalidated for sure.
...
In that case get the group information using the new name.
Add a regression test about this bug
PR: 193704
Reported by: az
2014-10-28 11:20:30 +00:00
Dag-Erling Smørgrav
25f5ad760c
Two more places where login_setcryptfmt() defaults to MD5 were missed
...
in r252688.
MFC after: 3 days
2014-10-09 17:39:11 +00:00
Brad Davis
4630309ca3
- Add some tests for modifying groups
...
Reviewed by: will
2014-10-06 00:16:23 +00:00
Brad Davis
a85f6c3043
- Add a test for bug 191427 where pw(8) will go into an infinite loop
...
Reviewed by: will
MFC after: 1 month
2014-10-02 19:53:37 +00:00
Simon J. Gerraty
ee7b0571c2
Merge head from 7/28
2014-08-19 06:50:54 +00:00
Mateusz Guzik
75ad9daa46
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
2014-06-27 18:51:19 +00:00
Baptiste Daroussin
b425ee4eb7
Fix changing the username
...
PR: 189172
Submitted by: fullermd@over-yonder.net
MFC after: 1 week
2014-06-20 10:38:08 +00:00
Baptiste Daroussin
113f96dd0b
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
2014-06-20 10:34:32 +00:00
Simon J. Gerraty
fae50821ae
Updated dependencies
2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab
Updated dependencies
2014-05-10 05:16:28 +00:00
Simon J. Gerraty
3b8f084595
Merge head
2014-04-28 07:50:45 +00:00
Baptiste Daroussin
c145c34c09
Simplify reading pw.conf(5) by using getline(3)
2014-04-22 21:07:56 +00:00
Devin Teske
933db55545
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>
2014-03-13 18:16:42 +00:00
Julian Elischer
bbd054cb33
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
2014-03-06 19:58:03 +00:00
Julian Elischer
5691bbf05d
Stop pw(8) from segfaulting when given certain input
...
PR:187310
Submitted by: Kim Shrier
Obtained from: bug
MFC after: 1 week
2014-03-06 19:26:08 +00:00
Simon J. Gerraty
d1d0158641
Merge from head
2013-09-05 20:18:59 +00:00
Dag-Erling Smørgrav
d28832a05e
Fall back to sha512 if passwd_format is not set.
...
MFC after: 3 days
2013-07-04 07:59:11 +00:00
Dag-Erling Smørgrav
a05aa38cb1
There is no reason to disallow setting the password or account expiry
...
date to the current date.
MFC after: 3 days
2013-07-03 09:48:24 +00:00
Tim Kientzle
1d47232e08
Fix -Wunsequenced warning
...
Submitted by: dt71@gmx.com
2013-06-29 15:54:17 +00:00
Joel Dahl
37b983c09b
mdoc sweep
2013-05-13 18:13:50 +00:00
Simon J. Gerraty
7cf3a1c6b2
Updated dependencies
2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209
Updated dependencies
2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b
Sync with HEAD.
2013-02-08 16:10:16 +00:00
Daniel Eischen
605e5bbc41
Prevent a null pointer dereference in pw userdel when deleting
...
a user whose group != username.
2013-02-01 05:19:49 +00:00
Eitan Adler
535460c7dc
Remove unused variables
...
Approved by: cperciva
MFC After: 3 days
2013-01-16 05:03:49 +00:00
Mateusz Guzik
1f09eec3f8
pw: free group returned by gr_add
2013-01-06 21:56:58 +00:00
Baptiste Daroussin
b3075010f8
Simplify vnextgrent and vnextpwent reusing pw_scan and gr_scan from libutil.
2012-12-27 19:43:29 +00:00
Baptiste Daroussin
0c50344969
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>
2012-12-27 14:44:13 +00:00
Baptiste Daroussin
460a6dac0b
Simplify the code by using the new gr_add function
2012-12-27 14:35:06 +00:00
Baptiste Daroussin
ae61f4dda6
Simplify copying of group members by using memcpy
...
Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
2012-12-26 23:16:24 +00:00
Baptiste Daroussin
c195c1ba19
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>
2012-12-26 23:14:33 +00:00
Baptiste Daroussin
0083d61abc
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.
2012-12-26 18:28:17 +00:00
Baptiste Daroussin
dc0f2b4217
Fix creating a user and adding it to a group
...
Reported by: "Sam Fourman Jr." <sfourman@gmail.com>, dim
2012-12-26 18:14:45 +00:00
Eitan Adler
fa65b91ab3
Simplify string duplication: use strdup instead of malloc + strcpy
...
Submitted by: db
Approved by: cperciva
MFC after: 2 weeks
2012-12-05 13:56:56 +00:00
Eitan Adler
dae7204032
Avoid overflowing the file buffer
...
Submitted by: db
Approved by: cperciva
MFC after: 2 weeks
2012-12-05 13:56:52 +00:00
Eitan Adler
91d073903e
Use strdup instead of malloc + strcpy
...
Submitted by: db
Approved by: cperciva
MFC after: 2 weeks
2012-12-05 13:56:49 +00:00
Eitan Adler
6c3c59886c
Avoid overflow of file buffer
...
Submitted by: db
Approved by: cperciva
MFC after: 2 weeks
2012-12-05 13:56:46 +00:00
Eitan Adler
61fd27bb3b
Remove useless check for NULL prior to free.
...
Approved by: cperciva
MFC after: 2 weeks
2012-12-05 13:56:43 +00:00
Baptiste Daroussin
4efe6c741d
In NIS mode first chmod(2) the temporary file and is succeed then rename(2)
2012-11-20 14:05:46 +00:00
Baptiste Daroussin
7a43850530
Correctly set the password file mode after renaming in NIS mode
2012-11-20 10:59:41 +00:00
Simon J. Gerraty
23090366f7
Sync from head
2012-11-04 02:52:03 +00:00
Baptiste Daroussin
fb2db03194
Teach pw(8) about how to use pw/gr API to reduce code duplication
...
MFC after: 2 months
2012-10-30 08:00:53 +00:00
Baptiste Daroussin
e7e5ec8773
Do not treat empty name as an uid 0
...
Reported by: Robert Bonomi <bonomi@mail.r-bonomi.com>
2012-10-01 17:00:33 +00:00
Baptiste Daroussin
e6e9c14bdf
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
2012-10-01 16:42:07 +00:00
Kevin Lo
ba670ce023
Make sure that each va_start has one and only one matching va_end,
...
especially in error cases.
2012-09-28 07:51:30 +00:00
Marcel Moolenaar
7750ad47a9
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
...
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Kevin Lo
29dcf726d2
Handle NULL return from crypt(3). Mostly from DragonFly
2012-02-22 06:27:20 +00:00
Kevin Lo
76a387fbba
readlink len-1
2012-02-14 10:17:03 +00:00
Ulrich Spörlein
3df5ecac8c
Spelling fixes for usr.sbin/
2011-12-30 10:58:14 +00:00
Eitan Adler
19e1bf2997
- 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
2011-12-22 03:36:54 +00:00
Dimitry Andric
5893527d84
In usr.sbin/pw/pw_user.c, use the correct printf length modifier for a
...
ptrdiff_t.
MFC after: 1 week
2011-12-17 23:46:47 +00:00
Xin LI
cfc3f46787
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)
2011-07-31 03:00:00 +00:00
Xin LI
6a635ff4b4
Don't attempt to create the base directory when -d is specified.
...
MFC after: 1 month
2011-06-15 19:09:58 +00:00
Jung-uk Kim
644af48df6
Stop hard-coding default directory mode as 0777.
2011-03-08 20:13:29 +00:00
Jung-uk Kim
110df1daa0
Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
...
When the basehome does not exist, it creates all intermediate directories as
required, which is logically equivalent to mkdir(1) with -m and -p options.
However, it modifies all intermediate directories, not just the final home
directory unlike mkdir. This problem was introduced in two revisions, i.e.,
r1.59 (SVN r167919) and r1.60 (SVN r168044).
MFC after: 1 month
2011-02-04 19:49:02 +00:00
Ulrich Spörlein
0d9deed52c
mdoc: drop redundant .Pp and .LP calls
...
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Jung-uk Kim
85a3024411
Revert the unrelated patch crept in the previous commit.
2010-10-05 18:47:51 +00:00
Jung-uk Kim
e116381d02
Prefer pmap_unmapbios() over pmap_unmapdev(). The binary does not change
...
after this because pmap_unmapbios() is a macro for pmap_unmapdev() on amd64.
2010-10-05 18:38:23 +00:00
Ed Schouten
71ccf09269
The last big commit: let usr.sbin/ use WARNS=6 by default.
2010-01-02 11:07:44 +00:00
Ed Schouten
41d6f23028
Make pw(8) build without <utmp.h>.
...
The size of the username record in utmp files should not influence the
maximum username length. Right now ut_user/ut_name is big enough, so in
this case it's dead code anyway.
2009-12-06 01:27:28 +00:00