diff options
| author | Kyrylo Yatsenko <hedrok@gmail.com> | 2025-06-23 13:38:16 +0300 |
|---|---|---|
| committer | Kyrylo Yatsenko <hedrok@gmail.com> | 2025-06-23 13:38:16 +0300 |
| commit | 2a7decbdcb9920a67cef18b326ddd5d294a2cd00 (patch) | |
| tree | 4fe340544950822edf747dfc8579ceea8a17d8e7 /python | |
| parent | 74bb4ab312bbbce7a223d7fbb24cb742d05bf431 (diff) | |
| download | vyatta-cfg-2a7decbdcb9920a67cef18b326ddd5d294a2cd00.tar.gz vyatta-cfg-2a7decbdcb9920a67cef18b326ddd5d294a2cd00.zip | |
cli: T6769: check commit arguments
Check usage: `commit [comment COMMENTTEXT]`
Make any other option combination an error and don't
pass other arguments to inner scripts.
Before this commit command `commit` silently accepted any
number of arguments, moreover given
`spam1 comment hi1 spam2 comment hi2 spam3`
parsing script silently ignored first `comment hi1`, has written
`hi2` as comment and passed `spam1 spam2 spam3` to inner script.
There are two options for inner scripts:
/opt/vyatta/sbin/my_commit
Code in vyatta-cfg/src/cli_bin.cpp$
argv is used to check script name and passed to doCommit which ignores it
/usr/libexec/vyos/vyconf/bin/vy_commit
vyos-1x/python/vyos/vyconf_session.py
In similar way argv is used to determine script name
Both don't use any arguments, so passing and collecting other arguments
seems not needed and confusing
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions
