TELNETD and MULTIUSER

Correo Fernando-ruiz (E-mail) correo at fernando-ruiz.com
Thu May 17 23:14:10 UTC 2001


!!!!!!!!!!!!!!!!!!!!IMPORTANT NOTICE!!!!!!!!!!!!!!!!!!!!
If you not need open several remote telnet sessions don't spent your time
reading this.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
If you are interested, please. Send me your comments if you have it.

I'm working in the first version ready to use now.

The patch includes a full source to implement telnetd, pseudoterminals,
remote tcp/ip session.
Several sessions in the serial ttys and console, etc...
Valid only for the last snapshot 20010424.

Of course all of this is a first version.
Your comnments are to improve this version.

The file permission begins to get power.
The dummy posix function getuid(), geteuid(), ttyname() and more keeps
diferents values
for several users.
Root isn't the unique user in the system.
Several users share the
same system at same time.

Here the story of two users of Windows 98 Hyperterminal openening sessions
of
rtems telnetd.
root and rtems because tty is a bad user and he is penalized to log in the
system
Enjoy it.

The next release will include a crypt() version. Where is the best?
GPL, LINUX, BSD, MINIX. Give me the free source and the password will be
valid.
Now the password is only for an aesthetics question.

A previous session in the console (PC-VGA keyboard) the root user has
executed tree commands.

'netinit' to start the rtems_bsdnet_init();
'telnetd' to start the rtems_telned_initialize();
'ftpd'    to start the rtems_ftpd_initialize();

'task' permits verify the well starting of this daemons.

>From a Hyperterminal from Windows98 in tcp/ip mode the story:

----------------------------------------------------------------------------
-------------------
Welcome to:
RTEMS RELEASE rtems-ss-20010424(Intel i386/Pentium/pc586)
COPYRIGHT (c) 1989-1999.
On-Line Applications Research Corporation (OAR).

Please, be careful.

login: root
Password:
+----------------------------------------+
+ Welcome to RTEMS telnet daemon         +
+ Please, be careful                     +
+----------------------------------------+
+ Server not administrated. Sorry.       +
+----------------------------------------+

