diff mbox series

[v2] libselinux: mark security_context_t typedef as deprecated

Message ID 20200430150318.6406-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Headers show
Series [v2] libselinux: mark security_context_t typedef as deprecated | expand

Commit Message

Christian Göttsche April 30, 2020, 3:03 p.m. UTC
Follow-up of: 9eb9c9327563014ad6a807814e7975424642d5b9 ("Get rid of security_context_t and fix const declarations.")

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
v2: use the common deprecation style

 libselinux/include/selinux/selinux.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Roberts, William C April 30, 2020, 3:31 p.m. UTC | #1
> -----Original Message-----
> From: selinux-owner@vger.kernel.org [mailto:selinux-owner@vger.kernel.org]
> On Behalf Of Christian Göttsche
> Sent: Thursday, April 30, 2020 10:03 AM
> To: selinux@vger.kernel.org
> Subject: [PATCH v2] libselinux: mark security_context_t typedef as deprecated
> 
> Follow-up of: 9eb9c9327563014ad6a807814e7975424642d5b9 ("Get rid of
> security_context_t and fix const declarations.")
> 
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> ---
> v2: use the common deprecation style
> 
>  libselinux/include/selinux/selinux.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libselinux/include/selinux/selinux.h
> b/libselinux/include/selinux/selinux.h
> index aaf28ffd..c22834e5 100644
> --- a/libselinux/include/selinux/selinux.h
> +++ b/libselinux/include/selinux/selinux.h
> @@ -14,7 +14,11 @@ extern int is_selinux_enabled(void);  extern int
> is_selinux_mls_enabled(void);
> 
>  /* No longer used; here for compatibility with legacy callers. */ -typedef char
> *security_context_t;
> +typedef char *security_context_t
> +#ifdef __GNUC__
> +__attribute__ ((deprecated))
> +#endif
> +;
> 
>  /* Free the memory allocated for a context by any of the below get* calls. */
> extern void freecon(char * con);
> --
> 2.26.2

Acked-by: William Roberts <william.c.roberts@intel.com>
William Roberts May 1, 2020, 3:48 p.m. UTC | #2
> > -----Original Message-----
> > From: selinux-owner@vger.kernel.org [mailto:selinux-owner@vger.kernel.org]
> > On Behalf Of Christian Göttsche
> > Sent: Thursday, April 30, 2020 10:03 AM
> > To: selinux@vger.kernel.org
> > Subject: [PATCH v2] libselinux: mark security_context_t typedef as deprecated
> >
> > Follow-up of: 9eb9c9327563014ad6a807814e7975424642d5b9 ("Get rid of
> > security_context_t and fix const declarations.")
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> > ---
> > v2: use the common deprecation style
> >
> >  libselinux/include/selinux/selinux.h | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/libselinux/include/selinux/selinux.h
> > b/libselinux/include/selinux/selinux.h
> > index aaf28ffd..c22834e5 100644
> > --- a/libselinux/include/selinux/selinux.h
> > +++ b/libselinux/include/selinux/selinux.h
> > @@ -14,7 +14,11 @@ extern int is_selinux_enabled(void);  extern int
> > is_selinux_mls_enabled(void);
> >
> >  /* No longer used; here for compatibility with legacy callers. */ -typedef char
> > *security_context_t;
> > +typedef char *security_context_t
> > +#ifdef __GNUC__
> > +__attribute__ ((deprecated))
> > +#endif
> > +;
> >
> >  /* Free the memory allocated for a context by any of the below get* calls. */
> > extern void freecon(char * con);
> > --
> > 2.26.2
>
> Acked-by: William Roberts <william.c.roberts@intel.com>

Merged:
https://github.com/SELinuxProject/selinux/pull/233

Thanks
diff mbox series

Patch

diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
index aaf28ffd..c22834e5 100644
--- a/libselinux/include/selinux/selinux.h
+++ b/libselinux/include/selinux/selinux.h
@@ -14,7 +14,11 @@  extern int is_selinux_enabled(void);
 extern int is_selinux_mls_enabled(void);
 
 /* No longer used; here for compatibility with legacy callers. */
-typedef char *security_context_t;
+typedef char *security_context_t
+#ifdef __GNUC__
+__attribute__ ((deprecated))
+#endif
+;
 
 /* Free the memory allocated for a context by any of the below get* calls. */
 extern void freecon(char * con);