Page MenuHomeFreeBSD

D36148.diff
No OneTemporary

D36148.diff

diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c
--- a/usr.sbin/daemon/daemon.c
+++ b/usr.sbin/daemon/daemon.c
@@ -42,6 +42,7 @@
#include <errno.h>
#include <libutil.h>
#include <login_cap.h>
+#include <paths.h>
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
@@ -465,6 +466,10 @@
if (setusercontext(NULL, pw, pw->pw_uid, LOGIN_SETALL) != 0)
errx(1, "failed to set user environment");
+
+ setenv("USER", pw->pw_name, 1);
+ setenv("HOME", pw->pw_dir, 1);
+ setenv("SHELL", *pw->pw_shell ? pw->pw_shell : _PATH_BSHELL, 1);
}
/*

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 9:04 AM (2 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35358363
Default Alt Text
D36148.diff (568 B)

Event Timeline