/* * Created by yuuta on 12/23/22. */ #ifndef SECDESK_COMMON_H #define SECDESK_COMMON_H #include #include enum modes { /* Yes / No on action . */ mode_consent, /* Enter your password for . * The program will have a copy of your password. */ mode_password, /* Enter username and password for . * The program will neither know your password nor have access to your account. * It just knows who you are. */ mode_auth }; struct auth_env { enum modes mode; uid_t usr; pid_t pid; const char *prompt; char exe[PATH_MAX + 1]; }; struct proc_env { int in; int out; int err; int vt; }; extern struct proc_env p_env; extern struct auth_env a_env; int sd_setup(void); void sd_cleanup(void); int main_consent(int secure); #endif /* SECDESK_COMMON_H */