The typedef security_context_t is deprecated, see https://github.com/SELinuxProject/selinux/commit/9eb9c9327563014ad6a807814e7975424642d5b9 --- lib/commonio.h | 6 +----- src/useradd.c | 3 +++ src/userdel.c | 3 +++ src/usermod.c | 3 +++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/commonio.h b/lib/commonio.h index 64e83073..2bad47a5 100644 --- a/lib/commonio.h +++ b/lib/commonio.h @@ -34,10 +34,6 @@ #ifndef COMMONIO_H #define COMMONIO_H -#ifdef WITH_SELINUX -#include <selinux/selinux.h> -#endif - #include "defines.h" /* bool */ /* @@ -121,7 +117,7 @@ struct commonio_db { /*@dependent@*/ /*@null@*/FILE *fp; #ifdef WITH_SELINUX - /*@null@*/security_context_t scontext; + /*@null@*/char *scontext; #endif /* * Default permissions and owner for newly created data file. diff --git a/src/useradd.c b/src/useradd.c index a0369cd8..dcda3196 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -69,6 +69,9 @@ #include "sgroupio.h" #endif #include "shadowio.h" +#ifdef WITH_SELINUX +#include <selinux/selinux.h> +#endif /* WITH_SELINUX */ #ifdef ENABLE_SUBIDS #include "subordinateio.h" #endif /* ENABLE_SUBIDS */ diff --git a/src/userdel.c b/src/userdel.c index 4248ab80..92bca499 100644 --- a/src/userdel.c +++ b/src/userdel.c @@ -59,6 +59,9 @@ #ifdef SHADOWGRP #include "sgroupio.h" #endif /* SHADOWGRP */ +#ifdef WITH_SELINUX +#include <selinux/selinux.h> +#endif /* WITH_SELINUX */ #ifdef WITH_TCB #include <tcb.h> #include "tcbfuncs.h" diff --git a/src/usermod.c b/src/usermod.c index 3ba011c2..15c70b5c 100644 --- a/src/usermod.c +++ b/src/usermod.c @@ -68,6 +68,9 @@ #ifdef ENABLE_SUBIDS #include "subordinateio.h" #endif /* ENABLE_SUBIDS */ +#ifdef WITH_SELINUX +#include <selinux/selinux.h> +#endif /* WITH_SELINUX */ #ifdef WITH_TCB #include "tcbfuncs.h" #endif -- 2.31.0