RTEMS SHELL (Version 1.0-FRC):/dev/pty0. May 17 2001. 'help' to list
commands.
pty0 [/] # ls
drwxr-xr-x   1   root   root        5092 Jan 01 00:00 dev/
drwxr-xr-x   1   root   root        1072 Jan 01 00:00 etc/
2 files 6164 bytes occupied
pty0 [/] # id
uid=0(root),gid=0(root),euid=0(root),egid=0(root)
pty0 [/] # cd dev
pty0 [/dev] # ls
crwxr-xr-x   1  rtems   root           0 Jan 01 00:00 console
crwxr-xr-x   1   root   root           0 Jan 01 00:00 ttyS1
crwxr-xr-x   1   root   root           0 Jan 01 00:00 ttyS2
crw-rw----   1   root   root           0 Jan 01 00:00 pty0
crw-rw----   1    tty   root           0 Jan 01 00:00 pty1
crw-rw----   1    tty   root           0 Jan 01 00:00 pty2
crw-rw----   1    tty   root           0 Jan 01 00:00 pty3
crw-rw----   1    tty   root           0 Jan 01 00:00 pty4
crw-rw----   1    tty   root           0 Jan 01 00:00 pty5
crw-rw----   1    tty   root           0 Jan 01 00:00 pty6
crw-rw----   1    tty   root           0 Jan 01 00:00 pty7
crw-rw----   1    tty   root           0 Jan 01 00:00 pty8
crw-rw----   1    tty   root           0 Jan 01 00:00 pty9
crw-rw----   1    tty   root           0 Jan 01 00:00 ptyA
crw-rw----   1    tty   root           0 Jan 01 00:00 ptyB
crw-rw----   1    tty   root           0 Jan 01 00:00 ptyC
crw-rw----   1    tty   root           0 Jan 01 00:00 ptyD
crw-rw----   1    tty   root           0 Jan 01 00:00 ptyE
crw-rw----   1    tty   root           0 Jan 01 00:00 ptyF
19 files 0 bytes occupied
pty0 [/dev] # cd /etc
pty0 [/etc] # ls
-rw-r--r--   1   root   root         111 May 18 00:00 passwd
-rw-r--r--   1   root   root          42 May 18 00:00 group
-rw-r--r--   1   root   root          36 May 17 23:59 issue.net
-rw-r--r--   1   root   root         258 May 18 00:00 motd
4 files 447 bytes occupied
pty0 [/etc] # cat passwd
root:*:0:0:root,,,,:/:/bin/sh
rtems:*:1:1:RTEMS Application,,,,:/:/bin/sh
tty:!:2:2:tty owner,,,,:/:/bin/false
pty0 [/etc] # cat group
root:x:0:root
rtems:x:1:rtems
tty:x:2:tty
pty0 [/etc] # ls
-rw-r--r--   1   root   root         111 May 18 00:00 passwd
-rw-r--r--   1   root   root          42 May 18 00:00 group
-rw-r--r--   1   root   root          36 May 17 23:59 issue.net
-rw-r--r--   1   root   root         258 May 18 00:00 motd
4 files 447 bytes occupied
pty0 [/etc] # cat issue.net
Welcome to:
%v
Please, be careful.
pty0 [/etc] # cat motd
+----------------------------------------+
+ Welcome to RTEMS telnet daemon         +
+ Please, be careful                     +
+----------------------------------------+
+ Server not administrated. Sorry.       +
+----------------------------------------+
pty0 [/etc] # cd ..
pty0 [/] # ls
drwxr-xr-x   1   root   root        5092 Jan 01 00:00 dev/
drwxr-xr-x   1   root   root        1072 Jan 01 00:00 etc/
2 files 6164 bytes occupied
pty0 [/] # mkdir home
pty0 [/] # cd home
pty0 [/home] # mkdir rtems
pty0 [/home] # ls
drwxr-xr-x   1   root   root           0 May 18 00:00 rtems/
1 files 0 bytes occupied
pty0 [/home] # chown rtems rtems
pty0 [/home] # ls
drwxr-xr-x   1  rtems   root           0 May 18 00:00 rtems/
1 files 0 bytes occupied
pty0 [/home] # chmod 0700 rtems
pty0 [/home] # ls
drwx------   1  rtems   root           0 May 18 00:00 rtems/
1 files 0 bytes occupied
pty0 [/home] # cd rtems
pty0 [/home] # ls
.: No such file or directory.
pty0 [/home] # cd ..
chdir to '..' failed:Permission denied
pty0 [/home] # ls
.: No such file or directory.
pty0 [/home] # cd
pty0 [/] # ls
drwxr-xr-x   1   root   root        5092 Jan 01 00:00 dev/
drwxr-xr-x   1   root   root        1072 Jan 01 00:00 etc/
drwxr-xr-x   1   root   root         268 May 18 00:00 home/
3 files 6432 bytes occupied
pty0 [/] # cd homw
chdir to 'homw' failed:No such file or directory
pty0 [/] # cd home
pty0 [/home] # ls
drwx------   1  rtems   root           0 May 18 00:00 rtems/
1 files 0 bytes occupied
pty0 [/home] # ls
drwx------   1  rtems   root           0 May 18 00:00 rtems/
1 files 0 bytes occupied
pty0 [/home] # ls rtems
rtems: No such file or directory.
pty0 [/home] # help
help: TOPIC? The topics are
   help, monitor, dir, misc, mem, test, net, ftp, telnet
pty0 [/home] # help misc
help: list for the topic 'misc'
logoff     -logoff from the system
exit       -is an <alias> for command 'logoff'
date       -date [[MMDDYY]hhmm[ss]]
reset      -reset the BSP
alias      -alias old new
tty        -show ttyname
whoami     -show current user
id         -show uid,gid,euid,egid
umask      -umask [new_umask]

pty0 [/home] # rtc
Fri May 18 00:02:18 2001
pty0 [/home] # umask
022
pty0 [/home] # tty
/dev/pty0
pty0 [/home] # whoami
root
pty0 [/home] # help
help: TOPIC? The topics are
   help, monitor, dir, misc, mem, test, net, ftp, telnet
pty0 [/home] # help monitor
help: list for the topic 'monitor'
config     -Show the system configuration.
itask      -List init tasks for the system
mpci       -Show the MPCI system configuration, if configured.
pause      -Monitor goes to "sleep" for specified ticks (default is 1).
Monitor
             will resume at end of period or if explicitly awakened
              pause [ticks]
