Move tty_present() into policy.c as sudoers_tty_present().

This function is policy-dependent.  For the modern sudo front-end
it will simply check tcpgid and/or ttypath.
This commit is contained in:
Todd C. Miller
2023-08-25 11:19:42 -06:00
parent df969d30b4
commit 30fc288291
3 changed files with 18 additions and 17 deletions

View File

@@ -450,6 +450,7 @@ void sudoers_debug_deregister(void);
/* policy.c */
unsigned int sudoers_policy_deserialize_info(struct sudoers_context *ctx, void *v, struct defaults_list *defaults);
bool sudoers_policy_store_result(struct sudoers_context *ctx, bool accepted, char *argv[], char *envp[], mode_t cmnd_umask, char *iolog_path, void *v);
bool sudoers_tty_present(struct sudoers_context *ctx);
/* group_plugin.c */
void group_plugin_unload(void);