VERY SERIOUS rmdir bug

Dave Lukes dave at inset.UUCP
Tue Jul 22 22:28:58 AEST 1986


In article <707 at basser.oz> john at basser.oz (John Mackin) writes:
>	...
>  I believe that the bug will be likely to be found
>on any machine that doesn't do rmdir by system call, although I haven't
>checked sysV sources, not having any handy.
>
>To demonstrate the bug, do this:
>
>$ mkdir foo foo/bar
>$ rmdir foo/bar/../bar
>(rmdir will cough along the lines of "foo/bar/../bar not removed")

I just tried this on our V.2 VAX and it does exactly the same thing (yawn) ....

This seems to be another variant on the:

	$ mkdir foo
	$ cd foo
	$ rmdir `pwd`

scenario which caused confusion on V7. 

>We have fixed rmdir, but I would like to wait a couple of days to
>see if I can think of any more problems (or any bugs in the fix,
>which wasn't simple) before posting a diff.

Good: give that fix a really HAAAAAARRRRRRRRD time.

What worries me is how many other hidden nasties are waiting in that nasty
little (~~100 lines) piece of code.
Well, at least we don't have symbolic links to confuse things even more.

	XXXXXX
-- 

		Dave Lukes. (...!inset!dave)

``Fox hunting: the unspeakable chasing the inedible'' -- Oscar Wilde



More information about the Comp.unix.wizards mailing list