add new PTRACE_SECCOMP_GET_FILTER ptrace command
[musl] / src / passwd / getspnam_r.c
index 15f8c87..9233952 100644 (file)
@@ -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;
                }