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

@@ -201,7 +201,8 @@ struct sudo_user {
#define MODE_PRESERVE_ENV 0x00400000
#define MODE_NONINTERACTIVE 0x00800000
#define MODE_IGNORE_TICKET 0x01000000
#define MODE_POLICY_INTERCEPTED 0x02000000
#define MODE_UPDATE_TICKET 0x02000000
#define MODE_POLICY_INTERCEPTED 0x04000000
/* Mode bits allowed for intercepted commands. */
#define MODE_INTERCEPT_MASK (MODE_RUN|MODE_NONINTERACTIVE|MODE_IGNORE_TICKET|MODE_POLICY_INTERCEPTED)