mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: bjorn@sparta.lu.se (Bjorn Wesen)
Cc: linux-kernel@vger.kernel.org
Subject: Re: setfsuid on ext2 weirdness (2.4)
Date: Mon, 8 Jan 2001 11:02:09 +0000 (GMT)	[thread overview]
Message-ID: <E14Fa43-0004IU-00@the-village.bc.nu> (raw)
In-Reply-To: <Pine.LNX.3.96.1010108025520.14610B-100000@medusa.sparta.lu.se> from "Bjorn Wesen" at Jan 08, 2001 02:55:30 AM

> Ok.. I'm going bananas. It could be a 4am braindeath or a rh7.0 bungholio
> but this is annoying:

There are lots of corner cases in the kernel that are probably a bit off

> main(int argc, char **argv)
> {
> 	int fd;
> 	setfsuid(atoi(argv[1]));
> 	fd = open("/etc/passwd", O_RDONLY);
> 	printf("got fd %d\n", fd);
> }
> 
> [root@wizball /root]# ./setfstest 0 
> got fd 3

(root)

> [root@wizball /root]# ./setfstest 500
> got fd 3

(fsuid==euid)

> [root@wizball /root]# ./setfstest 501
> got fd -1

(other)

perchance. If so does being uid 501 flip the behaviour around ?

> 

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

  reply	other threads:[~2001-01-08 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-08  1:55 Bjorn Wesen
2001-01-08 11:02 ` Alan Cox [this message]
2001-01-08 20:21 ` Linus Torvalds
2001-01-08 21:39   ` Kai Henningsen
     [not found] <200101082021.MAA04177@penguin.transmeta.com>
2001-01-08 20:31 ` Bjorn Wesen

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=E14Fa43-0004IU-00@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=bjorn@sparta.lu.se \
    --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

all inboxes | Powered by JetHome®