svn commit: r248029 - stable/9/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Fri Mar 8 08:09:26 UTC 2013
Author: kib
Date: Fri Mar 8 08:09:26 2013
New Revision: 248029
URL: http://svnweb.freebsd.org/changeset/base/248029
Log:
MFC r247560:
Make the default implementation of the VOP_VPTOCNP() fail if the
directory entry, matched by the inode number, is ".".
Modified:
stable/9/sys/kern/vfs_default.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/kern/vfs_default.c
==============================================================================
--- stable/9/sys/kern/vfs_default.c Fri Mar 8 03:29:05 2013 (r248028)
+++ stable/9/sys/kern/vfs_default.c Fri Mar 8 08:09:26 2013 (r248029)
@@ -856,8 +856,12 @@ vop_stdvptocnp(struct vop_vptocnp_args *
error = ENOMEM;
goto out;
}
- bcopy(dp->d_name, buf + i, dp->d_namlen);
- error = 0;
+ if (dp->d_namlen == 1 && dp->d_name[0] == '.') {
+ error = ENOENT;
+ } else {
+ bcopy(dp->d_name, buf + i, dp->d_namlen);
+ error = 0;
+ }
goto out;
}
} while (len > 0 || !eofflag);
More information about the svn-src-stable-9
mailing list