FreeBSD Bugzilla – Attachment 150650 Details for
Bug 195984
[jail] security bug in jail utility: setgid missing/fails during creation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add setgid
command.c.diff (text/plain), 551 bytes, created by
Jamie Gritton
on 2014-12-16 18:14:17 UTC
(
hide
)
Description:
patch to add setgid
Filename:
MIME Type:
Creator:
Jamie Gritton
Created:
2014-12-16 18:14:17 UTC
Size:
551 bytes
patch
obsolete
>Index: usr.sbin/jail/command.c >=================================================================== >--- usr.sbin/jail/command.c (revision 275831) >+++ usr.sbin/jail/command.c (working copy) >@@ -667,6 +667,11 @@ > if (term != NULL) > setenv("TERM", term, 1); > } >+ if (setgid(pwd->pw_gid) < 0) { >+ jail_warnx(j, "setgid %d: %s", pwd->pw_gid, >+ strerror(errno)); >+ exit(1); >+ } > if (setusercontext(lcap, pwd, pwd->pw_uid, username > ? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN > : LOGIN_SETPATH | LOGIN_SETENV) < 0) {
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 195984
:
150594
| 150650