Re: [PATCH] Use update_mtab() when using -f to prevent duplicate entries from being created.

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

 



On Fri, Apr 13, 2007 at 07:28:25AM -0400, Mike Frysinger wrote:
> ---
>  mount/mount.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mount/mount.c b/mount/mount.c
> index 8e850b0..ea5ddc9 100644
> --- a/mount/mount.c
> +++ b/mount/mount.c
> @@ -759,7 +759,7 @@ update_mtab_entry(const char *spec, const char *node, const char *type,
>  		print_one (&mnt);
>  
>  	if (!nomtab && mtab_is_writable()) {
> -		if (flags & MS_REMOUNT)
> +		if (fake || (flags & MS_REMOUNT))
>  			update_mtab (mnt.mnt_dir, &mnt);
>  		else {
>  			mntFILE *mfp;


 Sorry, NAK.

 man mount (about -f):
    Causes everything to be done except for the actual system call;


 there is nothing about any other exception. It's root's mistake when
 add to mtab duplicate entry. The mount command prevents duplicate
 mounts for "mount -a" or MS_USER/MS_USERS only. I don't think that we
 need an exception for fake mounts. The fake mount has to work exactly
 like normal mount otherwise it's nonsense.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 
 Red Hat Czech s.r.o.
 Purkynova 99/71, 612 45 Brno, Czech Republic
 Reg.id: CZ27690016
-
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