public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jordan Russell" <jr-list-kernel@quo.to>
To: "Giuliano Pochini" <pochini@shiny.it>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Small security bug with misconfigured access rights
Date: Wed, 28 Nov 2001 12:03:20 -0600	[thread overview]
Message-ID: <000901c17836$f6a88190$024d460a@neptune> (raw)
In-Reply-To: <XFMail.20011128163916.pochini@shiny.it>

Giuliano Pochini wrote:
> Well, I don't know if it is really a bug.
>
> Create a directory like this:
>
> # ls -la
> total 12
> drwxr-sr-x   2 pochini  root         4096 Nov 28 16:33 .
> drwxr-xr-x  32 pochini  users        8192 Nov 28 16:25 ..
>
> Sgid bit is set and the directory is owned by me and the
> group is root (yes, it shouldn't be).
>
> When I create a file here, it gets the root group even
> if I don't belong to it.

That's the correct behavior. Quoting "man mount":

       grpid or bsdgroups / nogrpid or sysvgroups
              These options define what group id a newly  created  file
gets.   When
              grpid  is  set,  it  takes the group id of the directory in
which it is
              created; otherwise (the default) it takes the fsgid of the
current pro-
              cess,  unless  the  directory  has the setgid bit set, in
which case it
              takes the gid from the parent directory, and also gets the
setgid  bit
              set if it is a directory itself.


Jordan Russell


      reply	other threads:[~2001-11-28 18:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1006876204.12313.linux-kernel2news@redhat.com>
2001-11-27 17:58 ` [PATCH] printk loglevel cleanup (again) Pete Zaitcev
2001-11-28 16:01   ` vda
2001-11-28 15:39     ` Small security bug with misconfigured access rights Giuliano Pochini
2001-11-28 18:03       ` Jordan Russell [this message]

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='000901c17836$f6a88190$024d460a@neptune' \
    --to=jr-list-kernel@quo.to \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pochini@shiny.it \
    /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