continue   -Put the monitor to sleep waiting for an explicit wakeup from the
pr
            ogram running.

go         -Alias for 'continue'
node       -Specify default node number for commands that take id's.
              node [ node number ]
symbol     -Display value associated with specified symbol. Defaults to
display
            ing all known symbols.
              symbol [ symbolname [symbolname ... ] ]
extension  -Display information about specified extensions. Default is to
displ
            ay information about all extensions on this node.
              extension [id [id ...] ]
Press any key to continue...
task       -Display information about the specified tasks. Default is to
displa
            y information about all tasks on this node.
              task [id [id ...] ]
queue      -Display information about the specified message queues. Default
is
            to display information about all queues on this node.
              queue [id [id ... ] ]
object     -Display information about specified RTEMS objects. Object id's
must
             include 'type' information. (which may normally be defaulted)
              object [id [id ...] ]
driver     -Display the RTEMS device driver table.
              driver [ major [ major ... ] ]
dname      -Displays information about named drivers.

fatal      -'exit' with fatal error; default error is RTEMS_TASK_EXITTED
              fatal [status]
quit       -Alias for 'exit'

help       -Provide information about commands. Default is show basic
command s
            ummary.
            help [ command [ command ] ]
Press any key to continue...

pty0 [/home] # task
  ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
----------------------------------------------------------------------------
--
08010002   sh1    100   Wsem   P:T:nA  NONE    1801000d  0xbfc6780
08010003   sh2    100   Wsem   P:T:nA  NONE    18010015  0xbfc6780
08010004   shc    100   DELAY  P:T:nA  NONE
08010005   ntwk   100   Wevnt  P:T:nA  NONE                      0: 0x159798
08010006   SCtx   100   READY  P:T:nA  NONE
08010007   SCrx   100   Wevnt  P:T:nA  NONE
08010008   TLND   100   Wevnt  P:T:nA  NONE
08010009   FTPa   100   Wevnt  P:T:nA  NONE
0801000a   FTPb   100   Wevnt  P:T:nA  NONE
0801000b   FTPD   100   Wevnt  P:T:nA  NONE
0801000f   pty0   100   READY  P:T:nA  NONE
pty0 [/home] # driver
  Major      Entry points
----------------------------------------------------------------------------
--
  0          init: [0x1020cc];  control: [0x1026f4]
             open: [0x102578];  close: [0x102654]
             read: [0x10266c];  write: [0x102684]
  1          init: [0x12a4ac];  control: [0x12a638]
             open: [0x12a58c];  close: [0x12a5f0]
             read: [0x12a608];  write: [0x12a620]
  2          init: [0x12a650];  control: [0x12a794]
             open: [0x12a730];  close: [0x12a5f0]
             read: [0x12a608];  write: [0x12a620]
  3          init: [0x116bc0];  control: [0x116f70]
             open: [0x116f08];  close: [0x116f28]
             read: [0x116f40];  write: [0x116f58]
  4          init: [0x100890];  control: [0x1008d8]
             open: [0x0];  close: [0x0]
             read: [0x0];  write: [0x0]
  5          init: [0x0];  control: [0x0]
             open: [0x0];  close: [0x0]
             read: [0x0];  write: [0x0]
pty0 [/home] # config
INITIAL (startup) Configuration Info
----------------------------------------------------------------------------
--
WORKSPACE      start: 0x15c230;  size: 0x200000
TIME           usec/tick: 10000;  tick/timeslice: 50;  tick/sec: 100
MAXIMUMS       tasks: 50;  timers: 10;  sems: 166;  que's: 10;  ext's: 1
               partitions: 0;  regions: 1;  ports: 0;  periods: 0
pty0 [/home] # malloc
Malloc stats
  avail:193167k  allocated:232k (0%) max:235k (0%) lifetime:956k freed:0k
  Call counts:   malloc:985   free:871   realloc:60   calloc:64
pty0 [/home] # help dir
help: list for the topic 'dir'
ls         -ls [dir]     # list files in the directory
chdir      -chdir [dir]  # change the current directory
rmdir      -rmdir  dir   # remove directory
mkdir      -mkdir  dir   # make a directory
pwd        -pwd          # print work directory
chroot     -chroot [dir] # change the root directory
cat        -cat n1 [n2 [n3...]]# show the ascii contents
rm         -rm n1 [n2 [n3...]]# remove files
chmod      -chmod 0777 n1 n2... #change filemode
chown      -chown own  n1 n2... #change fileowner
chgrp      -chgrp grp  n1 n2... #change filegroup
dir        -is an <alias> for command 'ls'
cd         -is an <alias> for command 'chdir'

