]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
struct commonio_db[selinux]: do not use deprecated type security_context_t
authorChristian Göttsche <cgzones@googlemail.com>
Fri, 9 Apr 2021 16:20:41 +0000 (18:20 +0200)
committerChristian Göttsche <cgzones@googlemail.com>
Thu, 6 May 2021 14:58:10 +0000 (16:58 +0200)
The typedef security_context_t is deprecated, see
https://github.com/SELinuxProject/selinux/commit/9eb9c9327563014ad6a807814e7975424642d5b9

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
lib/commonio.h
src/useradd.c
src/userdel.c
src/usermod.c

index 64e830731378056e9d8b484123055fd7dbea69a6..2bad47a5939ee5723c30516fd06712eb68d978ed 100644 (file)
 #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.
index a0369cd8792e1365fa920916a4f1e1d80472002f..dcda31960534aaebf2638751ae62b0190dac154c 100644 (file)
@@ -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 */
index 4248ab80d31828d9aca1f9bc04f2d8b30ce00180..92bca4999136be6edc407b5c3aa33684f720b72b 100644 (file)
@@ -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"
index 3ba011c2b217df940ee284afb3231daf616cf77f..15c70b5c89d928e7fd704524745178b400c82e43 100644 (file)
@@ -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