summaryrefslogtreecommitdiff
path: root/modules/pam_umask/pam_umask.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2006-01-13 20:59:48 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2006-01-13 20:59:48 +0000
commit32f63996385baae4f02d962bef3a674dddb9bbf6 (patch)
tree0ecefe53bb636da3df9b00a3877260a01d7e67da /modules/pam_umask/pam_umask.c
parenta451694a367d69b1670b92d65922861493d34086 (diff)
Relevant BUGIDs:
Purpose of commit: bugfix Commit summary: --------------- 2006-01-13 Thorsten Kukuk <kukuk@thkukuk.de> * libpam_misc/misc_conv.c (misc_conv): Fix strict aliasing error. * modules/pam_umask/pam_umask.c (search_key): Don't ignore EOF/error return value from fgets(). * configure.in: Check for getline and getdelim
Diffstat (limited to 'modules/pam_umask/pam_umask.c')
-rw-r--r--modules/pam_umask/pam_umask.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/pam_umask/pam_umask.c b/modules/pam_umask/pam_umask.c
index e93efc01..46f25ae7 100644
--- a/modules/pam_umask/pam_umask.c
+++ b/modules/pam_umask/pam_umask.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005 Thorsten Kukuk <kukuk@thkukuk.de>
+ * Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@thkukuk.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -105,8 +105,9 @@ search_key (const char *filename)
buf = malloc (buflen);
}
buf[0] = '\0';
- fgets (buf, buflen - 1, fp);
- if (buf != NULL)
+ if (fgets (buf, buflen - 1, fp) == NULL)
+ break;
+ else if (buf != NULL)
n = strlen (buf);
else
n = 0;