From 7f7a2bce78e2c8928d6f9c65fee7f80cbf4dfc66 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Wed, 13 Sep 2017 00:37:42 +0000 Subject: [PATCH] cxgbetool(8): mode must be specified when creating the dump file. MFC after: 1 week Sponsored by: Chelsio Communications --- usr.sbin/cxgbetool/cxgbetool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c index 853d8d9aac37..b11001f10c0c 100644 --- a/usr.sbin/cxgbetool/cxgbetool.c +++ b/usr.sbin/cxgbetool/cxgbetool.c @@ -1896,7 +1896,8 @@ dumpstate(int argc, const char *argv[]) return (EINVAL); } - fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY); + fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY, + S_IRUSR | S_IRGRP); if (fd < 0) { warn("open(%s)", fname); return (errno);