diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/include/nterr.h | 3 | ||||
-rw-r--r-- | source/libsmb/clierror.c | 9 | ||||
-rw-r--r-- | source/libsmb/clitrans.c | 9 |
3 files changed, 20 insertions, 1 deletions
diff --git a/source/include/nterr.h b/source/include/nterr.h index 913ea5799e3..e14f341de13 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 NT_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 4b222c90155..d98f4282179 100644 --- a/source/libsmb/clierror.c +++ b/source/libsmb/clierror.c @@ -385,6 +385,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(NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT)) { + return EACCES; + } + /* for other cases */ return EINVAL; } diff --git a/source/libsmb/clitrans.c b/source/libsmb/clitrans.c index 3e3ebc1ce1e..d7492b31c35 100644 --- a/source/libsmb/clitrans.c +++ b/source/libsmb/clitrans.c @@ -196,11 +196,18 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans, * returned when a trans2 findfirst/next finishes. * When setting up an encrypted transport we can also * see NT_STATUS_MORE_PROCESSING_REQUIRED here. + * + * Vista returns NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT if the folder + * "<share>/Users/All Users" is enumerated. This is a special pseudo + * folder, and the response does not have parameters (nor a parameter + * length). */ status = cli_nt_error(cli); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { - 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,NT_STATUS_INACCESSIBLE_SYSTEM_SHORTCUT)) { goto out; } } |