Displaying 1 result from an estimated 1 matches for "bsdauth_child_mod_env".
2006 Sep 18
1
BSD Auth: set child environment variables requested by login script [PATCH]
...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;
+ environ = env_orig;
+
+ return ret;
+}
+
+/* modify the child environment according to login script requests. */
+void
+bsdauth_child_mod_env(Authctxt *authctxt, char ***envp, u_int *envsizep)
+{
+ char **env_mod;
+ char name[8*1024]; /* MAXSPOOLSIZE in auth_session_t */
+ char *value;
+ u_int i, namelen;
+
+ env_mod = authctxt->auth_env_mod;
+
+ if (env_mod != NULL) {
+ for (i = 0; env_mod[i] != NULL; i++) {
+ namelen = str...