Page MenuHomeFreeBSD

bintrans: disable argument permutation for qp and base64
AcceptedPublic

Authored by kevans on Jan 16 2025, 2:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 14, 5:51 AM
Unknown Object (File)
Sun, Mar 2, 1:58 PM
Unknown Object (File)
Sat, Feb 22, 3:53 PM
Unknown Object (File)
Wed, Feb 19, 12:55 PM
Unknown Object (File)
Feb 17 2025, 9:09 PM
Unknown Object (File)
Feb 11 2025, 9:11 PM
Unknown Object (File)
Feb 11 2025, 2:12 PM
Unknown Object (File)
Feb 6 2025, 6:23 PM
Subscribers

Details

Reviewers
pstef
bapt
emaste
Summary

Err on the side of caution and revert to the BSD-style getopt(3)
behavior for argument processing, as it's harder to go back and it's
not clear that this was strictly intentional.

This is the difference between base64 /COPYRIGHT -w 80 and
base64 -w 80 /COPYRIGHT.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Jan 16 2025, 2:50 PM

This looks reasonable to me but could it be that whatever base64 exists on typical Linux distros allows "incorrect" argument order?

This looks reasonable to me but could it be that whatever base64 exists on typical Linux distros allows "incorrect" argument order?

Hmm... I was basing it off of the port (which doesn't), but the coreutils base64 is indeed different from that (and there's also a perl script I've seen used in places) and does do the GNU-style permutation.

If there are at least some other implementations in common use that don't support GNU-style my preference is for your change to go in.

I'm in favor of this change, but the previous version is OK too.