From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from Princeton.EDU ([128.112.128.1]) by hawkwind.utcs.toronto.edu with SMTP id <2230>; Sat, 22 May 1993 19:48:56 -0400 Received: from phoenix.Princeton.EDU by Princeton.EDU (5.65b/2.96/princeton) id AA11546; Sat, 22 May 93 19:48:42 -0400 Received: by phoenix.princeton.edu (5.65c/1.113) id AA29247; Sat, 22 May 1993 19:46:36 -0400 Date: Sat, 22 May 1993 19:46:36 -0400 From: Emin Gun Sirer Message-Id: <199305222346.AA29247@phoenix.princeton.edu> To: alan@oldp.astro.wisc.edu Subject: Re: bug in globber? Cc: rc@hawkwind.utcs.toronto.edu >rc doesn't seem to be able to glob through a directory without having >read permission; sh can. I think (and Byron can correct me if I'm wrong) this is because rc globs all the elements of a path if there is globbing anywhere within it. That is, given "foo/../foo*" rc will first match "foo" against everything in ".", ".." against everything in foo (for which it needs read permission) and "foo*" against stuff in "foo/..". This was done to keep the implementation simple and rc's globber works correctly, which is a lot more than what one could say about some other shells. If this is not changed, perhaps it should be documented. I believe the comment regarding globbing disappeared some time between 1.2 and 1.4. If someone spends the time to fix this AND NOT BREAK anything else, so much the better. Judging by the comments in 1.4beta (which I am running), there seems to be code to check for metacharacters in each path element and glob only occasionally; however, trace still shows that every directory on the path is read. Gun. P.S. Someone forgot to add the controversy about hash not introducing a comment if it is not preceded by white space (e.g. lpr -#2), my personal pet peeve, to the wish list.