summaryrefslogtreecommitdiff
path: root/usr.sbin/uhsoctl
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2012-01-04 07:21:37 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2012-01-04 07:21:37 +0000
commit9a492fd1719f97881c4d12533a3ea70380581f31 (patch)
treeca35c21ee0da102fc5d41b58a7850ad0f7dafef8 /usr.sbin/uhsoctl
parent24bc5224c63574c1a2a3cb46d68accfaf46f655c (diff)
downloadsrc-test-9a492fd1719f97881c4d12533a3ea70380581f31.tar.gz
src-test-9a492fd1719f97881c4d12533a3ea70380581f31.zip
Add an missing argument to open(2). If O_CREAT flag is specified,
file permission has to be specified as well.
Notes
Notes: svn path=/head/; revision=229467
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 421bf819ea2d1..46a9d0aacf7af 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);