From 3d871e612a9855c597cf6302efebb7f1e54fecd5 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Fri, 12 Nov 2010 04:11:15 -0500 Subject: [PATCH] Open with create flag needs to specify the fs mode for the file. --- ifchd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ifchd.c b/ifchd.c index 87b2f0d..a5a0406 100644 --- a/ifchd.c +++ b/ifchd.c @@ -1,5 +1,5 @@ /* ifchd.c - interface change daemon - * Time-stamp: <2004-06-14 njk> + * Time-stamp: <2010-11-12 04:10:07 njk> * * (C) 2004 Nicholas J. Kain * @@ -881,7 +881,7 @@ int main(int argc, char** argv) { */ if (strncmp(resolv_conf_d, "", MAX_PATH_LENGTH)) { umask(022); - resolv_conf_fd = open(resolv_conf_d, O_RDWR | O_CREAT); + resolv_conf_fd = open(resolv_conf_d, O_RDWR | O_CREAT, 644); umask(077); if (resolv_conf_fd == -1) { suicide("FATAL - unable to open resolv.conf\n",