}
}
+#if defined(__linux__) || defined(_AIX)
/*
* Read in /etc/environment ala AIX and Linux.
* Lines are in the form of NAME=VALUE
}
fclose(fp);
}
+#endif /* __linux__ || _AIX */
void
init_envtables()
if (chdir(runas_pw->pw_dir) == -1)
warning("unable to change directory to %s", runas_pw->pw_dir);
+#if defined(__linux__) || defined(_AIX)
/* Insert system-wide environment variables. */
read_env_file(_PATH_ENVIRONMENT);
+#endif
}
if (ISSET(sudo_mode, MODE_EDIT))
directory before running the shell. It also initializes the
environment, leaving I<DISPLAY> and I<TERM> unchanged, setting
I<HOME>, I<SHELL>, I<USER>, I<LOGNAME>, and I<PATH>, as well as
-the contents of F</etc/environment>. All other environment variables
-are removed.
+the contents of F</etc/environment> on Linux and AIX systems.
+All other environment variables are removed.
=item -K
=item F<@timedir@>C< >Directory containing timestamps
-=item F</etc/environment>C< >Initial environment for B<-i> mode
+=item F</etc/environment>C< >Initial environment for B<-i> mode on Linux and AIX
=back