| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
When deleting a user, if its home directory does not belong to it, it should
not be removed. This is the promise that the manpage makes, the tool should
ensure that it respects that promise.
Add a regression test about it
PR: 244967
Submitted by: Eric Hanneken <eric@erichanneken.com>
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
cases for `pw useradd -D -w`.
PR: 231649
Reviewed by: eugen
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D17299
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two PRs (152084 & 210187) request allowing the "@" and/or "!"
characters in the passwd file GECOS field. The man page for pw does
not mention that those characters are disallowed, Linux supports those
characters in this field, and the "@" character in particular would be
useful for storing email addresses in that field.
PR: 152084, 210187
Submitted by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
Reported by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org>
Reviewed by: delphij (secteam), vangyzen
MFC after: 1 week
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14519
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previouly it was possible to create users with spaces in the name with:
pw useradd -u 1234 -g 1234 -n 'test user'
The "-g 1234" is relevant, without it the name was already rejected
as expected:
[fk@test ~]$ sudo pw useradd -u 1234 -n 'test user'
pw: invalid character ` ' at position 4 in userid/group name
Bug unintentionally found with a salt config without explicit name entry:
test user:
user.present:
- uid: 1234
- gid: 1234
- fullname: Test user
- shell: /usr/local/bin/bash
- home: /home/test
- groups:
- wheel
- salt
"Luckily" salt modules rarely bother with input validation either ...
PR: 221416
Submitted by: Fabian Keil
Obtained from: ElectroBSD
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"pw usermod someuser -G ''" is supposed make sure that someuser
doesn't have any secondary group memberships.
Previouly it was a nop because split_groups() only intitialised
"groups" if at least one group was specified. As a result the
existing secondary group memberships were kept.
PR: 221417
Submitted by: Fabian Keil
Obtained from: ElectroBSD
MFC after: 1 week
Relnotes: yes
|
|
|
|
|
|
|
|
| |
- groupshow: test out -a/-g/-n .
- usershow: test out -a/-n/-u .
MFC after: 1 week
Sponsored by: Dell EMC Isilon
|
|
|
|
|
| |
PR: 217934
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
naming scheme
usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test
to avoid collisions with the renamed FreeBSD test.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
|
| |
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
|
|
|
|
|
|
|
|
| |
It again reinstall missing skel files without overwriting changed one
Add a regression test about it
Reported by: ae
MFC after: 3 days
|
|
|
|
| |
Sponsored by: EMC / Isilon Storage Division
|
|
|
|
|
|
|
|
|
| |
"/dev/null"
PR: 211195
Submitted by: rday <ryan@ryanday.net>
Reported by: eniorm <eniorm@gmail.com>
MFC after: 1 day
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, it will silently disable the login for the selected account if
the argument is unrecognizable.
usr.sbin/pw/pw.h
usr.sbin/pw/pw_conf.c
usr.sbin/pw/pw_user.c
Use separate rules to validate boolean parameters and passwd
parameters. Error out if a password parameter cannot be parsed.
usr.sbin/pw/tests/Makefile
usr.sbin/pw/tests/crypt.c
usr.sbin/pw/tests/pw_useradd.sh
usr.sbin/pw/tests/pw_usermod.sh
Add tests for the validation. Also, enhance existing
password-related tests to actually validate that the correct hash is
written to master.passwd.
Reviewed by: bapt
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6840
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
after r298107
Summary of changes:
- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
namespacing is kept with FILES appropriately, and that this shouldn't need
to be repeated if the namespace changes -- only the definition of PACKAGE
needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
`tests`. In the event we get to the point where things can be split up
enough in the base system, it would make more sense to group the tests
with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.
MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
|
|\
| |
| |
| | |
Sponsored by: The FreeBSD Foundation
|
| |
| |
| |
| | |
Sponsored by: EMC / Isilon Storage Division
|
|/
|
|
| |
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
Add a regression test about it
PR: 204968
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
netbsd-tests.test.mk (r289151)
- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
|
|
|
|
| |
Reported by: "O. Hartmann" <ohartman@zedat.fu-berlin.de>
|
| |
|
|
|
|
| |
Add regression test about it
|
|
|
|
|
|
|
|
| |
Readd the function to create the parents home directory if it does not exists.
if it is only a directory at the top level of the hierarchy symlink it into /usr
as it used to be done before.
Reported by: kevlo, adrian
|
|
|
|
| |
Reported by: gjb
|
|
|
|
|
| |
While pw(8) on head is not affected it is worth adding more regression tests
ensuring this bug will not happen unnoticed in the futur
|
|
|
|
| |
This makes the regression tests pass on systems where time_t is 32bits
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now each subcommands checks its arguments in a dedicated functions.
This helps improving input validation, code readability/maintainability
While here:
- Add a -y option to pw userdel/usermod so it can maintain NIS servers if
nispasswd is not defined in pw.conf(5)
- Allow pw -r <rootdir> to remove directory with userdel -r
- Fix bug when renaming a user which was not renaming the user name it groups
it is a member of.
- Only parse pw.conf(5) when needed.
|
|
|
|
|
|
| |
First they are redundant with the tests we currently have on pw(8)
Second they to modify the host database instead of being self contained withing
the test directory
|
|
|
|
|
|
|
| |
UID_MAX/GID_MAX
PR: 173977
Reported by: nvass@gmx.com
|
|
|
|
|
|
|
|
| |
a name so do not try to convert it to an id if it is a numeric value
PR: 31933
Reported by: ted@impulse.net
Sponsored by: gandi.net
|
| |
|
| |
|
|
|
|
|
|
|
| |
Rewrite rm_r to use *at function, allowing to remove home directories along with
users. only crontabs and at(1) installation are not removed
Relnotes: yes
|
|
|
|
|
|
|
|
|
| |
functions
This allows to simplify the code a bit for -R by not having to keep modifying
path and also prepare the code to improve support -R in userdel
While here, add regression tests for the functionality
|
| |
|
|
|
|
|
| |
Use gr_add(3) when possible to avoid code duplication.
Use a simpler logic to delete members of a group
|
|
|
|
|
|
| |
of creating a user (regression from r285136)
Reported by: Fabian Keil <fk@fabiankeil.de>
|
|
|
|
|
|
| |
PR: 198554
Reported by: diaran <fbsd@centraltech.co.uk>
MFC after: 2 days
|
|
|
|
|
| |
Simplify the code, by only using one parser, ensure the dates (hours and dates)
are valid
|
|
|
|
| |
Use strptime_l(3) to validate the dates provided in input
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
Check early that the new name fits MAXLOGNAME and store it in pwconf
|
|
|
|
|
| |
Mutualize code to validate inputs of both 'user' and 'group' command
Test that the input name fits into MAXLOGNAME
|
|
|
|
|
|
|
| |
time stamps.
PR: 197861
Approved by: will
|
|
|
|
| |
Approved by: will
|
|
|
|
|
| |
PR: 197612
Approved by: will
|