Bug 254361 - (micro-optimization) pam_xauth.c: one call to sysconf is enough
Summary: (micro-optimization) pam_xauth.c: one call to sysconf is enough
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: pam
Version: rawhide
Hardware: All
OS: All
medium
low
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-25 19:14 UTC by Sami Farin
Modified: 2008-04-08 07:02 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-08 07:02:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
one call to sysconf is enough (722 bytes, patch)
2007-08-25 19:14 UTC, Sami Farin
no flags Details | Diff

Description Sami Farin 2007-08-25 19:14:48 UTC
Description of problem:
strace output looks retarded.
8-)

8321  21:13:18.491461 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024,
rlim_max=10*1024}) = 0 <0.000011>
8321  21:13:18.491513 close(622)        = -1 EBADF (Bad file descriptor) <0.000011>
8321  21:13:18.491564 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024,
rlim_max=10*1024}) = 0 <0.000011>
8321  21:13:18.491616 close(623)        = -1 EBADF (Bad file descriptor) <0.000011>


Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. enable pam_xauth.so in some module
2.
3.
  
Actual results:
many calls...

Expected results:
one call...

Additional info:
after patch:
22233 22:12:56.864605 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024,
rlim_max=10*1024}) = 0 <0.000013>
22233 22:12:56.864663 close(2)          = 0 <0.000013>
22233 22:12:56.864712 close(3)          = 0 <0.000014>
22233 22:12:56.864762 close(4)          = 0 <0.000013>
...

Comment 1 Sami Farin 2007-08-25 19:14:48 UTC
Created attachment 172581 [details]
one call to sysconf is enough

Comment 2 Tomas Mraz 2008-04-08 07:02:18 UTC
Applied to upstream CVS. Thank you.



Note You need to log in before you can comment on or make changes to this bug.