(do_login): set PATH to something sane;

(start_logout_process): avoid getting signals sent to the parent


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8985 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2000-08-22 14:07:44 +00:00
parent 8b9be353d7
commit 0c95f3d5dc

View File

@@ -77,8 +77,11 @@ start_logout_process(void)
argv0 = prog;
pid = fork();
if(pid == 0)
if(pid == 0) {
/* avoid getting signals sent to the shell */
setpgid(0, getpid());
return 0;
}
if(pid == -1)
err(1, "fork");
/* wait for the real login process to exit */
@@ -563,6 +566,8 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
krb4_get_afs_tokens (pwd);
#endif /* KRB4 */
add_env("PATH", _PATH_DEFPATH);
{
const char *str = login_conf_get_string("environment");
char buf[MAXPATHLEN];