Accepting request 405864 from Base:System
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/405864 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/man?expand=0&rev=64
This commit is contained in:
commit
7db92f22b2
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 24 10:06:32 UTC 2016 - werner@suse.de
|
||||
|
||||
- Give man(1) command a home that is let pager less(1) handle its
|
||||
history (boo#986211)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 21 15:04:48 UTC 2016 - bwiedemann@suse.com
|
||||
|
||||
|
12
wrapper.c
12
wrapper.c
@ -102,6 +102,8 @@ int main (int argc, char **argv, char *envp[])
|
||||
printf ("%s\n", wlp->run);
|
||||
#endif
|
||||
if (ruid == 0 || euid == 0) {
|
||||
static char *dummy_environ[] = { NULL };
|
||||
extern char **environ;
|
||||
struct passwd *pwd;
|
||||
char *cwd;
|
||||
|
||||
@ -142,6 +144,16 @@ int main (int argc, char **argv, char *envp[])
|
||||
return -EACCES;
|
||||
}
|
||||
free(cwd);
|
||||
|
||||
cwd = getenv("TERM");
|
||||
environ = dummy_environ;
|
||||
setenv("HOME", pwd->pw_dir, 1);
|
||||
setenv("PATH", "/bin:/usr/bin", 1);
|
||||
setenv("USER", pwd->pw_name, 1);
|
||||
setenv("LOGNAME", pwd->pw_name, 1);
|
||||
if (cwd)
|
||||
setenv("TERM", cwd, 1);
|
||||
envp = environ;
|
||||
}
|
||||
execve (wlp->run, argv, envp);
|
||||
perror ("execve");
|
||||
|
Loading…
Reference in New Issue
Block a user