pty0 [/home] # pwd
/home
pty0 [/home] # cd /etc
pty0 [/etc] # dir
-rw-r--r--   1   root   root         111 May 18 00:02 passwd
-rw-r--r--   1   root   root          42 May 18 00:03 group
-rw-r--r--   1   root   root          36 May 18 00:00 issue.net
-rw-r--r--   1   root   root         258 May 18 00:00 motd
4 files 447 bytes occupied
pty0 [/etc] # help test
help: list for the topic 'test'
getenv     -env var
putenv     -putenv var=value
resetenv   -resetenv
touch      -touch namefile
share      -share task_id
rtc        -rtc read & set rtems clock

pty0 [/etc] # putenv TERM=rtems
result putenv(TERM=rtems)=0
pty0 [/etc] # getenv RTEMS
RTEMS="(null)"
pty0 [/etc] # getenv TERM
TERM="rtems"
pty0 [/etc] # ls
-rw-r--r--   1   root   root         111 May 18 00:03 passwd
-rw-r--r--   1   root   root          42 May 18 00:04 group
-rw-r--r--   1   root   root          36 May 18 00:00 issue.net
-rw-r--r--   1   root   root         258 May 18 00:00 motd
4 files 447 bytes occupied
pty0 [/etc] # help
help: TOPIC? The topics are
   help, monitor, dir, misc, mem, test, net, ftp, telnet
pty0 [/etc] # help net
help: list for the topic 'net'
netinit    -start bsdnet
inet       -inet routes
mbuf       -mbuf stats
if         -if   stats
ip         -ip   stats
icmp       -icmp stats
tcp        -tcp  stats
udp        -udp  stats
ntp        -ntp  net time protocol

pty0 [/etc] # inet
Destination     Gateway/Mask/Hw    Flags     Refs     Use Expire Interface
default         192.168.0.1        UGS         0        0      0 ne1
127.0.0.1       127.0.0.1          UH          0        0      0 lo0
192.168.0.0     255.255.255.0      U           0        0     47 ne1
192.168.0.1                        UHL         1        0     47 ne1
192.168.0.2     00:E0:7D:78:03:A7  UHL         1      658   2835 ne1
pty0 [/etc] # mbuf
************ MBUF STATISTICS ************
mbufs: 512    clusters:  64    free:  64
drops:   0       waits:   0  drains:   0
      free:507           data:3           header:2           socket:0
       pcb:0           rtable:0           htable:0           atable:0
    soname:0           soopts:0           ftable:0           rights:0
    ifaddr:0          control:0          oobdata:0

pty0 [/etc] # ip
************ IP Statistics ************
             total packets received        1068
 datagrams delivered to upper level        1068
    total ip packets generated here         668

pty0 [/etc] # if
************ INTERFACE STATISTICS ************
***** ne1 *****
Address:192.168.0.233   Broadcast Address:192.168.0.255
Flags: Up Broadcast Running Active Simplex
Send queue limit:50   length:1    Dropped:0
    Received packets: 1109     Transmitted packets: 674
        Receive acks: 1109           Transmit acks: 674
     Packet overruns: 0               Frame errors: 0
          CRC errors: 0             Missed packets: 0
          Interrupts: 1783
***** lo0 *****
Address:127.0.0.1
Flags: Up Loopback Running Multicast
Send queue limit:50   length:0    Dropped:0

pty0 [/etc] # icmp
************ ICMP Statistics ************

pty0 [/etc] # help net
help: list for the topic 'net'
netinit    -start bsdnet
inet       -inet routes
mbuf       -mbuf stats
if         -if   stats
ip         -ip   stats
icmp       -icmp stats
tcp        -tcp  stats
udp        -udp  stats
ntp        -ntp  net time protocol

