]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: Change translation of STATUS_PRIVILEGE_NOT_HELD to -EPERM
authorPali Rohár <pali@kernel.org>
Mon, 14 Oct 2024 11:00:48 +0000 (13:00 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 29 Jan 2025 22:52:25 +0000 (16:52 -0600)
commit438e2116d7bd3095184d1997b367380c4f465164
tree5041b2620f944b17235af1a8b89523cfa219b4a8
parentf764fab72d98833b47d389ac2ed35bd000132d87
cifs: Change translation of STATUS_PRIVILEGE_NOT_HELD to -EPERM

STATUS_PRIVILEGE_NOT_HELD indicates that user does not have privilege to
issue some operation, for example to create symlink.

Currently STATUS_PRIVILEGE_NOT_HELD is translated to -EIO. Change it to
-EPERM which better describe this error code.

Note that there is no ERR* code usable in ntstatus_to_dos_map[] table which
can be used to -EPERM translation, so do explicit translation in
map_smb_to_linux_error() function.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Tom Talpey <tom@talpey.com>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/netmisc.c
fs/smb/client/smb2maperror.c