pam_limits again...

Jan Rekorajski baggins-pld at sith.mimuw.edu.pl
Fri Feb 2 15:35:17 CET 2001


[piątek, 02 luty 2001], Arkadiusz Miskiewicz napisał(a):

> On/Dnia Fri, Feb 02, 2001 at 03:11:59PM +0100, Jan Rekorajski wrote/napisał(a)
> > > I don't remember his posting about how to change (fix?) glibc. But why
> > > we need to fix glibc if it isn't broken?
> > 
> > It is. Glibc declares non existing limit - RLIMIT_LOCKS, it should
> > either not declare it when compiled/used with linux 2.2,
> see below
> 
> > or take care for it in get/setlimits().
> What is should do? check what version of kernel you are running?

In headers, see below.

> But from another point of view. If we change glibc behaviour to not declare
> RLIMIT_LOCKS when compiled with 2.2 kernel then we will have non-working
> pam_limits on linux 2.4.

Glibc uses kernel headers. Right?
Glibc can #ifdef KERNEL_VERSION in its own headers, Right?

Then in limits.h should be:
#ifdef 2.2 || 2.0
#define NLIMITS 10
else
#define NLIMITS 11
#endif

Got it?

Janek
-- 
Jan Rękorajski            |  ALL SUSPECTS ARE GUILTY. PERIOD!
baggins<at>mimuw.edu.pl   |  OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC              |                   -- TROOPS by Kevin Rubio



More information about the pld-devel-en mailing list