Re: Varlinks - how not to break semantics

Khimenko Victor (khim@sch57.msk.ru)
Thu, 30 Apr 1998 23:17:04 +0400 (MSD)


RW> Hi there.
RW>
RW> >>>> a) Link is processed as varlink if and only if it beggins with ///.
RW> >>>> [normally, you have no reason to prepend ///, so it should be safe]
RW>
RW> >>> Happens easily if you append paths, and violates POSIX (the only
RW> >>> permitted escapes from the namespace are // and /../).
RW>
RW> >> Ook, so go for //, or go for /proc/varlink. /proc/varlink is pretty
RW> >> long to type, but we already have more strange things in /proc
RW> >> filesystem :-).
RW>
RW> > Looks like /proc/varlink prefix is preferrable. This way you'll not break
RW> > anything for already existing links (links to now not existing /proc/varlink
RW> > will be affected but this could break only program specially written to be
RW> > broken with varlinks :-) Of course /proc/varlink is long to type, but this
RW> > is better than other suggestions...
RW>
RW> If the length is a problem, I'm sure a quick...
RW>
RW> Q> ln -s /proc/varlink /vl
RW>
RW> ...would soon cure that...
RW>
I am not know about how this is could be done, but in simplest possible
realisation this will not work. The idea is that symlink must start from
exactly following 14 bytes: 2F 70 72 6F 63 2F 76 61 72 6C 69 6E 6B 2F
and this prefix will be stripped out before varlink expansion...
With this approach you could not find directory /varlink in /proc but
/proc/varlink//.${uid}/tmp will be expanded to /.500/tmp, /.501/tmp, etc...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu