🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Doug Gwyn <gwyn> Wed, 18 Dec 1985 23:59
SVR2 rm -r bug
#10
Author: Doug Gwyn <gwyn>
Date: Wed, 18 Dec 1985 23:59
22 lines
1300 bytes
I think the SVR2 "rm" utility has a serious bug;
since my version has been heavily modified, I'm
not entirely sure about the unmodified version.
To see if you have the bug, try the following:

	$ mkdir foo foo/bar
	$ touch xxx foo/xxx foo/bar/xxx
	$ rm -r foo/bar xxx
	$ ls -R xxx foo

You should see that "xxx", "foo/bar/xxx", and
"foo/bar" no longer exist and "foo" and "foo/xxx"
still exist.  Any other result indicates that
your "rm" has the bug.

There is also a separate bug in the code that
checks for attempts to "rm ..".

The fixes for these were too extensive to try to
post; if you have received the BRL UNIX System
V emulation for 4.2BSD before this posting, send
me a note and I'll mail you the corrected source.
Re: SVR2 rm -r bug
#15
Author: Doug Gwyn <gwyn>
Date: Wed, 25 Dec 1985 20:36
26 lines
1687 bytes
Reports from actual UNIX System V Release 2 sites
indicate that the original SVR2 "rm" does not have
the particular bug that I reported a few days ago.
Sites that have not modified their version of "rm"
in an attempt to fix some of its other problems
should not worry about this one.  Sites that have
picked up the "rm -r" fix reported to the net long
ago should check for the bug.

Known possible rm problems:
1)  "rm -r" fails when total number of chars in path
reaches 100.
2)  "rm -r" fails when directories are deeply nested
(20 levels).
3)  "rm -r" reads directories directly rather than
using directory access library routines.
4)  "rm .. other_args" fails to remove other_args.
5)  "rm -r", when patched to fix problem # 1, may
fail to work in cases like "rm -r foo/bar x".

Recent BRL System V emulation distributions fixed
problems # 1,2,3 but introduced problem # 5.  This
has now been fixed, along with # 4.

I'm beginning to think that the best way to fix
problems in system software is to totally rewrite it.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads