summaryrefslogtreecommitdiffstats
path: root/usr.sbin/uhsoctl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-01-04 07:21:37 +0000
committerpjd <pjd@FreeBSD.org>2012-01-04 07:21:37 +0000
commit8525c142e05d7dab13d81fa1446e13e223636607 (patch)
treeca35c21ee0da102fc5d41b58a7850ad0f7dafef8 /usr.sbin/uhsoctl
parent8cedef5e19d800077d15c7570bf6cbda1b741c26 (diff)
downloadFreeBSD-src-8525c142e05d7dab13d81fa1446e13e223636607.zip
FreeBSD-src-8525c142e05d7dab13d81fa1446e13e223636607.tar.gz
Add an missing argument to open(2). If O_CREAT flag is specified,
file permission has to be specified as well.
Diffstat (limited to 'usr.sbin/uhsoctl')
-rw-r--r--usr.sbin/uhsoctl/uhsoctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/uhsoctl/uhsoctl.c b/usr.sbin/uhsoctl/uhsoctl.c
index 421bf81..46a9d0a 100644
--- a/usr.sbin/uhsoctl/uhsoctl.c
+++ b/usr.sbin/uhsoctl/uhsoctl.c
@@ -455,7 +455,7 @@ set_nameservers(struct ctx *ctx, const char *respath, int ns, ...)
free(ctx->ns);
}
- fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW);
+ fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW, 0666);
if (fd < 0)
return (-1);
OpenPOWER on IntegriCloud