* lib/commonio.c: Avoid PATH_MAX. On glibc, we can use realpath
with a NULL argument. * src/useradd.c: Replace PATH_MAX by a fixed constant. The buffer was not meant as a storage for a path. * src/useradd.c, src/newusers.c, src/chpasswd.c: Better detection of fgets errors. Lines shall end with a \n, unless we reached the end of file. * libmisc/copydir.c: Avoid PATH_MAX. Support file paths with any length. Added readlink_malloc().
This commit is contained in:
@ -863,10 +863,13 @@ int main (int argc, char **argv)
|
||||
if (NULL != cp) {
|
||||
*cp = '\0';
|
||||
} else {
|
||||
fprintf (stderr, _("%s: line %d: line too long\n"),
|
||||
Prog, line);
|
||||
errors++;
|
||||
continue;
|
||||
if (feof (stdin) == 0) {
|
||||
fprintf (stderr,
|
||||
_("%s: line %d: line too long\n"),
|
||||
Prog, line);
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user