#519 closed defect (fixed)

RTEMS don't check write permissions in parent directory for file or directory delete

Reported by: sa Owned by: Jennifer Averett
Priority: lowest Milestone: 2
Component: fs Version: 4.6
Severity: normal Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

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.

Release:
RTEMS-4.6

Attachments (1)

unlinkpatch.txt (3.6 KB) - added by sa on Dec 3, 2006 at 1:31:12 PM.
unlinkpatch.txt

Download all attachments as: .zip

Change History (2)

comment:1 Changed on Nov 25, 2003 at 4:36:18 PM by Jennifer Averett

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Applied attached patch to trunk and branch.

Changed on Dec 3, 2006 at 1:31:12 PM by sa

Attachment: unlinkpatch.txt added

unlinkpatch.txt

Note: See TracTickets for help on using tickets.