aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2024-05-24 17:38:31 +0200
committerChristian Göttsche <cgzones@googlemail.com>2024-05-24 17:38:31 +0200
commit5d548fec5a6a1c7016ce7de108164f100583ba49 (patch)
treec4a2d05be7fb04f75a70cf3acc8862e4d188430c /modules
parentbd2f695b3d89efe0c52bba975f9540634125178a (diff)
downloadpam-5d548fec5a6a1c7016ce7de108164f100583ba49.tar.gz
pam-5d548fec5a6a1c7016ce7de108164f100583ba49.tar.bz2
pam-5d548fec5a6a1c7016ce7de108164f100583ba49.zip
pam_namespace: log getfscreatecon(3) failure
Log in case the current fscreate context could not be retrieved.
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_namespace/pam_namespace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
index 2dab49ef..ba7910f6 100644
--- a/modules/pam_namespace/pam_namespace.c
+++ b/modules/pam_namespace/pam_namespace.c
@@ -1433,7 +1433,9 @@ static int create_polydir(struct polydir_s *polyptr,
#ifdef WITH_SELINUX
if (idata->flags & PAMNS_SELINUX_ENABLED) {
- getfscreatecon_raw(&oldcon_raw);
+ if (getfscreatecon_raw(&oldcon_raw) != 0)
+ pam_syslog(idata->pamh, LOG_NOTICE,
+ "Error retrieving fs create context: %m");
label_handle = selabel_open(SELABEL_CTX_FILE, NULL, 0);
if (!label_handle) {