Check write permissions in parent directory for file delete
Fernando RUIZ CASAS
correo at fernando-ruiz.com
Mon Nov 10 09:11:36 UTC 2003
On Mon, 10 Nov 2003 11:36:09 +0500, Sergey Ablalimov wrote:
>
> Hello.
>
> I am using IMFS as a base file system. And I do following operations:
> ---------------------------------------------------------------
> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Nov 9 2003. 'help' to list commands.
> shel [/etc] $ whoami
> ant
> shel [/] $ ls
> drwxr-xr-x 1 root root 5092 Jan 01 00:00 dev/
> drwxrwxrwx 1 root root 3484 Nov 02 22:28 disc/
> drwxr-xr-x 1 root root 1340 Nov 02 22:28 etc/
> 3 files 9916 bytes occupied
> shel [/] $ cd etc
> shel [/etc] $ ls
> -rw-r--r-- 1 root root 90 Nov 02 22:28 passwd
> -rw-r--r-- 1 root root 117 Nov 02 22:28 shadow
> -rw-r--r-- 1 root root 42 Nov 02 22:28 group
> -rw-r--r-- 1 root root 34 Nov 02 22:28 issue
> -rw-r--r-- 1 root root 28 Nov 02 22:28 issue.net
> 5 files 311 bytes occupied
> shel [/etc] $ rm issue
> shel [/etc] $ ls
> -rw-r--r-- 1 root root 90 Nov 02 22:28 passwd
> -rw-r--r-- 1 root root 117 Nov 02 22:28 shadow
> -rw-r--r-- 1 root root 42 Nov 02 22:29 group
> -rw-r--r-- 1 root root 28 Nov 02 22:28 issue.net
> 4 files 277 bytes occupied
> shel [/etc] $
> --------------------------------------------------------------------
> I'm not root. I don't have permissions for write in /etc directory, but
> I can delete files from /etc.
> I see in file "cpukit/libcsupport/src/unlink.c". There are no support
> for check write permissions in parent directory.
> Is this RTEMS error?
>
Hi,
Certainly the rtems imfs implementation is not completly verified at this level because the shell
is an contribution and not a kernel part.
At the beginning Rtems is thunk as a root system but not as an user system. All your verification
can be added at the libcsupport library.
AT shell level the unlink call is transparent at the user. The system is the guardian of the
security level.
BRGDS; (FRC)
> --
> Sergey mailto:sa at design.morion.ru
>
>
> ---------------------------------------
> Outgoing mail is certified Virus Free.
> Checked by DKAV anti-virus system (http://www.avp.com).
> Version: 3.5.9.0
51, Le clos des Gênets
Rue de la gare
69730 Genay
France
EMAIL: correo At fernando-ruiz Dot com
More information about the users
mailing list