[hackers] [sbase] xinstall: Check result of fchmod || Michael Forney

From: <git_AT_suckless.org>
Date: Tue, 27 Dec 2016 15:04:03 +0100 (CET)

commit a8a9b3bae9b021c328db27f426dcaf90e01ca030
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Tue Dec 6 02:16:57 2016 -0800
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Tue Dec 27 14:37:20 2016 +0100

    xinstall: Check result of fchmod

diff --git a/xinstall.c b/xinstall.c
index 4cd5122..d0069be 100644
--- a/xinstall.c
+++ b/xinstall.c
_AT_@ -102,7 +102,8 @@ install(const char *s1, const char *s2, int depth)
                 }
                 concat(f1, s1, f2, s2);
 
- fchmod(fileno(f2), mode);
+ if (fchmod(fileno(f2), mode) < 0)
+ eprintf("fchmod %s:", s2);
 
                 if (fclose(f2) == EOF)
                         eprintf("fclose %s:", s2);
Received on Tue Dec 27 2016 - 15:04:03 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 27 2016 - 15:13:38 CET