summaryrefslogtreecommitdiff
path: root/Linux-PAM/modules/pam_time/pam_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'Linux-PAM/modules/pam_time/pam_time.c')
-rw-r--r--Linux-PAM/modules/pam_time/pam_time.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Linux-PAM/modules/pam_time/pam_time.c b/Linux-PAM/modules/pam_time/pam_time.c
index 5757a557..c04180f2 100644
--- a/Linux-PAM/modules/pam_time/pam_time.c
+++ b/Linux-PAM/modules/pam_time/pam_time.c
@@ -1,15 +1,15 @@
/* pam_time module */
/*
- * $Id: pam_time.c,v 1.1.1.2 2002/09/15 20:08:59 hartmans Exp $
+ * $Id: pam_time.c,v 1.5 2004/09/22 09:37:50 kukuk Exp $
*
* Written by Andrew Morgan <morgan@linux.kernel.org> 1996/6/22
* (File syntax and much other inspiration from the shadow package
* shadow-960129)
*/
-const static char rcsid[] =
-"$Id: pam_time.c,v 1.1.1.2 2002/09/15 20:08:59 hartmans Exp $;\n"
+static const char rcsid[] =
+"$Id: pam_time.c,v 1.5 2004/09/22 09:37:50 kukuk Exp $;\n"
"\t\tVersion 0.22 for Linux-PAM\n"
"Copyright (C) Andrew G. Morgan 1996 <morgan@linux.kernel.org>\n";
@@ -127,6 +127,7 @@ static int read_field(int fd, char **buf, int *from, int *to)
i = read(fd, *to + *buf, PAM_TIME_BUFLEN - *to);
if (i < 0) {
_log_err("error reading " PAM_TIME_CONF);
+ close(fd);
return -1;
} else if (!i) {
close(fd);
@@ -166,6 +167,7 @@ static int read_field(int fd, char **buf, int *from, int *to)
} else {
_log_err("internal error in " __FILE__
" at line %d", __LINE__ );
+ close(fd);
return -1;
}
break;