Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1324790

Re: [PATCH v2] unix: properly account for FDs passed over unix sockets

From Hannes Frederic Sowa <hannes@stressinduktion.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] unix: properly account for FDs passed over unix sockets
Date 2016-02-03 02:00 +0100
Message-ID <qXTXA-31B-5@gated-at.bofh.it> (permalink)
References (3 earlier) <qXOXT-7QE-11@gated-at.bofh.it> <qXPTY-5z-15@gated-at.bofh.it> <qXPTY-5z-13@gated-at.bofh.it> <qXR9o-S7-3@gated-at.bofh.it> <qXTXA-31B-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02.02.2016 23:11, Linus Torvalds wrote:
> [ sorry for the html mail, I'm out grocery shopping ]
>
> On Feb 2, 2016 13:55, "Hannes Frederic Sowa" <hannes@stressinduktion.org>
> wrote:
>>
>> I slightly tested the attached patch.
>
> Looks fine. I do wonder: if the only thing we use that "struct cred" for is
> to do that ->user lookup, maybe we should just use "struct user_struct"
> directly, and skip the cred entirely.
>
> Something like
>
>      fp->user = get_uid(current_user());
>
> and then
>
>      put_uid(fp->user);
>
> But I'm OK with that patch as is if you prefer it that way (maybe you want
> to use the cred to then test for root separately etc, out maybe there
> already was done use of cred as cred that I just missed when reading the
> patch on my phone..)

I don't see any reason to switch over to struct user_struct. I tested a 
patch and will send it out soon.

Bye,
Hannes

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2] unix: properly account for FDs passed over unix sockets David Herrmann <dh.herrmann@gmail.com> - 2016-02-02 18:40 +0100
  Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-02 19:30 +0100
    Re: [PATCH v2] unix: properly account for FDs passed over unix sockets Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-02 20:40 +0100
      Re: [PATCH v2] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2016-02-02 21:40 +0100
        Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-02 23:00 +0100
          Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-03 02:00 +0100
            Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-03 02:20 +0100
      Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-02 21:40 +0100
        Re: [PATCH v2] unix: properly account for FDs passed over unix sockets Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-02 21:50 +0100
          Re: [PATCH v2] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2016-02-02 22:00 +0100
            Re: [PATCH v2] unix: properly account for FDs passed over unix sockets Willy Tarreau <w@1wt.eu> - 2016-02-02 22:00 +0100
            Re: [PATCH v2] unix: properly account for FDs passed over unix sockets Linus Torvalds <torvalds@linux-foundation.org> - 2016-02-02 22:00 +0100
          Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-02 22:00 +0100
          RE: [PATCH v2] unix: properly account for FDs passed over unix  sockets David Laight <David.Laight@ACULAB.COM> - 2016-02-03 13:30 +0100
  Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Simon McVittie <simon.mcvittie@collabora.co.uk> - 2016-02-03 12:40 +0100
    Re: [PATCH v2] unix: properly account for FDs passed over unix sockets David Herrmann <dh.herrmann@gmail.com> - 2016-02-03 13:00 +0100
      Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Simon McVittie <simon.mcvittie@collabora.co.uk> - 2016-02-03 14:00 +0100
      Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-03 15:10 +0100
    Re: [PATCH v2] unix: properly account for FDs passed over unix  sockets Hannes Frederic Sowa <hannes@stressinduktion.org> - 2016-02-03 13:00 +0100

csiph-web