about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passwd/getspnam_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passwd/getspnam_r.c b/src/passwd/getspnam_r.c
index 15f8c87b..92339528 100644
--- a/src/passwd/getspnam_r.c
+++ b/src/passwd/getspnam_r.c
@@ -98,7 +98,7 @@ int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct
 
 	pthread_cleanup_push(cleanup, f);
 	while (fgets(buf, size, f) && (k=strlen(buf))>0) {
-		if (skip || strncmp(name, buf, l)) {
+		if (skip || strncmp(name, buf, l) || buf[l]!=':') {
 			skip = buf[k-1] != '\n';
 			continue;
 		}