lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 3 Mar 2020 14:13:39 -0600
From:   Steve French <smfrench@...il.com>
To:     Qiujun Huang <hqjagain@...il.com>
Cc:     Steve French <sfrench@...ba.org>,
        CIFS <linux-cifs@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs/cifs/cifsacl: fix sid_to_id

Doesn't rc = 0 have to be set earlier (preferably in the declaration
on line 345)?

since line 392 does
            goto got_valid_id;
which appears to leave rc unitialized with your change

On Tue, Mar 3, 2020 at 9:56 AM Qiujun Huang <hqjagain@...il.com> wrote:
>
> fix it to return the errcode.
>
> Signed-off-by: Qiujun Huang <hqjagain@...il.com>
> ---
>  fs/cifs/cifsacl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
> index 716574a..a8d2aa8 100644
> --- a/fs/cifs/cifsacl.c
> +++ b/fs/cifs/cifsacl.c
> @@ -400,6 +400,7 @@
>         if (!sidstr)
>                 return -ENOMEM;
>
> +       rc = 0;
>         saved_cred = override_creds(root_cred);
>         sidkey = request_key(&cifs_idmap_key_type, sidstr, "");
>         if (IS_ERR(sidkey)) {
> @@ -454,7 +455,7 @@
>                 fattr->cf_uid = fuid;
>         else
>                 fattr->cf_gid = fgid;
> -       return 0;
> +       return rc;
>  }
>
>  int
> --
> 1.8.3.1
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