aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/lckpwdf.-c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-08-03 20:05:00 +0200
committerTomáš Mráz <tmraz@redhat.com>2020-08-05 16:30:03 +0200
commitc7ca67d03cb8b21ceb56e925deb34a6c3337c23b (patch)
treefaad8880f071185f5f79699c96a861d7d745465d /modules/pam_unix/lckpwdf.-c
parent155e14e9e23b6dee8e95c3358b18269368110efc (diff)
downloadpam-c7ca67d03cb8b21ceb56e925deb34a6c3337c23b.tar.gz
pam-c7ca67d03cb8b21ceb56e925deb34a6c3337c23b.tar.bz2
pam-c7ca67d03cb8b21ceb56e925deb34a6c3337c23b.zip
pam_unix: skip context translation
These retrieved contexts are just passed to libselinux functions and not printed or otherwise made available to the outside, so a context translation to human readable MCS/MLS labels is not needed. (see man:setrans.conf(5))
Diffstat (limited to 'modules/pam_unix/lckpwdf.-c')
-rw-r--r--modules/pam_unix/lckpwdf.-c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/pam_unix/lckpwdf.-c b/modules/pam_unix/lckpwdf.-c
index 0bc9c5ad..c3e63155 100644
--- a/modules/pam_unix/lckpwdf.-c
+++ b/modules/pam_unix/lckpwdf.-c
@@ -73,17 +73,17 @@ static int lckpwdf(void)
lockfd = open(LOCKFILE, O_WRONLY);
if(lockfd == -1 && errno == ENOENT)
{
- char *create_context;
+ char *create_context_raw;
int rc;
- if(getfilecon("/etc/passwd", &create_context))
+ if(getfilecon_raw("/etc/passwd", &create_context_raw))
return -1;
- rc = setfscreatecon(create_context);
- freecon(create_context);
+ rc = setfscreatecon_raw(create_context_raw);
+ freecon(create_context_raw);
if(rc)
return -1;
lockfd = open(LOCKFILE, O_CREAT | O_WRONLY, 0600);
- if(setfscreatecon(NULL))
+ if(setfscreatecon_raw(NULL))
return -1;
}
}