Simple solution
Simple solution
Posted Nov 28, 2024 8:04 UTC (Thu) by rrolls (subscriber, #151126)Parent article: The kernel's command-line commotion
Add a new version of fexecve/execveat which takes an arbitrary string to be placed on `comm` in addition to the file descriptor.
Programs wishing to use this instead of execve, when the original path is a symlink, can get the basename of the original path themselves, do whatever opening and checking they like of the contents of the file, then pass that basename to be stored in `comm`.
Everyone wins.