Vladimir Dronnikov (ybrnj80 at yandex dot ru) pointed out that my cleanup of
authorRob Landley <rob@landley.net>
Tue, 5 Sep 2006 14:00:21 +0000 (14:00 -0000)
committerRob Landley <rob@landley.net>
Tue, 5 Sep 2006 14:00:21 +0000 (14:00 -0000)
his code introduced a bug (an extra backslash in the CIFS mount string).

util-linux/mount.c

index 3e2f781921ce21c6c048ba34c0afb2ddea5a3139..3b95428a04eb56ba898d8f08562272d2fc92bf48 100644 (file)
@@ -253,8 +253,8 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
        return rc;
 }
 
-// Mount one directory.  Handles CIFS, NFS, loopback, autobind, and filesystem type
-// detection.  Returns 0 for success, nonzero for failure.
+// Mount one directory.  Handles CIFS, NFS, loopback, autobind, and filesystem
+// type detection.  Returns 0 for success, nonzero for failure.
 
 static int singlemount(struct mntent *mp, int ignore_busy)
 {
@@ -301,7 +301,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
 
                // compose new unc '\\server-ip\share'
 
-               s = xasprintf("\\\\%s\\%s",ip+3,strchr(mp->mnt_fsname+2,'\\'));
+               s = xasprintf("\\\\%s%s",ip+3,strchr(mp->mnt_fsname+2,'\\'));
                if (ENABLE_FEATURE_CLEAN_UP) free(mp->mnt_fsname);
                mp->mnt_fsname = s;