Add simple API for to allow reading environment data from different sources.

Currently, this is used to read a file like /etc/environment.
This commit is contained in:
Todd C. Miller
2019-02-20 17:05:02 -07:00
parent f3344b5881
commit e1205f08d6
2 changed files with 141 additions and 33 deletions

View File

@@ -377,6 +377,7 @@ int sudoers_hook_getenv(const char *name, char **value, void *closure);
int sudoers_hook_putenv(char *string, void *closure);
int sudoers_hook_setenv(const char *name, const char *value, int overwrite, void *closure);
int sudoers_hook_unsetenv(const char *name, void *closure);
void register_env_file(void * (*ef_open)(const char *), void (*ef_close)(void *), char * (*ef_next)(void *, int *), bool system);
/* env_pattern.c */
bool matches_env_pattern(const char *pattern, const char *var, bool *full_match);