public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@austin.rr.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cifs: handle termination of cifs oplockd kernel thread
Date: Fri, 29 Apr 2005 17:20:37 -0500	[thread overview]
Message-ID: <4272B335.5090207@austin.rr.com> (raw)
In-Reply-To: <20050429213108.GA15262@infradead.org>

Christoph Hellwig wrote:

>On Fri, Apr 29, 2005 at 04:09:09PM -0500, Steve French wrote:
>  
>
>>>does and who revied that?  Things like that don't have a business in the
>>>kernel, and certainly not as ioctl.
>>>      
>>>
>>Other filesystems such as smbfs had an ioctl that returned the uid of 
>>the mounter which they used (in the smbfs case in smbumount).  This was 
>>required by the unmount helper to determine if the unmount would allow a 
>>user to unmount a particular mount that they mounted.   Unlike in the 
>>case of mount, for unmount  you can not use the owner uid of the mount 
>>target to tell who mounted that mount.   I had not received any better 
>>suggestions as to how to address it.   I had proposed various 
>>alternatives - exporting in in /proc/mounts e.g.   
>>    
>>
>
>exporting the uid using the show_options superblock methods sounds like
>a much better option.
>
>  
>

>No.  /proc/self/mounts is an ASCII format, so there's no problem with
>differemt sizes.
>
>
>  
>

I agree that it would work for most cases [today, in 2.6 Linux] - but I 
really feel uncomfortable introducing a user space / kernel space 
dependency on the size of a field where none is needed - I am especially 
nervous because I can see from the Samba change logs that:
1) historically the size of this field changed
2) other operating systems also have either increased the size of uid 
(as MacOS e.g.) or mapped it (as Windows does) - to accomodate the 
needed concept of UUID (in large networks the current uid is too small)

Ideally I would have liked a general kernel call to be able to answer 
the question "Does the current security context match that of the 
mounter?"  because with SELinux, and the need to increase the size of 
uid or somehow work around it for distributed systems, it is hard for 
user space code to take something opaque (the thing that showmounts 
returns) and map it to what libc returns as the uid for current - 
otherwise it would be impossible for user space code to guarantee that 
it will match the kernel code, but this is so trivial, and has no 
sideeffects so in the interim this seems safer.



   

  reply	other threads:[~2005-04-29 22:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 21:09 [PATCH] cifs: handle termination of cifs oplockd kernel thread Steve French
2005-04-29 21:31 ` Christoph Hellwig
2005-04-29 22:20   ` Steve French [this message]
2005-05-11  8:56     ` Christoph Hellwig
2005-05-11 18:19       ` Steve French
2005-05-16  9:34         ` Christoph Hellwig
     [not found] <3YLdQ-4vS-15@gated-at.bofh.it>
2005-04-29 23:18 ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-30  7:32   ` Christoph Hellwig
2005-04-30  8:14     ` Miklos Szeredi
2005-04-30  8:29       ` Christoph Hellwig
2005-04-30  9:22         ` Miklos Szeredi
2005-04-30 10:57           ` Miklos Szeredi
2005-04-30 13:28             ` Steve French
2005-04-30 14:53               ` J. Bruce Fields
2005-04-30 14:50                 ` Steve French
2005-04-30 17:23                   ` Miklos Szeredi
2005-04-30 16:16               ` Miklos Szeredi
2005-04-30 15:27                 ` Steve French
2005-05-01  0:10               ` Bodo Eggert
2005-05-11  8:59           ` Christoph Hellwig
2005-04-30 12:52         ` Steve French

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=4272B335.5090207@austin.rr.com \
    --to=smfrench@austin.rr.com \
    --cc=hch@infradead.org \
    --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