linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Shilovsky <piastryyy@gmail.com>
To: Boris Protopopov <boris.v.protopopov@gmail.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
	Steve French <sfrench@samba.org>,
	samba-technical <samba-technical@lists.samba.org>,
	sblbir@amazon.com
Subject: Re: [PATCH 1/2] Convert owner and group SID offsets to LE format
Date: Tue, 21 Jan 2020 16:25:43 -0800	[thread overview]
Message-ID: <CAKywueQu5sK8gbNurZw0qZppbAJ9C4myqzPdD_6vSVJw=LXPsQ@mail.gmail.com> (raw)
In-Reply-To: <20200106163119.9083-1-boris.v.protopopov@gmail.com>

пн, 6 янв. 2020 г. в 08:31, Boris Protopopov <boris.v.protopopov@gmail.com>:
>
> Convert owner and group SID offsets to LE format
> when writing to ntsd
>
> Signed-off-by: Boris Protopopov <boris.v.protopopov@gmail.com>
> ---
>  setcifsacl.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/setcifsacl.c b/setcifsacl.c
> index f3d0189..9a301e2 100644
> --- a/setcifsacl.c
> +++ b/setcifsacl.c
> @@ -114,12 +114,14 @@ copy_sec_desc(const struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd,
>         if (dacloffset <= osidsoffset) {
>                 /* owners placed at end of ACL */
>                 nowner_sid_ptr = (struct cifs_sid *)((char *)pnntsd + dacloffset + size);
> -               pnntsd->osidoffset = dacloffset + size;
> +               osidsoffset = dacloffset + size;
> +               pnntsd->osidoffset = htole32(osidsoffset);
>                 size = copy_cifs_sid(nowner_sid_ptr, owner_sid_ptr);
>                 bufsize += size;
>                 /* put group SID after owner SID */
>                 ngroup_sid_ptr = (struct cifs_sid *)((char *)nowner_sid_ptr + size);
> -               pnntsd->gsidoffset = pnntsd->osidoffset + size;
> +               gsidsoffset = osidsoffset + size;
> +               pnntsd->gsidoffset = htole32(gsidsoffset);
>         } else {
>                 /*
>                  * Most servers put the owner information at the beginning,
> --
> 2.14.5
>

Merged into "next". Thanks!

--
Best regards,
Pavel Shilovsky

      parent reply	other threads:[~2020-01-22  0:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 16:31 [PATCH 1/2] Convert owner and group SID offsets to LE format Boris Protopopov
2020-01-06 16:31 ` [PATCH] Add support for setting owner and group in ntsd Boris Protopopov
2020-01-08 20:42   ` Pavel Shilovsky
2020-01-09 16:07     ` Boris Protopopov
2020-01-09 18:29       ` Pavel Shilovsky
2020-01-22  0:26         ` Pavel Shilovsky
2020-01-22  0:25 ` Pavel Shilovsky [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='CAKywueQu5sK8gbNurZw0qZppbAJ9C4myqzPdD_6vSVJw=LXPsQ@mail.gmail.com' \
    --to=piastryyy@gmail.com \
    --cc=boris.v.protopopov@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sblbir@amazon.com \
    --cc=sfrench@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).