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 172581 Details for
Bug 254361
(micro-optimization) pam_xauth.c: one call to sysconf is enough
[?]
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]
one call to sysconf is enough
pam_xauth.c.micro-optimization.patch (text/plain), 722 bytes, created by
Sami Farin
on 2007-08-25 19:14:48 UTC
(
hide
)
Description:
one call to sysconf is enough
Filename:
MIME Type:
Creator:
Sami Farin
Created:
2007-08-25 19:14:48 UTC
Size:
722 bytes
patch
obsolete
>--- Linux-PAM-0.99.8.1/modules/pam_xauth/pam_xauth.c.bak 2006-01-22 17:40:58.000000000 +0200 >+++ Linux-PAM-0.99.8.1/modules/pam_xauth/pam_xauth.c 2007-08-25 21:57:02.392985706 +0300 >@@ -113,6 +113,8 @@ run_coprocess(const char *input, char ** > size_t j; > char *args[10]; > const char *tmp; >+ long nropen; >+ > /* Drop privileges. */ > setgid(gid); > setgroups(0, NULL); >@@ -124,7 +126,8 @@ run_coprocess(const char *input, char ** > * descriptors. */ > dup2(ipipe[0], STDIN_FILENO); > dup2(opipe[1], STDOUT_FILENO); >- for (i = 0; i < sysconf(_SC_OPEN_MAX); i++) { >+ nropen = sysconf(_SC_OPEN_MAX); >+ for (i = 0; i < nropen; i++) { > if ((i != STDIN_FILENO) && (i != STDOUT_FILENO)) { > close(i); > }
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 254361
: 172581