From 0e431bec545a800cef960ef6bf383fc4f6c59b49 Mon Sep 17 00:00:00 2001 From: Justin Reichardt Date: Mon, 30 Aug 2021 10:55:24 -0500 Subject: [PATCH] Finished adding every print to clogs --- src/rhosts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rhosts.c b/src/rhosts.c index a10f2dd..6b30520 100644 --- a/src/rhosts.c +++ b/src/rhosts.c @@ -161,7 +161,6 @@ int preserve_static_entries(){ char c = EOF; int rc = 0; - printf("Static hosts are:\n"); do{ c = fgetc(hostsf); strncat(buff, &c, 1); @@ -173,7 +172,6 @@ int preserve_static_entries(){ fclose(tmpf); return 1; } - printf("%s",buff); buff[0] = '\0'; } }while ( c != EOF); @@ -203,7 +201,8 @@ int add_site_entries(struct entry **entries){ rc = fputs("# rhosts - static begin\n", tmpf); if (rc == EOF){ - printf("Failed to write to tmp file\n"); + clogs_print(CLOGS_ERROR,"Failed to write to tmp file %s\n",\ + TMPLOCATION); fclose(tmpf); return 1; } @@ -218,7 +217,8 @@ int add_site_entries(struct entry **entries){ } rc = fputs("# rhosts - static end\n# rhosts end\n", tmpf); if (rc == EOF){ - printf("Failed to write to tmp file\n"); + clogs_print(CLOGS_ERROR,"Failed to write to tmp file %s\n", \ + TMPLOCATION); fclose(tmpf); return 1; } @@ -235,7 +235,7 @@ int copy_tmp_to_hosts(){ FILE *hostsf; hostsf = fopen(HOSTSLOCATION, "w"); if (hostsf == NULL){ - printf("Failed to open %s\n",HOSTSLOCATION); + clogs_print(CLOGS_ERROR,"Failed to open %s\n",HOSTSLOCATION); fclose(tmpf); return 1; }