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]
Message-ID: <CAHC9VhTiGU_PMDGNKdFD977_Uk2iqVKr51kOzJV+njc0B9Eq5g@mail.gmail.com>
Date:   Tue, 25 Jan 2022 20:04:09 -0500
From:   Paul Moore <paul@...l-moore.com>
To:     Christian Göttsche <cgzones@...glemail.com>
Cc:     selinux@...r.kernel.org,
        Stephen Smalley <stephen.smalley.work@...il.com>,
        Eric Paris <eparis@...isplace.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Ondrej Mosnacek <omosnace@...hat.com>,
        Xiong Zhenwu <xiong.zhenwu@....com.cn>,
        Tyler Hicks <tyhicks@...ux.microsoft.com>,
        Serge Hallyn <serge@...lyn.com>,
        Austin Kim <austin.kim@....com>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>,
        Jeff Vander Stoep <jeffv@...gle.com>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 2/9] selinux: declare path parameters of _genfs_sid const

On Tue, Jan 25, 2022 at 9:14 AM Christian Göttsche
<cgzones@...glemail.com> wrote:
>
> The path parameter is only read from in security_genfs_sid(),
> selinux_policy_genfs_sid() and __security_genfs_sid(). Since a string
> literal is passed as argument, declare the parameter const.
> Also align the parameter names in the declaration and definition.
>
> Reported by clang [-Wwrite-strings]:
>
>     security/selinux/hooks.c:553:60: error: passing 'const char [2]' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
>             rc = security_genfs_sid(&selinux_state, sb->s_type->name, /,
>                                                                       ^~~
>     ./security/selinux/include/security.h:389:36: note: passing argument to parameter 'name' here
>                            const char *fstype, char *name, u16 sclass,
>                                                      ^
>
> Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
> ---
>  security/selinux/include/security.h | 4 ++--
>  security/selinux/ss/services.c      | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)

Merged, thanks!

-- 
paul-moore.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