[redhat-lspp] [PATCH] pam_namespace : skip directories that don't exist

JANAK DESAI janak at us.ibm.com
Mon Feb 20 18:15:30 UTC 2006


[PATCH] pam_namespace : skip directories that don't exist

While processing a line from the pam namespace module configuration 
file, if the directory to polyinstantiate doesn't exist, skip
that line and continue with the next line in the configuration file.

Signed-off-by: Janak Desai <janak at us.ibm.com>

---

 pam_namespace.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -Naurp Linux-PAM-0.99.3.0-ns2/modules/pam_namespace/pam_namespace.c Linux-PAM-0.99.3.0-ns3/modules/pam_namespace/pam_namespace.c
--- Linux-PAM-0.99.3.0-ns2/modules/pam_namespace/pam_namespace.c	2006-02-17 22:44:37.000000000 +0000
+++ Linux-PAM-0.99.3.0-ns3/modules/pam_namespace/pam_namespace.c	2006-02-20 16:19:28.000000000 +0000
@@ -266,7 +266,7 @@ static int process_line(char *line, cons
      * namespace configuration file.
      */
     dir = strtok_r(line, " \t", &tptr);
-    if (dir == NULL) {
+    if ((dir == NULL) || access(dir, F_OK)) {
         pam_syslog(idata->pamh, LOG_NOTICE, "Invalid line -- skipping");
         return 0;
     }





More information about the redhat-lspp mailing list