All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: war <war@starband.net>
Cc: linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@transmeta.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Limits broken in 2.4.x kernel.
Date: 18 Dec 2001 00:11:07 +0100	[thread overview]
Message-ID: <shspu5dv3w4.fsf@charged.uio.no> (raw)
In-Reply-To: <3C1E5A88.57F5A68A@starband.net>
In-Reply-To: <3C1E5A88.57F5A68A@starband.net>

>>>>> " " == war  <war@starband.net> writes:

     > 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?

One thing I noticed when doing the BSD cred patch for 2.5.x is that
somebody broke the process accounting in 2.[45].x at least for the
case of reparent_to_init():
If you just charge current->user without moving over the process from
the old uid to the new uid (such as is done in kernel/sys.c with the
set_user() routine) then you risk seriously corrupting the counters.

I'm not sure really what the point was of setting the user in
reparent_to_init() in the first place, since it doesn't setreuid().

Cheers,
  Trond

  reply	other threads:[~2001-12-17 23:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-17 20:50 Limits broken in 2.4.x kernel war
2001-12-17 23:11 ` Trond Myklebust [this message]
2001-12-17 23:58   ` Andrew Morton
2001-12-18 13:03     ` Trond Myklebust
2002-01-29  8:25       ` Andrew Morton
2001-12-18 14:59 ` Alan Cox
2001-12-18 16:10   ` Rik van Riel
2001-12-18 19:27     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=shspu5dv3w4.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=war@starband.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.