Logs static hosts

stable
Justin Reichardt 2021-08-26 14:57:55 -05:00
parent 4c443474e5
commit 8c377d6234
1 changed files with 2 additions and 1 deletions

View File

@ -129,13 +129,14 @@ int preserve_static_entries(){
char c = EOF;
int rc = 0;
printf("Static hosts are:\n");
do{
c = fgetc(hostsf);
printf("%c",c);
strncat(buff, &c, 1);
if (strncmp(buff, "# rhosts begin", 14) == 0){c = EOF;}
if (c == '\n'){
rc = fputs(buff, tmpf);
printf("%s",buff);
buff[0] = '\0';
}
}while ( c != EOF);