public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: Jan Rekorajski <baggins@sith.mimuw.edu.pl>
Cc: Linux kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] no RLIMIT_NPROC for root, please
Date: Tue, 28 Nov 2000 14:08:49 -0700 (MST)	[thread overview]
Message-ID: <200011282108.eASL8nd10539@webber.adilger.net> (raw)
In-Reply-To: <20001128214309.F2680@sith.mimuw.edu.pl> "from Jan Rekorajski at Nov 28, 2000 09:43:09 pm"

Jan R_korajski writes:
> Why is RLIMIT_NPROC apllied to root(uid 0) processes? It's not kernel job to
> prevent admin from shooting him/her self in the foot.

> -	if (atomic_read(&p->user->processes) >= p->rlim[RLIMIT_NPROC].rlim_cur)

By default, root has no real process limits anyways, so this test should
always succeed.  However, it would be nice to be _able_ to set process
limits on root for one reason or another.  Also, as we move towards more
secure systems, it is bad (IMHO) to special case root (uid=0) cases.
It just makes more to fix to get a system where root != god.

> root should be able to do fork() regardless of any limits,
> and IMHO the following patch is the right thing.

Then set the rlim_cur to unlimited, and blow your system up as you like.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-28 21:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-28 20:43 [PATCH] no RLIMIT_NPROC for root, please Jan Rekorajski
2000-11-28 20:52 ` Tigran Aivazian
2000-11-28 20:58   ` Tigran Aivazian
2000-11-28 21:11   ` Jan Rekorajski
2000-11-30  0:00     ` Pavel Machek
2000-11-30 21:24       ` Jan Rekorajski
2000-11-30 21:57       ` Tigran Aivazian
2000-11-28 21:08 ` Andreas Dilger [this message]
2000-11-28 21:11 ` Andreas Schwab
2000-11-28 21:20   ` Jan Rekorajski
2000-11-28 21:58     ` Alan Cox
2000-11-28 22:13       ` Frank v Waveren
2000-11-28 23:23         ` Miquel van Smoorenburg
2000-11-28 21:54 ` Alan Cox
2000-11-29  0:34   ` Jan Rekorajski

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=200011282108.eASL8nd10539@webber.adilger.net \
    --to=adilger@turbolinux.com \
    --cc=baggins@sith.mimuw.edu.pl \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox