From: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Shirish Pargaonkar
<shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] cifs: Error STATUS_INVALID_OWNER should map to EACCES
Date: Wed, 09 Dec 2015 11:40:46 +0530 [thread overview]
Message-ID: <1449641446.8051.14.camel@redhat.com> (raw)
In-Reply-To: <1449575977-9783-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On Tue, 2015-12-08 at 17:29 +0530, Sachin Prabhu wrote:
> Error STATUS_INVALID_OWNER maps to -EIO. This was encountered when
> a non priviledged user attempts to change ownership on a file to
> another
> user on a share mounted with the cifsacl mount option.
>
> # chown wintest1 a
> chown: changing ownership of ‘a’: Input/output error
>
> The error returned is confusing for users who do not expect this
> error.
> The proposal is to return -EACCES instead when a STATUS_INVALID_OWNER
> is
> returned.
>
> Signed-off-by: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Maybe EINVAL may be better in this case. Steve/Sirish, do you have any
advise on how we should proceed with this?
Sachin Prabhu
> ---
> fs/cifs/netmisc.c | 2 +-
> fs/cifs/smb2maperror.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
> index abae6dd..301d3d4 100644
> --- a/fs/cifs/netmisc.c
> +++ b/fs/cifs/netmisc.c
> @@ -324,7 +324,7 @@ static const struct {
> ERRDOS, ERRunsup, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, {
> ERRHRD, ERRgeneral, NT_STATUS_UNKNOWN_REVISION}, {
> ERRHRD, ERRgeneral, NT_STATUS_REVISION_MISMATCH}, {
> - ERRHRD, ERRgeneral, NT_STATUS_INVALID_OWNER}, {
> + ERRDOS, ERRnoaccess, NT_STATUS_INVALID_OWNER}, {
> ERRHRD, ERRgeneral, NT_STATUS_INVALID_PRIMARY_GROUP}, {
> ERRHRD, ERRgeneral, NT_STATUS_NO_IMPERSONATION_TOKEN}, {
> ERRHRD, ERRgeneral, NT_STATUS_CANT_DISABLE_MANDATORY}, {
> diff --git a/fs/cifs/smb2maperror.c b/fs/cifs/smb2maperror.c
> index 8257a5a..fd88cfa 100644
> --- a/fs/cifs/smb2maperror.c
> +++ b/fs/cifs/smb2maperror.c
> @@ -384,7 +384,7 @@ static const struct status_to_posix_error
> smb2_error_map_table[] = {
> "STATUS_CTL_FILE_NOT_SUPPORTED"},
> {STATUS_UNKNOWN_REVISION, -EIO, "STATUS_UNKNOWN_REVISION"},
> {STATUS_REVISION_MISMATCH, -EIO,
> "STATUS_REVISION_MISMATCH"},
> - {STATUS_INVALID_OWNER, -EIO, "STATUS_INVALID_OWNER"},
> + {STATUS_INVALID_OWNER, -EACCES, "STATUS_INVALID_OWNER"},
> {STATUS_INVALID_PRIMARY_GROUP, -EIO,
> "STATUS_INVALID_PRIMARY_GROUP"},
> {STATUS_NO_IMPERSONATION_TOKEN, -EIO,
> "STATUS_NO_IMPERSONATION_TOKEN"},
> {STATUS_CANT_DISABLE_MANDATORY, -EIO,
> "STATUS_CANT_DISABLE_MANDATORY"},
prev parent reply other threads:[~2015-12-09 6:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 11:59 [PATCH] cifs: Error STATUS_INVALID_OWNER should map to EACCES Sachin Prabhu
[not found] ` <1449575977-9783-1-git-send-email-sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-09 6:10 ` Sachin Prabhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449641446.8051.14.camel@redhat.com \
--to=sprabhu-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.