#! /bin/sh /usr/share/dpatch/dpatch-run ## 07_already_mounted_no_fspt_test.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: The check if a volume is already mounted must ignore the ## DP: target mount point. Else the case where a device is already ## DP: mounted elsewhere is never detected. @DPATCH@ diff -urNad libpam-mount-0.29~/src/mount.c libpam-mount-0.29/src/mount.c --- libpam-mount-0.29~/src/mount.c 2007-11-19 21:32:37.879858226 +0100 +++ libpam-mount-0.29/src/mount.c 2007-11-19 21:34:05.884453088 +0100 @@ -208,9 +208,7 @@ strcmp(fstype, "cifs") == 0 || strcmp(fstype, "ncpfs") == 0) ? strcasecmp : strcmp; - if (xcmp(fsname, dev) == 0 && - (strcmp(fspt, vpt->mountpoint) == 0 || - strcmp(fspt, real_mpt) == 0)) { + if (xcmp(fsname, dev) == 0) { mounted = 1; strncpy(mntpt, fspt, PATH_MAX); mntpt[PATH_MAX] = '\0'; @@ -274,8 +272,7 @@ * FIXME: Does BSD also turn "symlink mountpoints" into "real * mountpoints"? */ - if (xcmp(fsname, dev) == 0 && - strcmp(fspt, vpt->mountpoint) == 0) { + if (xcmp(fsname, dev) == 0) { mounted = 1; strncpy(mntpt, fspt, PATH_MAX); mntpt[PATH_MAX] = '\0';