From 6b1cd93c593be328a6a5ba3fe8cb879020f12600 Mon Sep 17 00:00:00 2001 From: "Steffen (Daode) Nurpmeso" Date: Mon, 27 Jun 2016 14:48:15 +0200 Subject: [PATCH] Now with *umask*, just drop fchmod(2)++ calls (Walter Alejandro Iglesias) --- quit.c | 3 +-- tty.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/quit.c b/quit.c index 7272a499f..9a07d6771 100644 --- a/quit.c +++ b/quit.c @@ -541,7 +541,7 @@ makembox(void) /* TODO oh my god */ } Fclose(obuf); - if ((c = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) != -1) + if ((c = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0666)) != -1) close(c); if ((obuf = Zopen(mbox, "r+")) == NULL) { n_perr(mbox, 0); @@ -553,7 +553,6 @@ makembox(void) /* TODO oh my god */ n_perr(mbox, 0); goto jleave; } - fchmod(fileno(obuf), 0600); } srelax_hold(); diff --git a/tty.c b/tty.c index dd41f4c18..1afbdf194 100644 --- a/tty.c +++ b/tty.c @@ -2422,8 +2422,6 @@ n_tty_destroy(void){ if(f == NULL) goto jdone; (void)n_file_lock(fileno(f), FLT_WRITE, 0,0, 500); - if (fchmod(fileno(f), S_IRUSR | S_IWUSR) != 0) - goto jclose; for(; thp != NULL; thp = thp->th_younger){ if(dogabby || !thp->th_isgabby){ @@ -2433,7 +2431,6 @@ n_tty_destroy(void){ putc('\n', f); } } -jclose: fclose(f); jdone: rele_all_sigs(); /* XXX remove jumps */ -- 2.11.4.GIT