Commit Graph

5 Commits

Author SHA1 Message Date
Todd C. Miller
737354390c Pass in directory to check_user_runchroot() and check_user_runcwd().
This way we do not rely on the runas_ctx global.
2023-08-14 13:25:13 -06:00
Todd C. Miller
a321e6cedf Add struct sudoers_runas_context and move runas-specific bits into it. 2023-08-12 14:20:30 -06:00
Todd C. Miller
d8b28dad97 Expand the user_* (and more) macros to user_ctx.foo. 2023-08-12 10:39:59 -06:00
Todd C. Miller
d1625f9c83 Only allow the user to specify -D or -R for the special "*" value.
The sudoers file must now explicitly allow the user to specify a
directory (sudo -D) or chroot (sudo -R) by setting cwd or chroot
to "*".  If a specific cwd or chroot value is set in sudoers, the
user may not use the -D or -R options, even if they match the value
in sudoers.
2023-07-10 14:30:40 -06:00
Todd C. Miller
01ad570e24 Move check_user_* functions to check_util.c so testsudoers can use them. 2023-06-30 10:43:18 -06:00