Operating System - OpenVMS
1828371 Members
3032 Online
109976 Solutions
New Discussion

Re: SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

 
SOLVED
Go to solution
Cass Witkowski
Trusted Contributor

SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

A priviledge user typed in SH* at the $ prompt. In the directory pointed to by DCL$PATH was a command procedure to shutdown the system called SHUTDOWN-DETACHED.COM

Apparently the SH* matched the command procedure and therefore executed this command procedure.

My question is are wildcards valid for searches for DCL$PATH:?

Thanks

Cass Witkowski
5 REPLIES 5
David B Sneddon
Honored Contributor

Re: SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

They certainly are... I deliberately use that
type of construct, but then I am aware of it
and I also know where my DCL$PATH logical
points.

Dave
John Gillings
Honored Contributor
Solution

Re: SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

Cass,

As David said, yes, wildcards in unrecognised command verbs will activate DCL$PATH command procedures or executable images. Beware of typing "*" at the command prompt!

I'm not sure if it was entirely intentional, but it fell out of the implementation of the search. It doesn't appear to be documented specifically, but the search is defined in the OpenVMS Users Manual to be:

"DCL performs the search with the invalid verb as the file specification and "DCL$PATH:.*"

So I guess the wildcard behaviour is implied.

There has been some discussion about preventing wildcard matching, but now that it's been out there for so long, there are probably people who depend on it, like David, so it would be against VMS policies to break it.

Some people put a dummy procedure "0.COM" in DCL$PATH directories to catch * by itself at the DCL prompt, but there's no simple way to catch everything!
A crucible of informative mistakes
Cass Witkowski
Trusted Contributor

Re: SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

Thanks for your quick responses. I learn something new every day.
Art Wiens
Respected Contributor

Re: SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

What version of VMS introduced DCL$PATH?

Art
Jim_McKinney
Honored Contributor

Re: SH* at $ prompt causes DCL$PATH:SHUTDOWN to run

> What version of VMS introduced DCL$PATH?

V6.2 (VAX and Alpha)