This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Realpath & context sensitive symlinks


I looked through the Glibc archive but didn't see any comments on this.

Some file systems (like GFS) support context dependent symlinks (CDSL).  
Thesesymlinks contain macros like {os} or {uid} which get substituted with
the appropriate value to create an actual path name.  This macro 
substitution only occurs when the file system is following a symlink, 
otherwise the macro is left unmodified.

Realpath (canonicalize) doesn't know anything about these macros.
When it finds one of these CDSLs, it treats it like a regular text 
symlink, and sticks it in the path.  Lxstat fails on this path, since
it contains funny text and isn't a real path.

Anyone got a solution to this?  Or suggestions?

Is there a file system independent way to do this?
For example:

  find symlink path 
  chdir(path)
  getcwd (curpat)
  substitute curpath for symlink


--
Michael Eager     eager@mvista.com	408-328-8426	
MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA  94085


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]