Add an missing argument to open(2). If O_CREAT flag is specified,

file permission has to be specified as well.
This commit is contained in:
Pawel Jakub Dawidek 2012-01-04 07:21:37 +00:00
parent 24bc5224c6
commit 9a492fd171
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229467

View File

@ -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);