Page MenuHomeFreeBSD

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

Authored by des on May 6 2024, 12:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 28 2024, 7:01 AM
Unknown Object (File)
Sep 28 2024, 7:00 AM
Unknown Object (File)
Sep 28 2024, 6:59 AM
Unknown Object (File)
Sep 28 2024, 6:59 AM
Unknown Object (File)
Sep 28 2024, 6:59 AM
Unknown Object (File)
Sep 23 2024, 5:12 AM
Unknown Object (File)
Sep 16 2024, 12:49 PM
Unknown Object (File)
Sep 16 2024, 12:07 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