Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 136004 Details for
Bug 199193
sys-auth/pam_console sys-libs/pam <=0.78 Console devices ownership privilege escalation (CVE-2007-1716)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pam-0.99.7.1-console-decrement.patch
pam-0.99.7.1-console-decrement.patch (text/plain), 1.85 KB, created by
Robert Buchholz (RETIRED)
on 2007-11-14 23:39:21 UTC
(
hide
)
Description:
pam-0.99.7.1-console-decrement.patch
Filename:
MIME Type:
Creator:
Robert Buchholz (RETIRED)
Created:
2007-11-14 23:39:21 UTC
Size:
1.85 KB
patch
obsolete
>--- Linux-PAM-0.99.7.1/modules/pam_console/pam_console.c.decrement 2006-05-10 11:32:40.000000000 +0200 >+++ Linux-PAM-0.99.7.1/modules/pam_console/pam_console.c 2007-03-23 11:14:53.000000000 +0100 >@@ -19,7 +19,7 @@ > * > * /var/run/console/<username> is used for reference counting > * and to make console authentication easy -- if it exists, then >- * <username> has console access. >+ * <username> is logged on console. > * > * A system startup script should remove /var/run/console/console.lock > * and everything in /var/run/console/ >@@ -560,7 +560,7 @@ > */ > int fd; > int count = 0; >- int err; >+ int err = PAM_SUCCESS; > int delete_consolelock = 0; > const char *username = NULL, *user_prompt; > char *lockfile = NULL; >@@ -605,7 +605,8 @@ > _pam_log(pamh, LOG_ERR, FALSE, > "\"impossible\" fstat error on %s", consolelock); > close(fd); >- err = PAM_SESSION_ERR; goto return_error; >+ err = PAM_SESSION_ERR; >+ goto decrement; > } > consoleuser = _do_malloc(st.st_size+1); > if (st.st_size) { >@@ -614,7 +615,7 @@ > "\"impossible\" read error on %s", consolelock); > err = PAM_SESSION_ERR; > close(fd); >- goto return_error; >+ goto decrement; > } > consoleuser[st.st_size] = '\0'; > } >@@ -627,23 +628,19 @@ > */ > console_run_handlers(pamh, FALSE, username, tty); > } >- } else { >- /* didn't open file */ >- err = PAM_SESSION_ERR; >- goto return_error; > } > } > >+decrement: > count = use_count(pamh, lockfile, -1, 1); > if (count < 1 && delete_consolelock) { > if (unlink(consolelock)) { > _pam_log(pamh, LOG_ERR, FALSE, > "\"impossible\" unlink error on %s", consolelock); >- err = PAM_SESSION_ERR; goto return_error; >+ err = PAM_SESSION_ERR; > } > } > >- err = PAM_SUCCESS; > return_error: > if (lockfile) free(lockfile); > if (consoleuser) free (consoleuser);
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 199193
: 136004