Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 149466 Details for
Bug 225360
Sudo can hang with SELinux because sesh lacks signal handling
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
another patch proposed by sgrubb@redhat.com
sudo-1.6.7p5-sesh.patch (text/plain), 1.77 KB, created by
Peter Vrabec
on 2007-03-07 17:02:18 UTC
(
hide
)
Description:
another patch proposed by sgrubb@redhat.com
Filename:
MIME Type:
Creator:
Peter Vrabec
Created:
2007-03-07 17:02:18 UTC
Size:
1.77 KB
patch
obsolete
>diff -urp sudo-1.6.7p5.orig/sesh.c sudo-1.6.7p5/sesh.c >--- sudo-1.6.7p5.orig/sesh.c 2007-03-01 08:25:06.000000000 -0500 >+++ sudo-1.6.7p5/sesh.c 2007-03-01 08:45:37.000000000 -0500 >@@ -4,43 +4,61 @@ > #include <sys/types.h> > #include <sys/wait.h> > #include <errno.h> >+#include <signal.h> > > main (int argc, char **argv) { > char buf[PATH_MAX]; > pid_t pid; >+ struct sigaction sa; >+ sigset_t empty; >+ int i; >+ > if ( argc < 2 ) { > fprintf(stderr,"%s: Requires at least one argument\n", argv[0]); >- exit(-1); >+ return -1; > } > >+ /* Clear inherited signal settings and masks */ >+ sa.sa_flags = 0; >+ sigemptyset( &sa.sa_mask ); >+ sa.sa_handler = SIG_DFL; >+ for (i=1; i<NSIG; i++) >+ sigaction( i, &sa, NULL ); >+ sigemptyset( &empty ); >+ sigprocmask( SIG_SETMASK, &empty, NULL ); >+ > if ((pid = fork()) < 0) { > snprintf(buf, sizeof(buf), "%s: Couldn't fork",argv[0]); > perror(buf); >- exit(-1); >+ return -1; > } else if (pid > 0) { > /* Parent */ > int status; > int ret; > > do { >- if ((ret = waitpid(pid, &status, 0)) < 0 && errno == EINTR) >- continue; >- else if (ret < 0) { >- perror("waitpid failed"); >- exit(1); >- } >- } while (0); >+ ret = waitpid(pid, &status, WUNTRACED); >+ } while (ret < 0 && errno == EINTR); >+ >+ if (ret < 0) { >+ perror("waitpid failed"); >+ return 1; >+ } > > if (WIFEXITED(status)) > exit(WEXITSTATUS(status)); >+ else if (WIFSIGNALED(status)) >+ /* XXX print here like the shell would? */ >+ return (128 + WTERMSIG(status)); > else >- exit(1); >+ return 1; > } else { > /* Child */ > execv(argv[1], &argv[1]); > > snprintf(buf, sizeof(buf), "%s: Error execing %s", argv[0], argv[1]); > perror(buf); >- exit(-1); >+ return -1; > } > } >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225360
: 149466