Fix for FreeBSD 4.0 and newer
This commit is contained in:
parent
1a1586d651
commit
a5382398ec
@ -263,6 +263,16 @@ void pw_copy(int ffd, int tfd, struct passwd *pw)
|
||||
goto err;
|
||||
continue;
|
||||
}
|
||||
for (p = buf; *p != '\n'; p++)
|
||||
if (*p != ' ' && *p != '\t')
|
||||
break;
|
||||
if (*p == '#' || *p == '\n') {
|
||||
(void)fprintf(to, "%s", buf);
|
||||
if (ferror(to))
|
||||
goto err;
|
||||
continue;
|
||||
}
|
||||
*p = '\0';
|
||||
if (!(p = strchr(buf, ':'))) {
|
||||
syslog(LOG_WARNING, "%s: corrupted entry", _PATH_MASTERPASSWD);
|
||||
pw_error(NULL, 0, 1);
|
||||
|
Reference in New Issue
Block a user