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: <a881e6c4-248f-1d00-545d-2b9d3a1005b5@canonical.com>
Date:   Mon, 25 Apr 2022 16:33:07 -0700
From:   John Johansen <john.johansen@...onical.com>
To:     Casey Schaufler <casey@...aufler-ca.com>,
        casey.schaufler@...el.com, jmorris@...ei.org,
        linux-security-module@...r.kernel.org, selinux@...r.kernel.org
Cc:     linux-audit@...hat.com, keescook@...omium.org,
        penguin-kernel@...ove.sakura.ne.jp, paul@...l-moore.com,
        stephen.smalley.work@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v35 24/29] LSM: Add a function to report multiple LSMs

On 4/18/22 07:59, Casey Schaufler wrote:
> Add a new boolean function lsm_multiple_contexts() to
> identify when multiple security modules provide security
> context strings.
> 
> Signed-off-by: Casey Schaufler <casey@...aufler-ca.com>

Reviewed-by: John Johansen <john.johansen@...onical.com>

> ---
>  include/linux/security.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/include/linux/security.h b/include/linux/security.h
> index 2150016492be..3fab84220f88 100644
> --- a/include/linux/security.h
> +++ b/include/linux/security.h
> @@ -232,6 +232,15 @@ static inline bool lsmblob_equal(const struct lsmblob *bloba,
>  extern int lsm_name_to_slot(char *name);
>  extern const char *lsm_slot_to_name(int slot);
>  
> +static inline bool lsm_multiple_contexts(void)
> +{
> +#ifdef CONFIG_SECURITY
> +	return lsm_slot_to_name(1) != NULL;
> +#else
> +	return false;
> +#endif
> +}
> +
>  /**
>   * lsmblob_value - find the first non-zero value in an lsmblob structure.
>   * @blob: Pointer to the data

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