pty0 [/etc] # tcp
************ TCP Statistics ************
              connections initiated           7
               connections accepted           6
            connections established          13
      conn. closed (includes drops)          12
     segs where we tried to get rtt         657
                 times we succeeded         660
                  delayed acks sent           9
                 total packets sent         693
                  data packets sent         644
                    data bytes sent       18576
              ack-only packets sent          35
 control (SYN|FIN|RST) packets sent          14
             total packets received        1028
       packets received in sequence         534
         bytes received in sequence        1201
    duplicate-only packets received           1
      duplicate-only bytes received           3
      out-of-order packets received           7
                rcvd duplicate acks          13
                   rcvd ack packets         660
           bytes acked by rcvd acks       18593
      times hdr predict ok for acks         124
 times hdr predict ok for data pkts         349
  times cached RTT in route updated           4
        times cached rttvar updated           4
   times RTT initialized from route           7
   times RTTVAR initialized from rt           7

pty0 [/etc] # help net
help: list for the topic 'net'
netinit    -start bsdnet
inet       -inet routes
mbuf       -mbuf stats
if         -if   stats
ip         -ip   stats
icmp       -icmp stats
tcp        -tcp  stats
udp        -udp  stats
ntp        -ntp  net time protocol

pty0 [/etc] # udp
************ UDP Statistics ************
                total input packets          82
     of above, arrived as broadcast          82

pty0 [/etc] # ntp
Fri May 18 00:05:36 2001
pty0 [/etc] # rtc
Fri May 18 00:05:41 2001
pty0 [/etc] # help
help: TOPIC? The topics are
   help, monitor, dir, misc, mem, test, net, ftp, telnet
pty0 [/etc] # help ftp
help: list for the topic 'ftp'
ftpd       -ftpd starts the ftpd daemon

pty0 [/etc] # help telnet
help: list for the topic 'telnet'
telnetd    -telnetd [stacksize [tsk_priority]]

pty0 [/etc] # help mem
help: list for the topic 'mem'
mdump      -mdump [adr [size]]
wdump      -wdump [adr [size]]
medit      -medit adr value [value ...]
mfill      -mfill adr size value
mmove      -mmove dst src size
malloc     -malloc dump

