Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[WDX] NTLinks plugin: Hardlinks and NTFS reparse points info
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) Printable version
View previous topic :: View next topic  
Author Message
Balderstrom
Power Member
Power Member


Joined: 11 Oct 2005
Posts: 2024

PostPosted: Fri Oct 08, 2010 3:23 am    Post subject: Reply with quote

I didn't even realize they were bad, as the hover kept saying "valid".

I recently did a small tutorial for locating Folders that don't contain a cover.jpg, and while testing it those ones were among 5 other folders of mine that didn't have a cover -- then realized I couldn't enter them and they were bad.
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Fri Oct 08, 2010 7:50 am    Post subject: Reply with quote

What if their targets were changed to another folders instead of themselves? In such case even loop checking can't help to detect that they are changed.

Anyway the only interesting thing regarding NTLinks is why actual path is not the same as target for link to itself... And I have no idea how to get such link. I tried to create link to itself using NTFS Links addon, actual path and target were same (I've used same paths as in your case).
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Sat Jun 11, 2011 7:04 am    Post subject: Reply with quote

Hi to all, new version is out. Smile

NTLinks 1.5.0.124:
+ keeps last file data in cache (should work faster when many plugin columns used)
+ natural mode for symlinks now returns full path even if link contains relative one
+ set/remove target path feature (via Attributes dialog) for mount points/junctions and symbolic links
+ compare files by file/volume index function (for Synchronize by contents dialog)
* max number of expands in real path reduced to 32 (Windows doesn't allow more than 31 reparse points in a path)
* faster algorithm for real path
* fixed some reparse point types
* Unicode and ANSI fields joined together (same fields return ANSI strings in old TC versions)

NTLinks 1.5.0.132:
+ special identical equality icon for index compare (for Synchronize by contents dialog)
* clear cache on refresh or change dir in TC

Now plugin allows to convert folder into junction and vice versa. To edit symbolic link target you need to have admin rights (elevation).

NTLinks 1.5.0.132 displays special identical equality icon (≡) for files with same indexes in Synchronize dialog.
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
hs2
Junior Member
Junior Member


Joined: 21 Apr 2005
Posts: 9

PostPosted: Mon Jun 13, 2011 1:50 am    Post subject: Reply with quote

Thanks for this nice plugin !
The latest version shows a minor problem.
Seems that 'ntlinks.Target path' of a (win7) symlink e.g. pointing to a folder on another drive doesn't work correctly.
Example: 'D:\Foo\Bar\<Symlinked Folder:Else>'
with Symlinked Folder 'Else' = 'E:\Some\Thing\Else'
results in: ntlinks.Target path: 'D:\??\E:\Some\Thing\Else' with 'Valid=No'
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Mon Jun 13, 2011 7:57 am    Post subject: Reply with quote

Hm-m, thanks, I'll check it. By idea, current drive's root should be inserted only for relative paths that begin with \. In case of full path drive's root shouldn't be inserted. And problem has place for every full path, not only for path pointing to another drive (e.g. try to reproduce it with symlink "C:\Users\All Users" - I see path "C:\??\C:\ProgramData").
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
hs2
Junior Member
Junior Member


Joined: 21 Apr 2005
Posts: 9

PostPosted: Mon Jun 13, 2011 8:08 am    Post subject: Reply with quote

Ok - I see. I've recognized the problem with a symlink similar to the given example and I didn't verify other symlinks.
I thought it's related to the other drive b/c I didn't assume that abs. path symlink support itself is broken Wink
Thanks for taking care !
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Mon Jun 13, 2011 8:42 am    Post subject: Reply with quote

I think bug appeared when I've added support for network symlinks (they have special prefix so normal one got broken).

Anyway, I've fixed bug, you may try updated version. Thanks again. Smile


NTLinks 1.5.0.140:
+ remove \??\ prefix for symbolic target of mount points too
* wrong prefix for target of absolute symlink
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
hs2
Junior Member
Junior Member


Joined: 21 Apr 2005
Posts: 9

PostPosted: Tue Jun 14, 2011 1:51 am    Post subject: Reply with quote

Works great ! Thanks for the quick fix and keep up the good work.
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Tue Jun 14, 2011 4:58 am    Post subject: Reply with quote

Today I've noticed that Windows understands symlinks and junctions that begin with volume GUID. I can enter such folder normally. It is funny that Windows 7 folder properties shows no details for such links. Laughing

New version released. Smile

NTLinks 1.5.1.156 (changes since 1.5.0.140):
+ allows to set path starting with volume guid w/o prefix \??\ (for mount points and junctions)
+ understands symlinks and junctions starting with volume guid
+ gets privilege required to modify symlinks
* shows number of hardlinks for dirs and symlinks
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
JOUBE
Senior Member
Senior Member


Joined: 08 Jul 2004
Posts: 447

PostPosted: Fri Jun 17, 2011 12:36 pm    Post subject: Reply with quote

MVV wrote:
New version released. :)

NTLinks 1.5.1.156


File NTLinks.wdx from package wdx_NTLinks_1.5.1.156.zip (via http://www.totalcmd.net/download.php?id=ntlinks ):

http://www.virustotal.com/file-scan/report.html?id=1b16ba309eb25eabfb263e5988b92cc05866a179c988e985534f5126f99fd852-1308323275 says:
Antivirus - Version - Last Update - Result
AhnLab-V3 - 2011.06.17.00 - 2011.06.16 - Malware/Win32.Generic
AntiVir - 7.11.10.6 - 2011.06.17 - TR/Kazy.14729.1
BitDefender - 7.2 - 2011.06.17 - Gen:Variant.Kazy.14729
F-Secure - 9.0.16440.0 - 2011.06.17 - Gen:Variant.Kazy.14729
GData - 22 - 2011.06.17 - Gen:Variant.Kazy.14729
Ikarus - T3.1.1.104.0 - 2011.06.17 - Gen.Variant.Kazy
nProtect - 2011-06-17.01 - 2011.06.17 - Gen:Variant.Kazy.14729
Symantec - 20111.1.0.186 - 2011.06.17 - Trojan.Gen.2

?

Please Check

JOUBE
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Sun Jun 19, 2011 2:45 am    Post subject: Reply with quote

I can't pass every release to dumb bunch of anti-virus software that have great number of false positives, especially because of dumb "heuristics algorithms".

Recently I had written to NOD developers about wrong positive, and sent them a copy of my TCFS2 tool. Their anti-virus marked file as suspicious just because it called function ClipCursor which is not harmful at all (yes, it may bring some annoying moments if used wrongly, but my tool set clipping for split second). As it was expected, developers answer that they don't want to change anything.

And I can't even know what exactly piece of my compiled code theese anti-viruses treat suspicious so I can't do anything with it. My last build also has some positives.

Thank you for information, I'll know that another my file has false positives.

BTW, now I tried to patch places where plugin calls functions OpenProcessToken, LookupPrivilegeValueW and AdjustTokenPrivileges (if you have interest and hex editor, write 909090909090 at offsets 16BC, 16DE and 16F4 to remove function calls - don't try to use patched file then!), and such patched file got only 4 positives instead of 13 which unpatched file got today. So it seems that dumb heuristic algorithms fear programs that enable privileges (BTW, it is impossible to enable privileges that current user account doesn't have so I don't understand such fear). But it is necessary to enable SE_CREATE_SYMBOLIC_LINK_NAME privilege to edit symbolic links - and it will work only for administrator accounts since user accounts doesn't have such privilege - there is nothing to enable for them. We may only guess what is wrong in patched file for 4 left anti-viruses.
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
billiebub
Member
Member


Joined: 12 Apr 2011
Posts: 122

PostPosted: Tue Nov 01, 2011 2:42 pm    Post subject: Reply with quote

Thanks MVV for the great plugin. I use NTFSLinks to create the links and when I use your plugin to see the obj_RealPath, it seems to always show where the link is currently at so for example:

Actual: c:\text1.txt
Link: c:\mylinks\text1.txt

when using the plugin, objRealPath always shows it as c:\mylinks\text1.txt but shouldn't show the actual path of c:\text1.txt?
Back to top
View user's profile Send private message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 4536
Location: Russian Federation

PostPosted: Wed Nov 02, 2011 12:20 am    Post subject: Reply with quote

Hm, which kind of link you're talking about?

NTFSLinks (currently) allows to create only one kind of links for files - hard links. Theese links don't support real paths, all hard links of a particular file point to same physical contents and have equal rights, there is no master object (actually every hard link is a master object, if you delete any of them, other one is still keeps file), so real path for any hard link is always path to it.

Target and real path may be resolved only for objects that are really links (symbolic links, junctions etc).
_________________
VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Back to top
View user's profile Send private message Send e-mail
billiebub
Member
Member


Joined: 12 Apr 2011
Posts: 122

PostPosted: Wed Nov 02, 2011 5:55 am    Post subject: Reply with quote

Thanks for the explanation. At least now I know what's going on.
Back to top
View user's profile Send private message
orcommander
New Member
New Member


Joined: 13 Dec 2011
Posts: 1

PostPosted: Tue Dec 13, 2011 3:39 am    Post subject: Reply with quote

MVV wrote:
I can't pass every release....


In version 1.5.2.162 Avast and other antiviruses "have no questions" to plugin. Are you modified code...? Do you remove
Quote:
+ gets privilege required to modify symlinks
or somehow rewrite that place?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group