Page MenuHomeFreeBSD

adduser: Overhaul.
ClosedPublic

Authored by des on Apr 19 2024, 12:19 PM.
Tags
None
Referenced Files
F110747132: D44863.diff
Sat, Feb 22, 2:25 PM
F110744417: D44863.id137384.diff
Sat, Feb 22, 2:00 PM
F110741940: D44863.id137391.diff
Sat, Feb 22, 1:36 PM
Unknown Object (File)
Thu, Jan 30, 7:42 PM
Unknown Object (File)
Sun, Jan 26, 6:03 PM
Unknown Object (File)
Fri, Jan 24, 6:01 PM
Unknown Object (File)
Jan 20 2025, 12:05 PM
Unknown Object (File)
Oct 23 2024, 5:45 PM
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 Not Applicable
Unit
Tests Not Applicable

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