From: <n-...@us...> - 2011-03-24 04:21:37
|
Revision: 5235 http://gfarm.svn.sourceforge.net/gfarm/?rev=5235&view=rev Author: n-soda Date: 2011-03-24 04:21:31 +0000 (Thu, 24 Mar 2011) Log Message: ----------- fix #214 - gfs_lgetxattr() may follow symolic link, if the attribute is uncached type Modified Paths: -------------- gfarm_v2/trunk/lib/libgfarm/gfarm/gfs_dircache.c Modified: gfarm_v2/trunk/lib/libgfarm/gfarm/gfs_dircache.c =================================================================== --- gfarm_v2/trunk/lib/libgfarm/gfarm/gfs_dircache.c 2011-03-23 14:27:25 UTC (rev 5234) +++ gfarm_v2/trunk/lib/libgfarm/gfarm/gfs_dircache.c 2011-03-24 04:21:31 UTC (rev 5235) @@ -684,7 +684,10 @@ if (gfarm_xattr_caching(name)) { /* negative cache */ e = GFARM_ERR_NO_SUCH_OBJECT; } else { /* this xattr is uncachable */ - return (gfs_getxattr(path, name, value, sizep)); + int no_follow = cache == &lstat_cache; + + return ((no_follow ? gfs_lgetxattr : gfs_getxattr) + (path, name, value, sizep)); } } return (e); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |