+2008-10-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check_shortcut): Don't check for executability
+ here.
+ (symlink_info::check_sysfile): Ditto.
+
2008-10-08 Corinna Vinschen <corinna@vinschen.de>
* path.cc (path_conv::path_conv): Only assume executability by suffix
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)
cp += 2;
}
if (len > SYMLINK_MAX)
- goto file_not_symlink;
+ goto out;
cp[len] = '\0';
res = posixify (cp);
}
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;
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;
}