diff --git a/psmisc-22.13-nfs4fuser.patch b/psmisc-22.13-nfs4fuser.patch index d79d92a..bd3c12e 100644 --- a/psmisc-22.13-nfs4fuser.patch +++ b/psmisc-22.13-nfs4fuser.patch @@ -542,7 +542,7 @@ + use = &name[0]; + } + -+ if (*use != '/') { /* sepcial file (socket, pipe, inotify) */ ++ if (*use != '/') { /* sepcial file (socket, pipe, inotify) */ + struct stat st; + if (timeout(stat, path, &st, 5) != 0) + return (dev_t)-1; @@ -553,8 +553,8 @@ + mntinfo_t *mnt = list_entry(ptr, mntinfo_t); + if (nlen < mnt->nlen) + continue; -+ if (mnt->nlen > 1 && use[mnt->nlen] != '\0' && use[mnt->nlen] != '/') -+ continue; ++ if (mnt->nlen == 1) /* root fs is the last entry */ ++ return mnt->dev; + if (strncmp(use, mnt->mpoint, mnt->nlen) == 0) + return mnt->dev; + }