Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007550 [Squeak] VM minor always 07-08-10 10:36 07-09-10 09:44
Reporter henriksp View Status public  
Assigned To lewis
Priority normal Resolution open  
Status acknowledged   Product Version 4.1
Summary 0007550: Relative symbolic links do not resolve correctly in Unix 4.0.3.2202
Description There's a bug in the alias resolution sqGetFilenameFromString in sqUnixMain.c.
In the line
filenameLength = readLink(aCharBuffer, aCharBuffer, MAXPATHLEN)
it replaces the old link path with the resolved link path, however links may be relative, eg. /bin/sh linking to bash rather than /bin/bash.

 Thus, file opening, and other operations using this function will fail if encountering a relative link.

 F.ex. print (on Ubuntu, where sh -> dash):

 |openedRelative|
 openedRelative := nil.
[FileStream readOnlyFileNamed: '/bin/sh' do: [:fs | openedRelative := true]] on: FileDoesNotExistException do: [openedRelative := false].
openedRelative

and you get false.
Additional Information Created issue as the patched file posted on VM-Dev may have gone unnoticed.
New method merged from Cog sources, where Eliot had fixed it already.
Attached Files  sqUnixMain.c [^] (41,473 bytes) 07-08-10 10:36

- Relationships

- Notes
(0013825 - 95 - 101 - 295 - 295 - 295 - 295)
henriksp
07-08-10 10:37

Discussion on VM-dev:
http://forum.world.st/Unix-VM-alias-resolving-bug-tp2267360p2267360.html [^]
 
(0013826 - 53 - 53 - 53 - 53 - 53 - 53)
lewis
07-09-10 09:44

Forwarded file to Ian for inclusion in platforms/unix
 

- Issue History
Date Modified Username Field Change
07-08-10 10:36 henriksp New Issue
07-08-10 10:36 henriksp Status new => assigned
07-08-10 10:36 henriksp Assigned To  => lewis
07-08-10 10:36 henriksp File Added: sqUnixMain.c
07-08-10 10:37 henriksp Note Added: 0013825
07-08-10 11:59 lewis Status assigned => acknowledged
07-09-10 09:44 lewis Note Added: 0013826


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
41 total queries executed.
31 unique queries executed.
Powered by Mantis Bugtracker