lkml.org 
[lkml]   [1997]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:2.628 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site