Stefan Holzmüller
|
Access the proc filesystem on QNX 6.6 x86 by a non root user
|
Stefan Holzmüller
11/25/2014 5:15 AM
post112424
|
Access the proc filesystem on QNX 6.6 x86 by a non root user
I have two Systems to test on.
1. A Pre compiled QNX 6.5 distribution with diskboot
2. A custom build image with QNX 6.6
On QNX 6.5 it is possible to run the following command as a non root user:
$ showmem -P
$ id
uid=1000(tester) gid=1000(tester)
Under QNX 6.6 the same command produces the following errors:
$ showmem -P
mem_offset64_peer() failed (Operation not permitted): pid=1, vaddr=0xf4400000
Unable to get phys addrs for pid: 1
This process will be ignored
mem_offset64_peer() failed (Operation not permitted): pid=2, vaddr=0x07fc7000
Unable to get phys addrs for pid: 2
This process will be ignored
...
$ id
uid=1000(tester) gid=1000(tester) groups=1000(tester),100(users)
I have changed the boot command so every user on the system has access to proc:
procnto-smp-instr -v -u 0002
$ ls -l /proc/
...
dr-xr-xr-x 2 root root 1 Nov 24 17:44 3
dr-xr-xr-x 2 root root 1 Nov 24 17:44 36883
dr-xr-xr-x 2 root root 1 Nov 24 17:44 36887
...
If I try to list process number 3 it works
$ ls -l /proc/3
total 1882
-rw-rw-r-- 1 root root 962560 Nov 24 17:44 as
-rw-rw-r-- 1 root root 9 Nov 24 17:44 cmdline
-rw-rw-r-- 1 root root 20 Nov 24 17:44 exefile
But the user is unable to open this for example
$ ls -l /proc/36883
ls: Operation not permitted (/proc/36883)
Is the access restricted to the root user?
Thanks
|
|
|