pty0 [/etc] # mdump 0
0x00000000 C6 E7 00 F0 C6 E7 00 F0-C3 E2 00 F0 C6 E7 00 F0 ................
0x00000010 C6 E7 00 F0 54 FF 00 F0-08 80 00 F0 C6 E7 00 F0 ....T...........
0x00000020 A5 FE 00 F0 87 E9 00 F0-6F EF 00 F0 6F EF 00 F0 ........o...o...
0x00000030 6F EF 00 F0 6F EF 00 F0-57 EF 00 F0 6F EF 00 F0 o...o...W...o...
0x00000040 30 0C 00 C0 4D F8 00 F0-41 F8 00 F0 E4 96 00 F0 0...M...A.......
0x00000050 39 E7 00 F0 59 F8 00 F0-2E E8 00 F0 D2 EF 00 F0 9...Y...........
0x00000060 A4 E7 00 F0 F2 E6 00 F0-6E FE 00 F0 53 FF 00 F0 ........n...S...
0x00000070 53 FF 00 F0 A4 F0 00 F0-C7 EF 00 F0 20 35 00 C0 S........... 5..
0x00000080 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x00000090 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x000000A0 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x000000B0 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x000000C0 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x000000D0 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x000000E0 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x000000F0 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x00000100 59 EC 00 F0 D5 EF 00 F0-65 F0 00 F0 20 31 00 C0 Y.......e... 1..
0x00000110 C6 E7 00 F0 C6 E7 00 F0-E5 EF 00 F0 C6 E7 00 F0 ................
0x00000120 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
0x00000130 C6 E7 00 F0 C6 E7 00 F0-C6 E7 00 F0 C6 E7 00 F0 ................
pty0 [/etc] # dump 0x400
shell:dump command not found
pty0 [/etc] # mdump 0x400
0x00000400 F8 03 F8 02 00 00 00 00-78 03 00 00 00 00 C0 9F ........x.......
0x00000410 27 54 00 7F 02 00 00 20-00 00 22 00 22 00 E0 50 'T..... .."."..P
0x00000420 0D 1C 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x00000430 00 00 00 00 00 00 00 00-00 00 00 00 00 00 01 01 ................
0x00000440 25 00 00 00 00 41 01 01-02 03 50 00 00 10 00 00 %....A....P.....
0x00000450 00 05 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x00000460 0E 0D 00 D4 03 29 30 03-00 00 C0 FF EC 88 17 00 .....)0.........
0x00000470 00 00 00 00 00 02 00 00-14 14 14 14 01 01 01 01 ................
0x00000480 1E 00 3E 00 18 10 00 60-F9 11 0B 08 58 01 00 07 ..>....`....X...
0x00000490 17 00 00 00 41 00 10 02-00 00 00 00 00 00 00 00 ....A...........
0x000004A0 00 00 00 30 0C 00 C0 00-B8 03 00 C0 10 10 10 00 ...0............
0x000004B0 00 00 00 05 D1 04 44 00-00 00 04 00 00 00 00 00 ......D.........
0x000004C0 00 00 00 00 00 00 0A 00-00 00 00 00 00 00 00 00 ................
0x000004D0 00 00 00 00 00 00 00 00-DC 04 00 00 00 00 00 00 ................
0x000004E0 00 00 00 00 00 00 00 80-07 00 08 00 00 00 00 00 ................
0x000004F0 AA 00 00 00 00 00 00 00-15 00 26 01 00 00 00 03 ..........&.....
0x00000500 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x00000510 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x00000520 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x00000530 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
pty0 [/etc] # logoff
logoff from the system...
Goodbye from RTEMS SHELL :-(
Welcome to:
RTEMS RELEASE rtems-ss-20010424(Intel i386/Pentium/pc586)
COPYRIGHT (c) 1989-1999.
On-Line Applications Research Corporation (OAR).

Please, be careful.

login:
Password:
Login incorrect

login: rtems
Password:
+----------------------------------------+
+ Welcome to RTEMS telnet daemon         +
+ Please, be careful                     +
+----------------------------------------+
+ Server not administrated. Sorry.       +
+----------------------------------------+

RTEMS SHELL (Version 1.0-FRC):/dev/pty0. May 17 2001. 'help' to list
commands.
pty0 [/] $ id
uid=1(rtems),gid=1(rtems),euid=1(rtems),egid=1(rtems)
pty0 [/] $ ls
drwxr-xr-x   1   root   root        5092 Jan 01 00:00 dev/
drwxr-xr-x   1   root   root        1072 Jan 01 00:00 etc/
drwxr-xr-x   1   root   root         268 May 18 00:00 home/
3 files 6432 bytes occupied
pty0 [/] $ cd home
pty0 [/home] $ ls
drwx------   1  rtems   root           0 May 18 00:00 rtems/
1 files 0 bytes occupied
pty0 [/home] $ cd rtems
pty0 [/home/rtems] $ ls
0 files 0 bytes occupied
pty0 [/home/rtems] $ touch one
pty0 [/home/rtems] $ touch two
pty0 [/home/rtems] $ ls
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 one
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 two
2 files 0 bytes occupied
pty0 [/home/rtems] $ mkdir foo
pty0 [/home/rtems] $ cd foo
pty0 [/home/rtems/foo] $ kls
shell:kls command not found
pty0 [/home/rtems/foo] $ ls
0 files 0 bytes occupied
pty0 [/home/rtems/foo] $ cd ..
pty0 [/home/rtems] $ ls
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 one
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 two
drwxr-xr-x   1  rtems  rtems           0 May 18 00:07 foo/
3 files 0 bytes occupied
pty0 [/home/rtems] $ chmod 0777 foo
pty0 [/home/rtems] $ ls
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 one
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 two
drwxrwxrwx   1  rtems  rtems           0 May 18 00:07 foo/
3 files 0 bytes occupied
pty0 [/home/rtems] $ chroot .
error Permission denied:chroot(.);
pty0 [/home/rtems] $ cd ..
pty0 [/home] $ ls
drwx------   1  rtems   root         804 May 18 00:00 rtems/
1 files 804 bytes occupied
pty0 [/home] $ chmod 0755 rtems
pty0 [/home] $ ls
drwxr-xr-x   1  rtems   root         804 May 18 00:00 rtems/
1 files 804 bytes occupied
pty0 [/home] $ exit
logoff from the system...
Goodbye from RTEMS SHELL :-(
Welcome to:
RTEMS RELEASE rtems-ss-20010424(Intel i386/Pentium/pc586)
COPYRIGHT (c) 1989-1999.
On-Line Applications Research Corporation (OAR).

Please, be careful.

login:
Password:
Login incorrect

login: tty
Password:
Login incorrect

login: root
Password:
+----------------------------------------+
+ Welcome to RTEMS telnet daemon         +
+ Please, be careful                     +
+----------------------------------------+
+ Server not administrated. Sorry.       +
+----------------------------------------+

RTEMS SHELL (Version 1.0-FRC):/dev/pty0. May 17 2001. 'help' to list
commands.
pty0 [/] # cd home
pty0 [/home] # ls
drwxr-xr-x   1  rtems   root         804 May 18 00:00 rtems/
1 files 804 bytes occupied
pty0 [/home] # cd rtems
pty0 [/home/rtems] # ls
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 one
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 two
drwxrwxrwx   1  rtems  rtems           0 May 18 00:07 foo/
3 files 0 bytes occupied
pty0 [/home/rtems] # cd foo
pty0 [/home/rtems/foo] # ls
0 files 0 bytes occupied
pty0 [/home/rtems/foo] # chroot .
pty0 [/] # ls
0 files 0 bytes occupied
pty0 [/] # touch foo.one
pty0 [/] # touch foo.twoo
pty0 [/] # ls
-rw-r--r--   1   root   root           0 May 18 00:08 foo.one
-rw-r--r--   1   root   root           0 May 18 00:08 foo.twoo
2 files 0 bytes occupied
pty0 [/] # cd ..
pty0 [/] # ls
-rw-r--r--   1   root   root           0 May 18 00:08 foo.one
-rw-r--r--   1   root   root           0 May 18 00:08 foo.twoo
2 files 0 bytes occupied
pty0 [/] # exit
logoff from the system...
Goodbye from RTEMS SHELL :-(
Welcome to:
RTEMS RELEASE rtems-ss-20010424(Intel i386/Pentium/pc586)
COPYRIGHT (c) 1989-1999.
On-Line Applications Research Corporation (OAR).

Please, be careful.

login:
Password:
Login incorrect

login: rtems
Password:
+----------------------------------------+
+ Welcome to RTEMS telnet daemon         +
+ Please, be careful                     +
+----------------------------------------+
+ Server not administrated. Sorry.       +
+----------------------------------------+

RTEMS SHELL (Version 1.0-FRC):/dev/pty0. May 17 2001. 'help' to list
commands.
pty0 [/] $ cd home
pty0 [/home] $ ls
drwxr-xr-x   1  rtems   root         804 May 18 00:00 rtems/
1 files 804 bytes occupied
pty0 [/home] $ cd rtems
pty0 [/home/rtems] $ ls
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 one
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 two
drwxrwxrwx   1  rtems  rtems         536 May 18 00:07 foo/
3 files 536 bytes occupied
pty0 [/home/rtems] $ cd foo
pty0 [/home/rtems/foo] $ ls
-rw-r--r--   1   root   root           0 May 18 00:08 foo.one
-rw-r--r--   1   root   root           0 May 18 00:08 foo.twoo
2 files 0 bytes occupied
pty0 [/home/rtems/foo] $ rm foo.one
pty0 [/home/rtems/foo] $ ls
-rw-r--r--   1   root   root           0 May 18 00:08 foo.twoo
1 files 0 bytes occupied
pty0 [/home/rtems/foo] $ cd ..
pty0 [/home/rtems] $ ls
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 one
-rw-r--r--   1  rtems  rtems           0 May 18 00:07 two
drwxrwxrwx   1  rtems  rtems         268 May 18 00:07 foo/
3 files 268 bytes occupied
pty0 [/home/rtems] $ exit
logoff from the system...
Goodbye from RTEMS SHELL :-(
----------------------------------------------------------------------------
-------------------
Pretty?

Don't hesitate to ask me any question that you have.

This soft is not a BSP soft.

It's a open RTEMS software. Al least is my goal.
Say me if this goal is not possible.

The Test is a GRUB(able) pc586 test with ne2000 PCI irq 9/adr E400.
IP 192.168.0.233. Very easy to setup touching the netconfig.h file.


Fernando RUIZ CASAS
home: correo at fernando-ruiz.com
work: fernando.ruiz at ctv.es


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtems-ss-20010424.telnetd.diff.gz
Type: application/x-gzip
Size: 15847 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20010518/1f89a463/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: telnettest.tgz
Type: application/x-compressed
Size: 4447 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20010518/1f89a463/attachment-0001.bin>


More information about the users mailing list