Add support for setenv entries in login.conf. We can't use LOGIN_SETENV

since the plugin sets up the envp the command is executed with.
Also regen the Makefile.in files while here.  Fixes bug #527
This commit is contained in:
Todd C. Miller
2011-12-05 10:43:44 -05:00
parent 38a4990e4a
commit 9f0abb4692
13 changed files with 550 additions and 267 deletions

View File

@@ -197,6 +197,7 @@ struct lbuf;
struct passwd;
struct stat;
struct timeval;
struct login_cap;
/*
* Function prototypes
@@ -305,6 +306,7 @@ void init_envtables(void);
void insert_env_vars(char * const envp[]);
void read_env_file(const char *, int);
void rebuild_env(void);
void sudo_setenv(const char *var, const char *val, int dupcheck);
void validate_env_vars(char * const envp[]);
/* fmt_string.c */
@@ -328,6 +330,9 @@ int group_plugin_query(const char *user, const char *group,
/* setgroups.c */
int sudo_setgroups(int ngids, const GETGROUPS_T *gids);
/* login_cap.c */
int sudo_login_setenv(struct login_cap *lc, const struct passwd *pwd);
#ifndef _SUDO_MAIN
extern struct sudo_user sudo_user;
extern struct passwd *list_pw;