Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 17 Dec 2001 15:51:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 17 Dec 2001 15:50:53 -0500 Received: from c0mailgw.prontomail.com ([216.163.180.10]:22465 "EHLO c0mailgw02.prontomail.com") by vger.kernel.org with ESMTP id ; Mon, 17 Dec 2001 15:50:41 -0500 Message-ID: <3C1E5A88.57F5A68A@starband.net> Date: Mon, 17 Dec 2001 15:50:16 -0500 From: war X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.16 i686) X-Accept-Language: en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, Linus Torvalds , Alan Cox Subject: Limits broken in 2.4.x kernel. Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Problem: Per-user process limits to not work correctly with a 2.4.x kernel. Say I want to limit a user to [5] processes. Example: Edit [/etc/security/limits.conf] user hard nproc 5 -or- @group hard nproc 5 The result: The user cannot login. How to fix? Say the total number of user processes is always 100. This is never the case, however I am showing it only for example. Currently, you would have to set user or @group to 103, so the user would be limited to 3 processes. I was curious if this fix would ever be merged into the Linux Kernel so limits would actually work properly? Discussion: 1] set nproc to 4 2] try to login -> you cant login if there are more than 4 procs running on the system war: that bug is known war: I fixed it a while ago in -ac war: the problem is as follows 1) login applies the rlimit to itself 2) login forks and changes UID 3) login exec()s the shell of course, step 2) will fail because it set the maximum number of processes on itself riel, so in the fixed version, if I set a user/group limit to 3 proc, ten the user will only be able to launch 3 proc, right? war: exactly riel, is this fixed in 2.4.17? s/is/will war: dunno if the fix got carried over from -ac riel, I would have never been able to say 'damn thats a bug' - thanks for the information btw. war: I tracked it down some time ago and fixed it for Conectiva 7.0's release ;) also sent it to Linus and Alan the same day, but of course only Alan applied it riel, can you post that information to LKML since you know the exact problem and see what linus says? war: Linus said nothing and won't say anything war: as far as I'm concerned the problem is all yours feel free to use my info to try to convince Linus riel, but isn't it considered broken then? I mean it doesn't work right, heh. yes, I consider it broken war: but ... if you want to get the fix integrated, you'll have to do it yourself war: I think http://surriel.com/patches/ has the patch somewhere war: then you can try to get the thing merged with Linus riel, btw if you use a group with limits.conf, it should effect each person in that group individually and not the group as a whole right? war: indeed - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/