* 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:
nekral-guest
2009-05-10 13:49:03 +00:00
parent a01499179f
commit 750093a3ed
6 changed files with 139 additions and 41 deletions

View File

@ -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;
}
}
/*