diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-11-29 03:36:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-11-29 03:36:45 +0000 |
commit | d070811bf2dbc22f740e3a0ea7b1034db5620727 (patch) | |
tree | bf38423c8e57103a5102834046aa55eb4855fbf2 /usr.sbin/rpki-client/main.c | |
parent | 36a89aae2cbdef5eb106bdf8ef2c2f7de774291e (diff) |
fchmod 0644 the output roa file, since it is public information and
this will work better with upcoming privdrop rpki-client and bgpd consumption
ok benno
Diffstat (limited to 'usr.sbin/rpki-client/main.c')
-rw-r--r-- | usr.sbin/rpki-client/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 5fcf46bec23..b23720a56f3 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.36 2019/11/29 02:52:22 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.37 2019/11/29 03:36:44 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1505,7 +1505,7 @@ main(int argc, char *argv[]) struct vrp_tree v = RB_INITIALIZER(&v); enum output_fmt outfmt = BGPD; - if (pledge("stdio rpath wpath cpath proc exec unveil", NULL) == -1) + if (pledge("stdio rpath wpath cpath fattr proc exec unveil", NULL) == -1) err(EXIT_FAILURE, "pledge"); while ((c = getopt(argc, argv, "b:Bce:fjnrt:T:v")) != -1) @@ -1797,6 +1797,7 @@ output_createtmp(char *name) if (r < 0 || r > (int)sizeof(output_tmpname)) err(EXIT_FAILURE, "path too long"); fd = mkostemp(output_tmpname, O_CLOEXEC); + (void) fchmod(fd, 0644); if (fd == -1) err(EXIT_FAILURE, "mkostemp"); f = fdopen(fd, "w"); |