Open with create flag needs to specify the fs mode for the file.
This commit is contained in:
parent
7a09ba2cf7
commit
3d871e612a
4
ifchd.c
4
ifchd.c
@ -1,5 +1,5 @@
|
|||||||
/* ifchd.c - interface change daemon
|
/* 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 <njk@aerifal.cx>
|
* (C) 2004 Nicholas J. Kain <njk@aerifal.cx>
|
||||||
*
|
*
|
||||||
@ -881,7 +881,7 @@ int main(int argc, char** argv) {
|
|||||||
*/
|
*/
|
||||||
if (strncmp(resolv_conf_d, "", MAX_PATH_LENGTH)) {
|
if (strncmp(resolv_conf_d, "", MAX_PATH_LENGTH)) {
|
||||||
umask(022);
|
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);
|
umask(077);
|
||||||
if (resolv_conf_fd == -1) {
|
if (resolv_conf_fd == -1) {
|
||||||
suicide("FATAL - unable to open resolv.conf\n",
|
suicide("FATAL - unable to open resolv.conf\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user