[LTP] [PATCH v3 1/4] shell: Add tst_sudo.c helper
Cyril Hrubis
chrubis@suse.cz
Tue Dec 9 14:19:48 CET 2025
Hi!
> > I feel that the filename tst_sudo.c is a bit misleading. The helper
> > doesn’t
> > replicate sudo behavior (authentication, privilege escalation), it simply
> > drops from root to a fixed UID/GID before executing a command.
> >
> > So readers may expect a “sudo-like” elevation wrapper when, however
> > it’s a privilege-dropping trampoline.
> >
> > What about renaming it to:
> > tst_runas.c,
> > tst_runas_nobody.c, or
> > tst_drop_privs.c?
> >
>
>
> Personally, I prefer the tst_runas_nody.c because it reflects the
> default privilege,
> but due it supports the more env so contains "su" maybe better:
> tst_su_switch.c, tst_su_cmd.c
Maybe just tst_runas.c I think that 'runas' in the name is probably the
best description.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list