FreeBSD Bugzilla – Attachment 146135 Details for
Bug 145009
rc.subr(8): rc.conf should allow mac label configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for rc.subr on 10.0-RELEASE-p7
su.c.patch (text/plain), 2.33 KB, created by
Kevin Barry
on 2014-08-21 22:54:21 UTC
(
hide
)
Description:
patch for rc.subr on 10.0-RELEASE-p7
Filename:
MIME Type:
Creator:
Kevin Barry
Created:
2014-08-21 22:54:21 UTC
Size:
2.33 KB
patch
obsolete
>--- su.c.orig 2014-08-19 12:59:16.385301498 -0400 >+++ su.c 2014-08-19 13:56:47.112915751 -0400 >@@ -158,15 +158,12 @@ > char * const *b; > } np; > uid_t ruid; >- pid_t child_pid, child_pgrp, pid; > int asme, ch, asthem, fastlogin, prio, i, retcode, > statusp, setmaclabel; > u_int setwhat; > char *username, *class, shellbuf[MAXPATHLEN]; > const char *p, *user, *shell, *mytty, **nargv; > const void *v; >- struct sigaction sa, sa_int, sa_quit, sa_pipe; >- int temp, fds[2]; > #ifdef USE_BSM_AUDIT > const char *aerr; > au_id_t auid; >@@ -425,66 +422,6 @@ > } > } > >- /* >- * We must fork() before setuid() because we need to call >- * pam_setcred(pamh, PAM_DELETE_CRED) as root. >- */ >- sa.sa_flags = SA_RESTART; >- sa.sa_handler = SIG_IGN; >- sigemptyset(&sa.sa_mask); >- sigaction(SIGINT, &sa, &sa_int); >- sigaction(SIGQUIT, &sa, &sa_quit); >- sigaction(SIGPIPE, &sa, &sa_pipe); >- sa.sa_handler = SIG_DFL; >- sigaction(SIGTSTP, &sa, NULL); >- statusp = 1; >- if (pipe(fds) == -1) { >- PAM_END(); >- err(1, "pipe"); >- } >- child_pid = fork(); >- switch (child_pid) { >- default: >- sa.sa_handler = SIG_IGN; >- sigaction(SIGTTOU, &sa, NULL); >- close(fds[0]); >- setpgid(child_pid, child_pid); >- if (tcgetpgrp(STDERR_FILENO) == getpgrp()) >- tcsetpgrp(STDERR_FILENO, child_pid); >- close(fds[1]); >- sigaction(SIGPIPE, &sa_pipe, NULL); >- while ((pid = waitpid(child_pid, &statusp, WUNTRACED)) != -1) { >- if (WIFSTOPPED(statusp)) { >- child_pgrp = getpgid(child_pid); >- if (tcgetpgrp(STDERR_FILENO) == child_pgrp) >- tcsetpgrp(STDERR_FILENO, getpgrp()); >- kill(getpid(), SIGSTOP); >- if (tcgetpgrp(STDERR_FILENO) == getpgrp()) { >- child_pgrp = getpgid(child_pid); >- tcsetpgrp(STDERR_FILENO, child_pgrp); >- } >- kill(child_pid, SIGCONT); >- statusp = 1; >- continue; >- } >- break; >- } >- tcsetpgrp(STDERR_FILENO, getpgrp()); >- if (pid == -1) >- err(1, "waitpid"); >- PAM_END(); >- exit(WEXITSTATUS(statusp)); >- case -1: >- PAM_END(); >- err(1, "fork"); >- case 0: >- close(fds[1]); >- read(fds[0], &temp, 1); >- close(fds[0]); >- sigaction(SIGPIPE, &sa_pipe, NULL); >- sigaction(SIGINT, &sa_int, NULL); >- sigaction(SIGQUIT, &sa_quit, NULL); >- > /* > * Set all user context except for: Environmental variables > * Umask Login records (wtmp, etc) Path >@@ -555,7 +492,6 @@ > > execv(shell, np.b); > err(1, "%s", shell); >- } > } > > static void
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 145009
:
104781
|
146135
|
146136