diff options
author | Gerald Carter <jerry@samba.org> | 2007-05-25 04:02:25 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2007-05-25 04:02:25 +0000 |
commit | b33bce9885665434bd809054d3aadf6b85e8cf03 (patch) | |
tree | 5faf441fecb0a79a79ab1866d3f6a0564bcd7a13 | |
parent | 60ff6bd881a63d41ace05d8b296ba836ca7cd39b (diff) | |
download | samba-b33bce9885665434bd809054d3aadf6b85e8cf03.tar.gz |
r23130: merge Derrell's change from SAMBA_3_0_25 svn r23120samba-3.0.25a
-rw-r--r-- | WHATSNEW.txt | 4 | ||||
-rw-r--r-- | source/include/nterr.h | 3 | ||||
-rw-r--r-- | source/libsmb/clierror.c | 9 | ||||
-rw-r--r-- | source/libsmb/clitrans.c | 4 |
4 files changed, 18 insertions, 2 deletions
diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 55dadc8cf2a..aa04c38d0f0 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -98,7 +98,9 @@ o Derrell Lipman <derrell@samba.org> * 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 diff --git a/source/include/nterr.h b/source/include/nterr.h index 913ea5799e3..8a667707c8c 100644 --- a/source/include/nterr.h +++ b/source/include/nterr.h @@ -30,6 +30,9 @@ #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) diff --git a/source/libsmb/clierror.c b/source/libsmb/clierror.c index f85fc5c5522..ff6fbf522fe 100644 --- a/source/libsmb/clierror.c +++ b/source/libsmb/clierror.c @@ -380,6 +380,15 @@ int cli_errno(struct cli_state *cli) 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; } diff --git a/source/libsmb/clitrans.c b/source/libsmb/clitrans.c index 27207e72e2f..f212f499940 100644 --- a/source/libsmb/clitrans.c +++ b/source/libsmb/clitrans.c @@ -197,7 +197,9 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans, */ 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; } |