diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2d2396a48..0c8e76ee3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2008-10-09 Corinna Vinschen + + * path.cc (symlink_info::check_shortcut): Don't check for executability + here. + (symlink_info::check_sysfile): Ditto. + 2008-10-08 Corinna Vinschen * path.cc (path_conv::path_conv): Only assume executability by suffix diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 3b5163eca..47513ae88 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1877,12 +1877,12 @@ symlink_info::check_shortcut (HANDLE in_h) file_header = (win_shortcut_hdr *) buf; if (io.Information != fsi.EndOfFile.LowPart || !cmp_shortcut_header (file_header)) - goto file_not_symlink; + goto out; cp = buf + sizeof (win_shortcut_hdr); if (file_header->flags & WSH_FLAG_IDLIST) /* Skip ITEMIDLIST */ cp += *(unsigned short *) cp + 2; if (!(len = *(unsigned short *) cp)) - goto file_not_symlink; + goto out; cp += 2; /* Check if this is a device file - these start with the sequence :\\ */ if (strncmp (cp, ":\\", 2) == 0) @@ -1898,7 +1898,7 @@ symlink_info::check_shortcut (HANDLE in_h) cp += 2; } if (len > SYMLINK_MAX) - goto file_not_symlink; + goto out; cp[len] = '\0'; res = posixify (cp); } @@ -1906,11 +1906,6 @@ symlink_info::check_shortcut (HANDLE in_h) pflags = PATH_SYMLINK | PATH_LNK; return res; -file_not_symlink: - /* Not a symlink, see if executable. */ - if (!(pflags & PATH_ALL_EXEC) && has_exec_chars ((const char *) &file_header, io.Information)) - pflags |= PATH_EXEC; - out: NtClose (h); return 0; @@ -1965,16 +1960,6 @@ symlink_info::check_sysfile (HANDLE in_h) else if (io.Information == sizeof (cookie_buf) && memcmp (cookie_buf, SOCKET_COOKIE, sizeof (cookie_buf)) == 0) pflags |= PATH_SOCKET; - else - { - /* Not a symlink, see if executable. */ - if (pflags & PATH_ALL_EXEC) - /* Nothing to do */; - else if (has_exec_chars (cookie_buf, io.Information)) - pflags |= PATH_EXEC; - else - pflags |= PATH_NOTEXEC; - } NtClose (h); return res; }