Page MenuHomeFreeBSD

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

Authored by des on May 6 2024, 12:00 PM.
Tags
None
Referenced Files
F113955115: D45098.id138157.diff
Sun, Apr 6, 3:55 AM
F113923935: D45098.id138159.diff
Sat, Apr 5, 4:35 PM
Unknown Object (File)
Mon, Mar 24, 9:08 AM
Unknown Object (File)
Feb 22 2025, 8:44 PM
Unknown Object (File)
Jan 25 2025, 5:05 PM
Unknown Object (File)
Jan 20 2025, 2:50 PM
Unknown Object (File)
Jan 17 2025, 10:03 PM
Unknown Object (File)
Jan 8 2025, 9:02 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 57595
Build 54483: arc lint + arc unit

Event Timeline

des requested review of this revision.May 6 2024, 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.May 6 2024, 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.May 6 2024, 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.May 6 2024, 3:26 PM