* BUG 4599: Fix failure when setting attributes.
* BUG 4634: Type of the size parameter to getpeername in
libsmbclient code was wrong.
-
+ * Fix libsmbclient interaction with links on Vista and properly
+ detect non-NTSTATUS errors.
+
o Jim McDonough <jmcd@us.ibm.com>
* BUG 4630: Fix special case of unix_to_nt_time() for TIME_T_MAX
#define STATUS_NO_MORE_FILES NT_STATUS(0x80000006)
#define NT_STATUS_NO_MORE_ENTRIES NT_STATUS(0x8000001a)
+/* Vista Status codes. */
+#define STATUS_INACCESSIBLE_SYSTEM_SHORTCUT NT_STATUS(0x8000002d)
+
#define STATUS_MORE_ENTRIES NT_STATUS(0x0105)
#define STATUS_SOME_UNMAPPED NT_STATUS(0x0107)
#define ERROR_INVALID_PARAMETER NT_STATUS(0x0057)
return cli_errno_from_nt(status);
}
+ /*
+ * Yuck! A special case for this Vista error. Since its high-order
+ * byte isn't 0xc0, it doesn't match cli_is_nt_error() above.
+ */
+ status = cli_nt_error(cli);
+ if (NT_STATUS_V(status) == NT_STATUS_V(STATUS_INACCESSIBLE_SYSTEM_SHORTCUT)) {
+ return EACCES;
+ }
+
/* for other cases */
return EINVAL;
}
*/
status = cli_nt_error(cli);
- if (NT_STATUS_IS_ERR(status) || NT_STATUS_EQUAL(status,STATUS_NO_MORE_FILES)) {
+ if (NT_STATUS_IS_ERR(status) ||
+ NT_STATUS_EQUAL(status,STATUS_NO_MORE_FILES) ||
+ NT_STATUS_EQUAL(status,STATUS_INACCESSIBLE_SYSTEM_SHORTCUT)) {
goto out;
}