Subject: kern/889: bug with rm/ln -s
To: None <gnats-admin@NetBSD.ORG>
From: Darren Reed <darrenr@vitruvius.arbld.unimelb.EDU.AU>
List: netbsd-bugs
Date: 03/21/1995 16:50:04
>Number:         889
>Category:       kern
>Synopsis:       can't remove short symbolic links
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 21 16:50:02 1995
>Originator:     Darren Reed
>Organization:
University of Melbourne
>Release:        NetBSD-current
>Environment:
Sun Sparc IPC, NetBSD-current
System: NetBSD candella.arbld.unimelb.edu.au 1.0A NetBSD 1.0A (1.0A) #4: Mon Feb 20 18:33:28 EST 1995 root@:/usr/src/sys/arch/sparc/compile/1.0A sparc


>Description:
	Can't remove short symbolic links to files which are owned by
another uid under certain circumstances, (notably the one below with
/tmp) due to the way ownership and permissions are inherited.

>How-To-Repeat:
(candella:/tmp) ln -s /etc/foo baz
(candella:/tmp) rm baz
remove baz? y
rm: baz: Operation not permitted.
(candella:/tmp) ls -algd .
drwxrwxrwt  4 root  wheel  512 Mar 21 20:49 .
(candella:/tmp) ls -algd baz
lrwxrwxrwt  1 root  wheel  8 Mar 21 20:49 baz -> /etc/foo
>Fix:
>Audit-Trail:
>Unformatted: