From 91c66ca82063aaab5db9de0bf76f4456b2b11527 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 24 Jan 2014 15:30:01 +0000 Subject: pam_xauth: log fatal errors preventing xauth process execution * modules/pam_xauth/pam_xauth.c (run_coprocess): Log errors from pipe() and fork() calls. --- modules/pam_xauth/pam_xauth.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/pam_xauth') diff --git a/modules/pam_xauth/pam_xauth.c b/modules/pam_xauth/pam_xauth.c index 88624b1c..e1c00646 100644 --- a/modules/pam_xauth/pam_xauth.c +++ b/modules/pam_xauth/pam_xauth.c @@ -103,9 +103,11 @@ run_coprocess(pam_handle_t *pamh, const char *input, char **output, /* Create stdio pipery. */ if (pipe(ipipe) == -1) { + pam_syslog(pamh, LOG_ERR, "Could not create pipe: %m"); return -1; } if (pipe(opipe) == -1) { + pam_syslog(pamh, LOG_ERR, "Could not create pipe: %m"); close(ipipe[0]); close(ipipe[1]); return -1; @@ -114,6 +116,7 @@ run_coprocess(pam_handle_t *pamh, const char *input, char **output, /* Fork off a child. */ child = fork(); if (child == -1) { + pam_syslog(pamh, LOG_ERR, "Could not fork: %m"); close(ipipe[0]); close(ipipe[1]); close(opipe[0]); -- cgit v1.2.3