aboutsummaryrefslogtreecommitdiff
path: root/Linux-PAM/modules/pam_time/pam_time.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 12:47:05 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 12:47:05 -0800
commit4c51da22e068907adb7857d50f5109a467c94d7c (patch)
treebecf5fbae5dfcbe8896355f59042dc8eaefa7f37 /Linux-PAM/modules/pam_time/pam_time.c
parentefd31890b5ed496a5a00c08a262da240e66a4ddc (diff)
parentab9e8ba11f464fc083fc65a0bc695d60ebc86f3e (diff)
downloadpam-4c51da22e068907adb7857d50f5109a467c94d7c.tar.gz
pam-4c51da22e068907adb7857d50f5109a467c94d7c.tar.bz2
pam-4c51da22e068907adb7857d50f5109a467c94d7c.zip
New upstream version 0.79
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;