On Tue, Apr 08, 2008 at 01:09:23AM +0200, Karel Zak wrote: > + while(fgets(line, len + 2, fd)) { > + int c = line[len]; > + if(!strncmp(line, user, len) && c == ':') { > local = 1; > break; > } > + while(c != '\n' && (c = fgetc(fd)) != EOF); sorry.. if (line[strlen(line) - 1] != '\n') while((c = fgetc(fd)) != EOF && c != '\n'); Karel -- Karel Zak <kzak@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html