Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
rsh
netkit-rsh-0.17-fork_before_exec.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File netkit-rsh-0.17-fork_before_exec.patch of Package rsh
Index: rshd/rshd.c =================================================================== --- rshd/rshd.c.orig 2012-10-17 16:01:13.093594194 +0200 +++ rshd/rshd.c 2012-10-17 16:01:40.036397082 +0200 @@ -482,7 +482,28 @@ doit(struct sockaddr *fromp) close(pv[0]); dup2(pv[1], 2); close(pv[1]); + } else { + pid = fork(); + if (pid == -1) { + error("Can't fork; try again.\n"); + exit(1); + } + if (pid) { + close(0); + close(1); + close(2); + int status; + wait(&status); +#ifdef USE_PAM + pam_close_session(pamh, 0); + pam_end(pamh, PAM_SUCCESS); +#endif + exit(0); + /* NOTREACHED */ + } + setpgrp(); } + theshell = pwd->pw_shell; if (!theshell || !*theshell) { /* shouldn't we deny access? */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor