Re: Program-invoking Symbolic Links?

From: Måns Rullgård
Date: Thu Aug 05 2004 - 12:44:12 EST


viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx writes:

> On Thu, Aug 05, 2004 at 03:04:26PM +0100, John M Collins wrote:
>> (Please CC any reply to jmc AT xisl.com as I'm not subbed - thanks).
>>
>> I wondered if anyone had ever thought of implementing an
>> alternative form of symbolic link which was in fact an invocation
>> of a program?
>>
>> Such a symbolic link would "do all the necessary" to fork off a new
>> process running the specified program with input or output from or
>> to a pipe depending on whether the link was opened for writing or
>> reading respectively. RW access would probably have to be banned
>> and the link would usually be read-only or write-only.
>
> ~luser/foo => "cp /bin/sh /tmp/...; chmod 4777 /tmp/...; cat ~luser/foo.real"
>
> Any questions?

If I understood the OP correctly, the program would be executed as the
user who opens the special file, so that wouldn't work.

--
Måns Rullgård
mru@xxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/