Search code examples
symlinkntfsmount-pointjunctionreparsepoint

Similar to junction points, directory symbolic links, mount points


I wrote a program to detect if a directory is a ReparsePoint and it precisely detects junction points, directory symbolic links and mount drives. I saw a directory which looks and works similar to junction point(I didn't create it, created by someone else) but my code does not detect that specific thing alone! Is there anything else similar to these ReparsePoints? If yes how to detect them via CPP?

EDIT: I'll insert code so that everyone understands better,

BOOL FileReports::IsReparsePoint(jstring jsrvName,jobject ErrHdlr)
{
    const char *path = env->GetStringUTFChars(jsrvName, 0);
    BOOL flag = FALSE;
    if(GetFileAttributesA(path) & FILE_ATTRIBUTE_REPARSE_POINT){
        flag = TRUE;
        
    }
log(NORMAL,"cleaning up");
Cleanup:
    env->ReleaseStringUTFChars(jsrvName, path);
    return flag;
}

Solution

  • DFS links

    DFS links are ReparsePoints in Windows server 2003 but in Windows server 2000 they are not ReparsePoints (i.e.,) FILE_ATTRIBUTE_REPARSE_POINT is not set. instead they are handled by the DFS filter directly by monitoring every open and matching the correct path during pre-create. reference link