]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-dfs-referrals-symlinks-20082002
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 2 Feb 2008 22:23:01 +0000 (22:23 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 2 Feb 2008 22:23:01 +0000 (22:23 +0000)
LICENSE MIT

another small tweak to ensure that we don't create a symlink for "fo" when
a mountpoint or symlink for "foo" exists

(cherry picked from commit d52f19ca0aacdbfdf64bdeaae4153c1f2ec7f385)

src/WINNT/afsd/cm_vnodeops.c

index 136e0ba1a4419e00f2cf713c200d2a8d8a6479d4..9fedbb0840d3a73cbff80bc397050740eab8dc8f 100644 (file)
@@ -1303,7 +1303,9 @@ long cm_LookupInternal(cm_scache_t *dscp, char *namep, long flags, cm_user_t *us
                     found = 1;
                     if (!cm_FreelanceMountPointExists(fullname, 0))
                         code = cm_FreelanceAddMount(fullname, &fullname[1], "root.cell.", 1, &rock.fid);
-                    if ( stricmp(&namep[1], &fullname[1]) && !cm_FreelanceSymlinkExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0))
+                    if ( stricmp(&namep[1], &fullname[1]) && 
+                                               !cm_FreelanceMountPointExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0) &&
+                                               !cm_FreelanceSymlinkExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0))
                         code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
                 }
             } else {
@@ -1311,7 +1313,9 @@ long cm_LookupInternal(cm_scache_t *dscp, char *namep, long flags, cm_user_t *us
                     found = 1;
                     if (!cm_FreelanceMountPointExists(fullname, 0))
                         code = cm_FreelanceAddMount(fullname, fullname, "root.cell.", 0, &rock.fid);
-                    if ( stricmp(namep, fullname) && !cm_FreelanceSymlinkExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0))
+                    if ( stricmp(namep, fullname) && 
+                                               !cm_FreelanceMountPointExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0) &&
+                                               !cm_FreelanceSymlinkExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0))
                         code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
                 }
             }