From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Mete Durlu <meted@linux.ibm.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/3] lib: Merge security related sources
Date: Tue, 26 Mar 2024 11:24:16 +0100 [thread overview]
Message-ID: <ZgKiUH2_0o0diAH0@yuki> (raw)
In-Reply-To: <20240320102204.475230-2-pvorel@suse.cz>
Hi!
> Merge FIPS and lockdown related library sources to new tst_security.[ch]
> file to shorten number of the files in the library. More security
> related code will be added in next commit.
Sound good.
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> changes v1->v2:
> * New commit: lib: Merge security related sources
>
> I'll send more cleanup in a different patchset.
>
> Kind regards,
> Petr
>
> include/tst_fips.h | 15 ------
> include/tst_lockdown.h | 11 ----
> include/tst_security.h | 17 ++++++
> include/tst_test.h | 4 +-
> lib/tst_fips.c | 24 ---------
> lib/{tst_lockdown.c => tst_security.c} | 73 +++++++++++++++-----------
> 6 files changed, 62 insertions(+), 82 deletions(-)
> delete mode 100644 include/tst_fips.h
> delete mode 100644 include/tst_lockdown.h
> create mode 100644 include/tst_security.h
> delete mode 100644 lib/tst_fips.c
> rename lib/{tst_lockdown.c => tst_security.c} (86%)
>
> diff --git a/include/tst_fips.h b/include/tst_fips.h
> deleted file mode 100644
> index 881c32391..000000000
> --- a/include/tst_fips.h
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-or-later
> -/*
> - * Copyright (c) 2021 Petr Vorel <pvorel@suse.cz>
> - */
> -
> -#ifndef TST_FIPS_H__
> -#define TST_FIPS_H__
> -
> -/*
> - * Detect whether FIPS enabled
> - * @return 0: FIPS not enabled, 1: FIPS enabled
> - */
> -int tst_fips_enabled(void);
> -
> -#endif /* TST_FIPS_H__ */
> diff --git a/include/tst_lockdown.h b/include/tst_lockdown.h
> deleted file mode 100644
> index 07e90c1af..000000000
> --- a/include/tst_lockdown.h
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-or-later
> - * Copyright (c) Linux Test Project, 2020-2021
> - */
> -
> -#ifndef TST_LOCKDOWN_H
> -#define TST_LOCKDOWN_H
> -
> -int tst_secureboot_enabled(void);
> -int tst_lockdown_enabled(void);
> -
> -#endif /* TST_LOCKDOWN_H */
> diff --git a/include/tst_security.h b/include/tst_security.h
> new file mode 100644
> index 000000000..438b16dbb
> --- /dev/null
> +++ b/include/tst_security.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later
> + * Copyright (c) Linux Test Project, 2020-2024
> + */
> +
> +#ifndef TST_SECURITY_H__
> +#define TST_SECURITY_H__
> +
> +/*
> + * Detect whether FIPS enabled
> + * @return 0: FIPS not enabled, 1: FIPS enabled
> + */
> +int tst_fips_enabled(void);
> +
> +int tst_lockdown_enabled(void);
> +int tst_secureboot_enabled(void);
> +
> +#endif /* TST_SECURITY_H__ */
> diff --git a/include/tst_test.h b/include/tst_test.h
> index 47b5902f9..98d74d82e 100644
> --- a/include/tst_test.h
> +++ b/include/tst_test.h
> @@ -40,8 +40,8 @@
> #include "tst_capability.h"
> #include "tst_hugepage.h"
> #include "tst_assert.h"
> -#include "tst_lockdown.h"
> -#include "tst_fips.h"
> +#include "tst_security.h"
> +#include "tst_security.h"
Huh, included twice?
Other than that:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-03-26 10:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 10:22 [LTP] [PATCH v2 0/3] fanotify14 on SELinux fix + lib source merge Petr Vorel
2024-03-20 10:22 ` [LTP] [PATCH v2 1/3] lib: Merge security related sources Petr Vorel
2024-03-26 10:24 ` Cyril Hrubis [this message]
2024-03-26 11:38 ` Petr Vorel
2024-03-26 11:44 ` Petr Vorel
2024-03-20 10:22 ` [LTP] [PATCH v2 2/3] lib: Add tst_selinux_enforcing() Petr Vorel
2024-03-26 10:26 ` Cyril Hrubis
2024-03-20 10:22 ` [LTP] [PATCH v2 3/3] fanotify14: fix anonymous pipe testcases Petr Vorel
2024-03-26 10:41 ` Cyril Hrubis
2024-03-26 11:42 ` Petr Vorel
2024-03-26 11:53 ` Petr Vorel
2024-03-26 12:41 ` Cyril Hrubis
2024-03-26 14:30 ` Petr Vorel
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=ZgKiUH2_0o0diAH0@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=meted@linux.ibm.com \
--cc=pvorel@suse.cz \
/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