yaffs direct: Dereference symlinks in chmod
authorCharles Manning <cdhmanning@gmail.com>
Fri, 26 Nov 2010 02:09:30 +0000 (15:09 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Fri, 26 Nov 2010 02:09:30 +0000 (15:09 +1300)
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.c

index f6654cf..c7937b0 100644 (file)
@@ -2009,6 +2009,7 @@ int yaffs_chmod(const YCHAR *path, mode_t mode)
        yaffsfs_Lock();
 
        obj = yaffsfs_FindObject(NULL,path,0,1, &dir, &notDir,&loop);
+       obj = yaffsfs_FollowLink(obj,0,&loop);
 
        if(!dir && notDir) 
                yaffsfs_SetError(-ENOTDIR);