Linux-kernel mailing list archive 1997-49,: Re: Conditional SymLinks

# Re: Conditional SymLinks

Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de)
Fri, 12 Dec 1997 11:36:54 +0100

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Andreas Schwab: "Re: Core files in 2.1.7x"
- Previous message: Jean Wolter: "Small oops in 2.0.x while returning from execve"
- Maybe in reply to: Jim Bray: "Conditional SymLinks"
- Next in thread: Rik van Riel: "Re: Conditional SymLinks"
- Reply: Rik van Riel: "Re: Conditional SymLinks"

> I've seen this _many_ years ago in a BSD 4.2 (4.3?) implementation
> from Sony (NewsOS 3.x and 4.x) on their MIPS R3000 workstations.
> it was a nice feature and I really would like to see this in Linux too
> (but don't ask me how this should be done;)

I think there should be a per-process kernel environment. You would
set this as

char buf[]="BAR",
prctl(PR_SETENV,"FOO",buf,sizeof(buf),O_RDWR|PR_ENV_INHERIT);

and the file system would be free to interpret this in whatever
way is appropriate. For example, some file system would have
special files, others would search for dollar signs in names.

BTW, the PR_SETENV process control has a couple of other uses.
File systems with other autorization schemes, like smbfs, could
use it to retrieve credentials. For security reasons, having
write-only kernel environment variables is then desirable.

Regards,
Martin

- Next message: Andreas Schwab: "Re: Core files in 2.1.7x"
- Previous message: Jean Wolter: "Small oops in 2.0.x while returning from execve"
- Maybe in reply to: Jim Bray: "Conditional SymLinks"
- Next in thread: Rik van Riel: "Re: Conditional SymLinks"
- Reply: Rik van Riel: "Re: Conditional SymLinks"