Page MenuHomeVyOS Platform

Git commit-archive broken by T6975
In progress, NormalPublicBUG

Description

See my comment on https://vyos.dev/T6975#212925. The new feature introduced a restriction where rc_cmd (and other wrappers over popen) can only utilize strings and shell-based commands, rather than passing command/argument lists through to the underlying builtin Popen call. This also creates some weird behavior with the use_shell variable. If a caller explicitly says shell=False (as is the case with GitC in remote.py) the full command string will be interpreted as the full path to the program. This is a two-fold issue for the GitC#upload method with both passes a list and shell=False to the rc_cmd util function.

I'll be making a PR with my preferred fix, which will modify the vrf code from the linked issue to utilize a list by default and a shlex.join only if use_shell=True, however I am open to rewriting the GitC code instead to use shell commands if that is preferred by the maintainers. The only issue with my preferred fix is that I am unsure which form the auth argument to get_wrapper might take and if it needs shlex.split or similar to work in the list format.

Details

Version
1.5-rolling-202501210804
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)