Page MenuHomeFreeBSD

adduser: Overhaul.
ClosedPublic

Authored by des on Apr 19 2024, 12:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 20, 12:28 AM
Unknown Object (File)
Fri, Jun 28, 6:29 AM
Unknown Object (File)
Sun, Jun 23, 8:14 PM
Unknown Object (File)
Jun 22 2024, 7:01 AM
Unknown Object (File)
Jun 22 2024, 2:55 AM
Unknown Object (File)
Jun 20 2024, 7:02 AM
Unknown Object (File)
Jun 16 2024, 4:12 AM
Unknown Object (File)
May 18 2024, 11:42 AM
Subscribers

Details

Summary

Most importantly:

  • Make local variables local.
  • Avoid unsafe use of -a and -o operators in test expressions.
  • Remove a hack intended to ease the transition from Perl 22 years ago.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57214
Build 54102: arc lint + arc unit

Event Timeline

des requested review of this revision.Apr 19 2024, 12:19 PM
allanjude added a subscriber: allanjude.

About time the FreeBSD 4.x perl compat bits went away, especially since they were not actually providing compatibility.

This revision is now accepted and ready to land.Apr 19 2024, 1:29 PM

Might want to also note that you've made a lot of variables local. I think that's a good change too, but best to note it or split it off into another commit.

This revision was automatically updated to reflect the committed changes.

LGTM. I flagged a few other optional nits.

usr.sbin/adduser/adduser.sh
62–63
67
265–266
357–358