In message <[EMAIL PROTECTED]>, Dima Dorfman writes:
>Taavi Talvik <[EMAIL PROTECTED]> wrote:
>> 
>> I'i try to set up jail with following script, however
>> as result, urandom/stdin/stdout/stderr will not appear.
>> 
>> They exist before applying devfs rules, but I cannot find
>> rules how to unhide those. Any ideas!?
>
>Please try the attached patch, which should be able to match symlinks
>based on pathname in order to unhide them.  This is only lightly
>tested, and I'm not entirely sure why I didn't do this before (ISTR
>having trouble getting it to work, but this seems absurdly logical and
>simple), but it seems to work.
>
>phk, does this look okay to you?

If it works I'm ok with it.

>Dima.
>
>Index: devfs_rule.c
>===================================================================
>RCS file: /a/ncvs/src/sys/fs/devfs/devfs_rule.c,v
>retrieving revision 1.3
>diff -u -r1.3 devfs_rule.c
>--- devfs_rule.c       8 Oct 2002 04:21:54 -0000       1.3
>+++ devfs_rule.c       2 Dec 2002 21:20:04 -0000
>@@ -634,7 +634,8 @@
>       dev = devfs_rule_getdev(de);
>       if (dev != NULL)
>               pname = dev->si_name;
>-      /* XXX: Support symlinks (check d_type == DT_LNK here). */
>+      else if (de->de_dirent->d_type == DT_LNK)
>+              pname = de->de_dirent->d_name;
>       else
>               return (0);
>       KASSERT(pname != NULL, ("devfs_rule_matchpath: NULL pname"));
>

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to