search for: auth_close_do_env

Displaying 1 result from an estimated 1 matches for "auth_close_do_env".

2006 Sep 18
1
BSD Auth: set child environment variables requested by login script [PATCH]
...+ } +} + +/* + * Wrapper around auth_close(): auth_close() changes the current environment + * as requested by the login script. To catch the setenv requests, we save + * the current environment and let auth_close() do the changes on an empty + * environment. unsetenv requests are lost. + */ +int +auth_close_do_env(Authctxt *authctxt, auth_session_t *as) +{ + extern char **environ; + char **env_orig; + int ret; + + env_orig = bsdauth_env_copy(); + environ[0] = NULL; + + ret = auth_close(as); + + /* environ now contains all setenv changes done by auth_close(). */ + authctxt->auth_env_mod = environ; + enviro...