devfs symlink over device doesn't work



After deleting a device in devfs, any symlink placed over it results in
ENOENT.

# cd /dev
# rm console
# touch /var/log/console
# ln -s /var/log/console console
# ls -l console
ls: console: No such file or directory

I'd like to fix this behavior. Or is there a reason for it that I'm not
seeing?

Reasoning:

I'm using devfs in jails, and I'd like anything written (by user space
programs, syslogd, etc...) to /dev/console to go to a file in the jail.
So at jail startup I'd like to put a symlink over /dev/console to a
normal file.

Cheers,
Stef Walter

_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Proposal for redesigning the TTY layer
    ... They do not belong in DEVFS, since that would require DEVFS to know ... You can put it in the generic tty layer if you want, ... the console code. ... I was already planning to add the termios line discipline code outside ...
    (freebsd-arch)
  • Re: log all activity of a special user?
    ... > i just want to see averything th euser does on the console... ... You could jail them in many ...
    (comp.os.linux.security)
  • dcons(4) console for jails
    ... '/usr/libexec/getty dcons dcons' inside a jail and allow the host system ... to access the console. ... It's easy to do using the dconschat TCP feature ... and using telnet to connect but I don't like the idea of allowing telnet ...
    (freebsd-current)
  • Re: HEADS UP: Re: FreeBSD Security Advisory FreeBSD-SA-07:01.jail
    ... mktemp foo.XXX ... I did not have time to look at how the console part is handled. ... But out of the blue I would assume the console.log is created before the jail is started. ... The echo is there to make sure it exists and the subshell ...
    (FreeBSD-Security)