Stub out pivot_root() and unpivot_root() for all but the sudoers module.

This commit is contained in:
Todd C. Miller
2023-02-21 14:46:27 -07:00
parent 8b9c1b962f
commit 1bcddb9602
4 changed files with 47 additions and 8 deletions

View File

@@ -176,19 +176,20 @@ AUTH_OBJS = sudo_auth.lo @AUTH_OBJS@
LIBPARSESUDOERS_OBJS = alias.lo b64_decode.lo canon_path.lo defaults.lo \ LIBPARSESUDOERS_OBJS = alias.lo b64_decode.lo canon_path.lo defaults.lo \
digestname.lo exptilde.lo filedigest.lo gentime.lo \ digestname.lo exptilde.lo filedigest.lo gentime.lo \
gram.lo match.lo match_addr.lo match_command.lo \ gram.lo match.lo match_addr.lo match_command.lo \
match_digest.lo pivot.lo pwutil.lo pwutil_impl.lo \ match_digest.lo pwutil.lo pwutil_impl.lo \
redblack.lo strlist.lo sudoers_debug.lo timeout.lo \ redblack.lo strlist.lo sudoers_debug.lo timeout.lo \
timestr.lo toke.lo toke_util.lo timestr.lo toke.lo toke_util.lo
LIBPARSESUDOERS_IOBJS = $(LIBPARSESUDOERS_OBJS:.lo=.i) passwd.i LIBPARSESUDOERS_IOBJS = $(LIBPARSESUDOERS_OBJS:.lo=.i) passwd.i
SUDOERS_OBJS = $(AUTH_OBJS) audit.lo boottime.lo check.lo editor.lo env.lo \ SUDOERS_OBJS = $(AUTH_OBJS) audit.lo boottime.lo check.lo editor.lo \
sudoers_hooks.lo env_pattern.lo file.lo find_path.lo \ env.lo sudoers_hooks.lo env_pattern.lo file.lo \
fmtsudoers.lo gc.lo goodpath.lo group_plugin.lo interfaces.lo \ find_path.lo fmtsudoers.lo gc.lo goodpath.lo group_plugin.lo \
iolog.lo iolog_path_escapes.lo locale.lo log_client.lo \ interfaces.lo iolog.lo iolog_path_escapes.lo locale.lo \
logging.lo parse.lo policy.lo prompt.lo serialize_list.lo \ log_client.lo logging.lo parse.lo pivot.lo policy.lo \
set_perms.lo starttime.lo strlcpy_unesc.lo strvec_join.lo \ prompt.lo serialize_list.lo set_perms.lo starttime.lo \
sudo_nss.lo sudoers.lo timestamp.lo unesc_str.lo @SUDOERS_OBJS@ strlcpy_unesc.lo strvec_join.lo sudo_nss.lo sudoers.lo \
timestamp.lo unesc_str.lo @SUDOERS_OBJS@
SUDOERS_IOBJS = $(SUDOERS_OBJS:.lo=.i) SUDOERS_IOBJS = $(SUDOERS_OBJS:.lo=.i)

View File

@@ -56,6 +56,18 @@ init_eventlog_config(void)
return; return;
} }
bool
pivot_root(const char *new_root, int fds[2])
{
return true;
}
bool
unpivot_root(int fds[2])
{
return true;
}
int int
group_plugin_query(const char *user, const char *group, const struct passwd *pw) group_plugin_query(const char *user, const char *group, const struct passwd *pw)
{ {

View File

@@ -96,6 +96,20 @@ init_eventlog_config(void)
return; return;
} }
/* STUB */
bool
pivot_root(const char *new_root, int fds[2])
{
return true;
}
/* STUB */
bool
unpivot_root(int fds[2])
{
return true;
}
/* /*
* Look up the hostname and set user_host and user_shost. * Look up the hostname and set user_host and user_shost.
*/ */

View File

@@ -506,6 +506,18 @@ init_eventlog_config(void)
return; return;
} }
bool
pivot_root(const char *new_root, int fds[2])
{
return true;
}
bool
unpivot_root(int fds[2])
{
return true;
}
int int
set_cmnd_path(const char *runchroot) set_cmnd_path(const char *runchroot)
{ {