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

2 messages, 1 author, 2016-02-03 · open the first message on its own page

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

From: Hannes Frederic Sowa <hidden>
Date: 2016-02-03 00:57:18

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" [off-list ref]
wrote:
quoted
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

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

From: Hannes Frederic Sowa <hidden>
Date: 2016-02-03 01:13:03

On 03.02.2016 01:57, Hannes Frederic Sowa wrote:
On 02.02.2016 23:11, Linus Torvalds wrote:
quoted
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.
I meant that there is no reason not to switch over to struct 
user_struct. Patch is send out.

Thanks for looking into this!

Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help