From: Petr Lautrbach <lautrbach@redhat.com>
To: Stephen Smalley <stephen.smalley.work@gmail.com>,
selinux@vger.kernel.org
Subject: Re: [PATCH] libselinux: formally deprecate security_compute_user()
Date: Wed, 16 Oct 2024 19:53:26 +0200 [thread overview]
Message-ID: <87v7xskk89.fsf@redhat.com> (raw)
In-Reply-To: <20241004164605.7607-1-stephen.smalley.work@gmail.com>
Stephen Smalley <stephen.smalley.work@gmail.com> writes:
> It was originally marked for deprecation back in Feb 2020,
> commit a41dfeb55d43 ("libselinux: deprecate security_compute_user(),
> update man pages"), but the attribute was not added at the time.
>
> Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Acked-by: Petr Lautrbach <lautrbach@redhat.com>
> ---
> libselinux/include/selinux/selinux.h | 6 ++++++
> libselinux/src/compute_user.c | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
> index 1318a66a..50419a7c 100644
> --- a/libselinux/include/selinux/selinux.h
> +++ b/libselinux/include/selinux/selinux.h
> @@ -263,9 +263,15 @@ extern int security_compute_member_raw(const char * scon,
> * These interfaces are deprecated. Use get_ordered_context_list() or
> * one of its variant interfaces instead.
> */
> +#ifdef __GNUC__
> +__attribute__ ((deprecated))
> +#endif
> extern int security_compute_user(const char * scon,
> const char *username,
> char *** con);
> +#ifdef __GNUC__
> +__attribute__ ((deprecated))
> +#endif
> extern int security_compute_user_raw(const char * scon,
> const char *username,
> char *** con);
> diff --git a/libselinux/src/compute_user.c b/libselinux/src/compute_user.c
> index f55f945a..d4387aed 100644
> --- a/libselinux/src/compute_user.c
> +++ b/libselinux/src/compute_user.c
> @@ -96,7 +96,9 @@ int security_compute_user(const char * scon,
> if (selinux_trans_to_raw_context(scon, &rscon))
> return -1;
>
> + IGNORE_DEPRECATED_DECLARATION_BEGIN
> ret = security_compute_user_raw(rscon, user, con);
> + IGNORE_DEPRECATED_DECLARATION_END
>
> freecon(rscon);
> if (!ret) {
> --
> 2.40.1
next prev parent reply other threads:[~2024-10-16 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 16:46 [PATCH] libselinux: formally deprecate security_compute_user() Stephen Smalley
2024-10-16 17:53 ` Petr Lautrbach [this message]
2024-10-30 13:12 ` James Carter
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=87v7xskk89.fsf@redhat.com \
--to=lautrbach@redhat.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.