Add a way to run a command without updating the cached credentials.

This can also be used to test for whether or not the user's
credentials are currently cached.
This commit is contained in:
Todd C. Miller
2022-08-02 14:28:28 -06:00
parent 2d94d329cf
commit 556dacf1ff
9 changed files with 115 additions and 49 deletions

View File

@@ -1065,6 +1065,12 @@ format_plugin_settings(struct plugin_container *plugin)
unsigned int i = 0;
debug_decl(format_plugin_settings, SUDO_DEBUG_PCOMM);
/* We update the ticket entry by default. */
if (sudo_settings[ARG_IGNORE_TICKET].value == NULL &&
sudo_settings[ARG_UPDATE_TICKET].value == NULL) {
sudo_settings[ARG_UPDATE_TICKET].value = "true";
}
/* Determine sudo_settings array size (including plugin_path and NULL) */
plugin_settings_size = 2;
for (setting = sudo_settings; setting->name != NULL; setting++)