Re: [security] mount: Read-only bind mount silent failure then misreporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 06, 2009 at 03:46:20PM +0100, Karel Zak wrote:
> On Fri, Nov 06, 2009 at 02:04:39PM +0000, Terry Burton wrote:
> > 3. Leave mount broken and refuse a combination of -o ro and --bind
> > arguments - "ERROR: Invalid argument for a --bind mount, -ro"
> 
>  the best solution seem to try to detect MS_BIND + MS_RDONLY and then
>  try to open() read-write any file in the target directory, and update
>  mtab according to the result from this test. And print any warning
>  if the target directory is still read-write.

I forgot note that 

   # mount --bind /foo /bar
   # mount -o remount,ro /bar

works as expected (/foo is rw and /bar is ro).

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux