pam_limits again...

Jakub Bogusz qboosh at prioris.mini.pw.edu.pl
Thu Feb 1 19:41:08 CET 2001


Some time ago I reported problem with pam_limits - this module compiled
with glibc 2.2 doesn't work on kernel 2.2.xx.

Now we have new pam, but problem remains the same.

This is because <bits/resource.h> from glibc 2.2 contains RLIMIT_LOCKS
and has RLIM_NLIMITS==11 (as in kernel 2.4).
init_limits() funtion contains:

    for(i = 0; i < RLIM_NLIMITS; i++)
        retval |= getrlimit(i, &pl->limits[i].limit);

on kernel 2.2 last getrlimit() (with RLIMIT_LOCKS) fails.

I think this problem should be fixed in PAM - maybe getrlimit shouldn't
be called with RLIMIT_LOCKS, or if it failed, shouldn't be considered
fatal error?

It could be also fixed in glibc (as baggins proposed), but then we
should have separate glibc versions for kernel 2.2 and 2.4...


See also: news:slrn97cr1n.1jo.joshua at pingwin.ani  (from pl.comp.os.linux)

-- 
Jakub Bogusz
http://prioris.mini.pw.edu.pl/~qboosh/



More information about the pld-devel-en mailing list