Windows: Freelance Do not chase mount points
authorJeffrey Altman <jaltman@your-file-system.com>
Wed, 4 Sep 2013 19:53:57 +0000 (15:53 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 28 Sep 2013 02:21:51 +0000 (19:21 -0700)
When adding mount points or symlinks do not chase mount points
when attempting to determine the FID of the added object.

Change-Id: Ic4e070d687cc56407a19c41f185f3e28db7671bd
Reviewed-on: http://gerrit.openafs.org/10298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/cm_freelance.c

index b55d942..ea55ea9 100644 (file)
@@ -1211,13 +1211,13 @@ long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw,
         if (cm_getLocalMountPointChange()) {   // check for changes
             cm_clearLocalMountPointChange();    // clear the changefile
             cm_reInitLocalMountPoints();       // start reinit
-        }
+       }
 
-        code = cm_NameI(cm_RootSCachep(cm_rootUserp, &req), cpath,
-                        CM_FLAG_FOLLOW | CM_FLAG_CASEFOLD | CM_FLAG_DFS_REFERRAL,
-                        cm_rootUserp, NULL, &req, &scp);
-        free(cpath);
-        if (code)
+       code = cm_NameI(cm_RootSCachep(cm_rootUserp, &req), cpath,
+                       CM_FLAG_DIRSEARCH | CM_FLAG_CASEFOLD,
+                       cm_rootUserp, NULL, &req, &scp);
+       free(cpath);
+       if (code)
             return code;
         *fidp = scp->fid;
         cm_ReleaseSCache(scp);
@@ -1455,13 +1455,13 @@ long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp)
             if (cm_getLocalMountPointChange()) {       // check for changes
                 cm_clearLocalMountPointChange();    // clear the changefile
                 cm_reInitLocalMountPoints();   // start reinit
-            }
+           }
 
-            code = cm_NameI(cm_RootSCachep(cm_rootUserp, &req), cpath,
-                             CM_FLAG_FOLLOW | CM_FLAG_CASEFOLD | CM_FLAG_DFS_REFERRAL,
-                             cm_rootUserp, NULL, &req, &scp);
-            free(cpath);
-            if (code == 0) {
+           code = cm_NameI(cm_RootSCachep(cm_rootUserp, &req), cpath,
+                            CM_FLAG_DIRSEARCH | CM_FLAG_CASEFOLD,
+                            cm_rootUserp, NULL, &req, &scp);
+           free(cpath);
+           if (code == 0) {
                 *fidp = scp->fid;
                 cm_ReleaseSCache(scp);
             }