Page MenuHomeFreeBSD

bintrans: disable argument permutation for qp and base64
ClosedPublic

Authored by kevans on Jan 16 2025, 2:47 PM.
Tags
None
Referenced Files
F115985136: D48483.diff
Thu, May 1, 5:39 AM
Unknown Object (File)
Wed, Apr 30, 5:38 AM
Unknown Object (File)
Sun, Apr 20, 6:08 PM
Unknown Object (File)
Mon, Apr 14, 6:37 PM
Unknown Object (File)
Tue, Apr 8, 8:11 PM
Unknown Object (File)
Mar 14 2025, 5:51 AM
Unknown Object (File)
Mar 2 2025, 1:58 PM
Unknown Object (File)
Feb 22 2025, 3:53 PM
Subscribers

Details

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 Not Applicable
Unit
Tests Not Applicable

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.