Bug in csh/tcsh 6.12 (and later): ignoring 'x' attribute on files in path

2004-07-07 Thread Tim Hubberstey
It appears that csh/tcsh executes any file it finds that matches the
filename specified as a command, regardless of whether or not the 'x'
bit is set. I have run the following check on both 6.12 and the latest,
6.13-2, on 3 different computers, with the same results.

% ls -l not_a_script
-rw-rw-rw- 1 Administ None 20 Jul  6 23:49 not_a_script

% cat not_a_script
echo This is wrong!

% not_a_script
This is wrong!




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
Cygwin Win95/NT Configuration Diagnostics
Current System Time: Wed Jul 07 00:52:34 2004

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4

Path:   .
c:\Home\TravelPak\script
c:\home\cygwinhome\Administrator\bin
C:\cygwin\usr\local\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6\bin
c:\EDA_tools\modeltech\win32pe
c:\EDA_tools\Xilinx\bin\nt
c:\WINNT\system32
c:\WINNT
c:\WINNT\System32\Wbem
c:\bin
c:\bat
c:\borland\bcc55\bin

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 500(Administrator) GID: 513(None)
513(None)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 500(Administrator) GID: 513(None)
513(None)   544(Administrators)
545(Users)

SysDir: C:\WINNT\system32
WinDir: C:\WINNT

HOME = `c:\home\cygwinhome\Administrator'
MAKE_MODE = `unix'
PWD = `/home/Administrator'
USER = `Administrator'

ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPDATA = `C:\Documents and Settings\Administrator\Application Data'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
COMPUTERNAME = `LAPTOP'
COMSPEC = `C:\WINNT\system32\cmd.exe'
CVS_RSH = `/bin/ssh'
DESK = `/c/Documents and Settings/Administrator/Desktop'
DISPLAY = `127.0.0.1:0.0'
GROUP = `None'
HOMEDRIVE = `C:'
HOMEPATH = `\Documents and Settings\Administrator'
HOST = `laptop'
HOSTNAME = `laptop'
HOSTTYPE = `i386'
INFOPATH = 
`/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info:'
LESS = `-E -F -X'
LOGNAME = `Administrator'
LOGONSERVER = `\\LAPTOP'
MACHTYPE = `i386'
MANPATH = `/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man:'
NUMBER_OF_PROCESSORS = `1'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
OSTYPE = `posix'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 5 Stepping 2, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0502'
PROGRAMFILES = `C:\Program Files'
PROMPT = `$P$G'
PS1 = `\[\033]0;\w\007
[EMAIL PROTECTED] \[\033[33m\w\033[0m\]
$ '
SHLVL = `1'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TERM = `xterm'
TZ = `PST8PDT7,M4.1.0/2,M10.5.0/2'
USERDOMAIN = `LAPTOP'
USERNAME = `Administrator'
USERPROFILE = `C:\Documents and Settings\Administrator'
VENDOR = `intel'
WINDIR = `C:\WINNT'
WINDOWID = `4194318'
_ = `/usr/X11R6/bin/xterm'
nedit_winsize = `80x51'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x0022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:\cygwin/bin'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:\cygwin/lib'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/X11R6/lib/X11/fonts
  (default) = `C:\cygwin\usr\X11R6\lib\X11\fonts'
  flags = 0x000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd   N/AN/A
c:  hd  NTFS   11507Mb  52% CP CS UN PA FC 

C:\cygwin  / system  binmode
C:\cygwin/bin  /usr/bin  system  binmode
C:\cygwin/lib  /usr/lib  system  binmode
C:\cygwin\usr\X11R6\lib\X11\fonts  /usr/X11R6/lib/X11/fonts  system  binmode
.  /cygdrive system  binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Not Found: gdb
Found: C:\cygwin\bin\grep.exe
Found: c:\bin\grep.exe
Warning: C:\cygwin\bin\grep.exe hides c:\bin\grep.exe
Found: \bin\grep.exe
Warning: C:\cygwin\bin\grep.exe hides \bin\grep.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\

Re: Bug in csh/tcsh 6.12 (and later): ignoring 'x' attribute on files in path

2004-07-08 Thread Corinna Vinschen
On Jul  7 01:20, Tim Hubberstey wrote:
> It appears that csh/tcsh executes any file it finds that matches the
> filename specified as a command, regardless of whether or not the 'x'
> bit is set. I have run the following check on both 6.12 and the latest,
> 6.13-2, on 3 different computers, with the same results.
> 
> % ls -l not_a_script
> -rw-rw-rw- 1 Administ None 20 Jul  6 23:49 not_a_script
> 
> % cat not_a_script
> echo This is wrong!
> 
> % not_a_script
> This is wrong!

It turned out to be a buglet in Cygwin which didn't check for executablity
when it found that a script should be executed.  I've checked in a fix.

Thanks for the report,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader  mailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/