Page MenuHomeFreeBSD

adduser: Fix confusion between `uclass` and `_class`.
ClosedPublic

Authored by des on Mon, May 6, 12:00 PM.
Tags
None
Referenced Files
F84130586: D45098.diff
Sun, May 19, 7:11 PM
Unknown Object (File)
Tue, May 14, 3:06 PM
Unknown Object (File)
Thu, May 9, 6:22 PM
Unknown Object (File)
Thu, May 9, 4:28 PM
Unknown Object (File)
Thu, May 9, 4:28 PM
Unknown Object (File)
Wed, May 8, 6:06 PM
Unknown Object (File)
Wed, May 8, 6:36 AM
Unknown Object (File)
Wed, May 8, 6:28 AM
Subscribers
None

Details

Summary

This caused adduser to produce an invalid pw(8) command line. Due to
bugs in pw(8), the command line was silently accepted and led to the
user being created, but locked out and with no home directory.

Fixes: 170d0882903e
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Mon, May 6, 12:00 PM
des created this revision.

I may not be the best reviewer for this change; I haven't used "local".

This revision is now accepted and ready to land.Mon, May 6, 1:11 PM

I applied this change (only) and ran the script; I got:

OK? (yes/no) [yes]:
adduser.fix: INFO: Successfully added (mike) to the user database.
local: Not in a function
Add another user? (yes/no) []:

I may not be the best reviewer for this change; I haven't used "local".

Perhaps, but you reported the bug and you can at least test the patch.

This revision now requires review to proceed.Mon, May 6, 1:23 PM

This version works (adds the user correctly and defaults to not adding another user). Tested only on UFS; will test on ZFS in an hour or so.

Works on ZFS too; dataset added and home directory set up correctly.

Can you please approve it, then?

Accepted, based mostly on Alan's previous approval.

This revision is now accepted and ready to land.Mon, May 6, 3:26 PM