A telnetd namespace search order

Regular user

  1. /lib/namespace.sysname
  2. /lib/namespace

noworld user

  1. /lib/namespace.noworld

Namespace setting for web service

If you wish to start web server for some members, maybe you want to restrict access for other users.

This is a simple setting for this purpose.

Directory setting

mkdir /usr/$user/lib/lib

/usr/$user/lib/namespace.ftp

# root
mount -aC #s/boot /root $rootspec
bind -a $rootdir /

bind -c #e /env
bind $home/lib/lib $home/lib
bind -c $home /
cd /

/usr/$user/lib/profile

Maybe I need more restrict.

switch($service){
case terminal
        #plumber
        #echo -n accelerated > '#m/mousectl'
        #echo -n 'res 3' > '#m/mousectl'
        prompt=('term% ' '      ')
        fn term%{ $* }
        #exec rio -i riostart
case cpu
        if (test -e /mnt/term/mnt/wsys) { # rio already running
                bind -a /mnt/term/mnt/wsys /dev
                echo -n $sysname > /dev/label
        }
        #bind /mnt/term/dev/cons /dev/cons
        #bind /mnt/term/dev/consctl /dev/consctl
        #bind -a /mnt/term/dev /dev
        prompt=('cpu% ' '       ')
        fn cpu%{ $* }
        #news
        if (! test -e /mnt/term/mnt/wsys) {     # cpu call from drawterm
                font=/lib/font/bit/pelm/latin1.8.font
                exec rio
        }

case con
        prompt=('cpu% ' '       ')
        #hide other
        bind $home/lib/lib $home/lib
        bind $home /usr
        home=/usr
        cd $home
        news
}