1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

24 Commits

Author SHA1 Message Date
Ralph Boehme
1650e793ed s3:lib/errmap_unix: map EOVERFLOW to NT_STATUS_ALLOTTED_SPACE_EXCEEDED
vfs_fruit returns the correct error NT_STATUS_ALLOTTED_SPACE_EXCEEDED
when an attempt is made to extend the AFP_AfpInfo stream beyond 60
bytes.

This will be used in a subsequent commit in vfs_fruit.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11347

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-12-21 23:21:17 +01:00
Volker Lendecke
ed00ac21dc lib: Add EMSGSIZE to map_nt_error_from_unix
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2014-09-18 20:36:11 +02:00
Christian Ambach
245b5ffdde s3:lib add mapping for ETXTBSY
add ETXTBSY to the errno->STATUS conversion table.
It will be mapped to STATUS_SHARING_VIOLATION

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-06-25 12:54:00 +02:00
Stefan Metzmacher
fd261fea74 s3:lib/errmap_unix: map EPIPE to NT_STATUS_CONNECTION_DISCONNECTED
This lets map_nt_error_from_unix() return the same value as
map_nt_error_from_unix_common().

There are no callers relying on NT_STATUS_PIPE_BROKEN.

metze
2011-10-25 17:58:33 +02:00
Andrew Bartlett
4162c7b74a errors: reorder error codes for easier s3/s4 comparison 2011-06-17 17:09:00 +10:00
Andrew Bartlett
9d5b53921d s3-lib Improve indentation of errmap_unix
This also makes it easier to compare and contrast with the source4
version, because the differences here matter, and need to be resolved
with care.

Andrew Bartlett
2011-05-31 02:57:19 +02:00
Andrew Bartlett
aa848c12eb s3-lib: Use ARRAY_SIZE() to walk the error mapping tables
This gives a constant termination condition, and may help the compiler.

Andrew Bartlett
2011-05-31 02:57:19 +02:00
Andrew Bartlett
cad704e836 errors: Remove unused unix_to_werror() 2011-05-06 07:51:24 +02:00
Andrew Bartlett
fa289e8982 s3-lib Remove unused dos error codes from errmap_unix
This also makes unix_nt_errmap private to errmap_unix.c and errormap.c
so the tables themselves cannot be duplicate symbols until merged.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Kai Blin
278c6f8fc5 errormap: Add unix_to_werror() function
While this function technically is closest to the
map_nt_status_from_unix() function, I think it is better to keep the new
function in line with our usual fooerror_to_barerror() naming scheme.

Signed-off-by: Kai Blin <kai@samba.org>

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Wed Jan 26 23:07:24 CET 2011 on sn-devel-104
2011-01-26 23:07:24 +01:00
Surbhi Palande
9b8f7a2a01 -ENOTSUP translates to NT_STATUS_NOT_SUPPORTED
https://launchpad.net/bugs/276472

This patch adds the translation of Unix Error code -ENOTSUP to NT Error Code
NT_STATUS_NOT_SUPPORTED. The absense of this translation wrongly sends back to
the client a STATUS_DENIED message in samba3.

Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com>
2010-08-19 12:11:26 +02:00
Stefan Metzmacher
e91d5dbed0 s3:error_map: make NTSTATUS -> errno -> NTSTATUS mapping consistent for NT_STATUS_INVALID_PARAMETER
Why have we mapped EINVAL -> NT_STATUS_INVALID_HANDLE before?

metze
2009-08-27 16:45:39 +02:00
Stefan Metzmacher
14888c21ac s3:lib: map ECONNRESET to NT_STATUS_CONNECTION_RESET
metze
2009-08-12 13:27:58 +02:00
Stefan Metzmacher
fafe2589e6 s3:lib: map ENOSYS to NT_STATUS_NOT_SUPPORTED instead of NT_STATUS_ACCESS_DENIED
Jeremy: please check and decide if we want to backport this.

metze
2009-07-15 11:55:39 +02:00
Björn Jacke
e1eb48bc6b s3: map NetBSD's errno on posix open calls for symlinks
This is well undocumented but NetBSD returns EFTYPE on O_NOFOLLOW open calls on
symlinks.
2009-06-04 22:09:10 +02:00
Stefan Metzmacher
4b6cbe80b2 s3:errormap: add ECANCELED, ERRDOS/ERRbadfid, NT_STATUS_CANCELLED mapping
If someone knows a better dos error, please tell me...

metze
2009-03-06 16:37:19 +01:00
Jeremy Allison
2024d87cf5 Make map_errno_from_nt_status() a generic call, not just a cli specific one.
Remove some unused calls from vfs_acl_xattr. Test for SD's on existing files.
Jeremy.
2008-10-07 14:43:42 -07:00
Andrew Tridgell
8b25ce06ce I found lots of places where we assume error will be set when calling
one of our virtualised functions, such as db_open(), but error is only
set when a system call fails, and it is not uncommon for us to fail a
function internally without ever making a system call. That led to us
passing back success when a function had in fact failed.

I found two places where we relied on map_nt_error_from_unix()
returning success when errno==0, but lots and lots of places where we
relied on the reverse, so I fixed those two places.

map_nt_error_from_unix() will now always return an error, returning
NT_STATUS_UNSUCCESSFUL if errno is 0
(cherry picked from commit 69d40ca4c1af925d4b0e59ddc69ef8c26e6501d1)
(This used to be commit 834684a524)
2008-08-12 21:37:16 +02:00
Volker Lendecke
14e7c292bc Add an error mapping for ENOATTR
(This used to be commit 9f0d778490)
2008-01-19 22:58:17 +01:00
Jeremy Allison
da0758cb04 r23845: Second part of the fix for #4777. Looks like on AIX opendir
returns an errno of ELOOP for a symlink of msdfs:server\path\to\link.
Cope with this by mapping to a known error NT_STATUS_OBJECT_PATH_NOT_FOUND
that we know dfs_path_lookup should ignore.
Jeremy.
(This used to be commit d4a7411c48)
2007-10-10 12:28:34 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
4a77ae5af8 r23550: Add more UNIX error -> NT status mappings.
Jeremy.
(This used to be commit 1e66a8340e)
2007-10-10 12:23:27 -05:00
Volker Lendecke
6426d8b4a0 r23224: Move map_nt_error_from_unix to lib/errmap_unix.c. This function is
useful even in binaries that don't link in libsmb
(This used to be commit 52545d1192)
2007-10-10 12:22:56 -05:00