2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Primitive set/restore permissions. Will be replaced by a push/pop

model.
This commit is contained in:
Todd C. Miller
2010-04-10 10:34:37 -04:00
parent 711b8d1c04
commit 744eae82e7
6 changed files with 82 additions and 35 deletions

View File

@@ -136,13 +136,14 @@ struct sudo_user {
/*
* Used with set_perms()
*/
#define PERM_ROOT 0x00
#define PERM_USER 0x01
#define PERM_FULL_USER 0x02
#define PERM_SUDOERS 0x03
#define PERM_RUNAS 0x04
#define PERM_FULL_RUNAS 0x05
#define PERM_TIMESTAMP 0x06
#define PERM_INITIAL 0x00
#define PERM_ROOT 0x01
#define PERM_USER 0x02
#define PERM_FULL_USER 0x03
#define PERM_SUDOERS 0x04
#define PERM_RUNAS 0x05
#define PERM_FULL_RUNAS 0x06
#define PERM_TIMESTAMP 0x07
#define PERM_NOEXIT 0x10 /* flag */
#define PERM_MASK 0xf0
@@ -236,6 +237,7 @@ int sudo_file_display_defaults(struct sudo_nss *, struct passwd *, struct lbuf *
int sudo_file_display_bound_defaults(struct sudo_nss *, struct passwd *, struct lbuf *);
int sudo_file_display_privs(struct sudo_nss *, struct passwd *, struct lbuf *);
int set_perms(int);
int restore_perms(void);
void remove_timestamp(int);
int check_secureware(char *);
void sia_attempt_auth(void);