summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-08-03 20:01:08 +0200
committerTomáš Mráz <tmraz@redhat.com>2020-08-05 16:30:03 +0200
commit155e14e9e23b6dee8e95c3358b18269368110efc (patch)
tree2ff5ee182b02cf2ce68fa1164ca6e08445a36d6f
parent6fc8482e1f59c70ff11cbe2e5ad1101996c41f00 (diff)
pam_unix: replace deprecated security_context_t
libselinux 3.1 deprecated the typedef security_context_t. Use the underlaying type.
-rw-r--r--modules/pam_unix/lckpwdf.-c2
-rw-r--r--modules/pam_unix/passverify.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/pam_unix/lckpwdf.-c b/modules/pam_unix/lckpwdf.-c
index 7145617e..0bc9c5ad 100644
--- a/modules/pam_unix/lckpwdf.-c
+++ b/modules/pam_unix/lckpwdf.-c
@@ -73,7 +73,7 @@ static int lckpwdf(void)
lockfd = open(LOCKFILE, O_WRONLY);
if(lockfd == -1 && errno == ENOENT)
{
- security_context_t create_context;
+ char *create_context;
int rc;
if(getfilecon("/etc/passwd", &create_context))
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
index 4ab7bb2c..c9af24f9 100644
--- a/modules/pam_unix/passverify.c
+++ b/modules/pam_unix/passverify.c
@@ -650,7 +650,7 @@ save_old_password(pam_handle_t *pamh, const char *forwho, const char *oldpass,
struct stat st;
size_t len = strlen(forwho);
#ifdef WITH_SELINUX
- security_context_t prev_context=NULL;
+ char *prev_context=NULL;
#endif
if (howmany < 0) {
@@ -665,7 +665,7 @@ save_old_password(pam_handle_t *pamh, const char *forwho, const char *oldpass,
#ifdef WITH_SELINUX
if (SELINUX_ENABLED) {
- security_context_t passwd_context=NULL;
+ char *passwd_context=NULL;
if (getfilecon("/etc/passwd",&passwd_context)<0) {
return PAM_AUTHTOK_ERR;
};
@@ -821,13 +821,13 @@ PAMH_ARG_DECL(int unix_update_passwd,
int err = 1;
int oldmask;
#ifdef WITH_SELINUX
- security_context_t prev_context=NULL;
+ char *prev_context=NULL;
#endif
oldmask = umask(077);
#ifdef WITH_SELINUX
if (SELINUX_ENABLED) {
- security_context_t passwd_context=NULL;
+ char *passwd_context=NULL;
if (getfilecon("/etc/passwd",&passwd_context)<0) {
return PAM_AUTHTOK_ERR;
};
@@ -945,14 +945,14 @@ PAMH_ARG_DECL(int unix_update_shadow,
int oldmask;
int wroteentry = 0;
#ifdef WITH_SELINUX
- security_context_t prev_context=NULL;
+ char *prev_context=NULL;
#endif
oldmask = umask(077);
#ifdef WITH_SELINUX
if (SELINUX_ENABLED) {
- security_context_t shadow_context=NULL;
+ char *shadow_context=NULL;
if (getfilecon("/etc/shadow",&shadow_context)<0) {
return PAM_AUTHTOK_ERR;
};