diff options
author | tb <> | 2017-06-11 14:38:52 +0000 |
---|---|---|
committer | tb <> | 2017-06-11 14:38:52 +0000 |
commit | e2a1077404a257e6d59dba29fe9346b5ca99d587 (patch) | |
tree | 261a14265ace715d93430669dd3af2656ad9526a /src/usr.bin/nc/netcat.c | |
parent | 180024fa64c8ab369009be5f38b43311df230812 (diff) | |
download | openbsd-e2a1077404a257e6d59dba29fe9346b5ca99d587.tar.gz openbsd-e2a1077404a257e6d59dba29fe9346b5ca99d587.tar.bz2 openbsd-e2a1077404a257e6d59dba29fe9346b5ca99d587.zip |
Continue the flattening of the pledge logic started in r1.184 and place
a blank space somewhere else.
suggested by and ok jsing
Diffstat (limited to 'src/usr.bin/nc/netcat.c')
-rw-r--r-- | src/usr.bin/nc/netcat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index b759e319a7..0d972ee53e 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: netcat.c,v 1.185 2017/06/11 10:53:07 tb Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.186 2017/06/11 14:38:52 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
4 | * Copyright (c) 2015 Bob Beck. All rights reserved. | 4 | * Copyright (c) 2015 Bob Beck. All rights reserved. |
@@ -350,11 +350,11 @@ main(int argc, char *argv[]) | |||
350 | if (family == AF_UNIX) { | 350 | if (family == AF_UNIX) { |
351 | if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) | 351 | if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) |
352 | err(1, "pledge"); | 352 | err(1, "pledge"); |
353 | } else if (Fflag) { | 353 | } else if (Fflag && Pflag) { |
354 | if (Pflag) { | 354 | if (pledge("stdio inet dns sendfd tty", NULL) == -1) |
355 | if (pledge("stdio inet dns sendfd tty", NULL) == -1) | 355 | err(1, "pledge"); |
356 | err(1, "pledge"); | 356 | } else if (Fflag) { |
357 | } else if (pledge("stdio inet dns sendfd", NULL) == -1) | 357 | if (pledge("stdio inet dns sendfd", NULL) == -1) |
358 | err(1, "pledge"); | 358 | err(1, "pledge"); |
359 | } else if (Pflag && usetls) { | 359 | } else if (Pflag && usetls) { |
360 | if (pledge("stdio rpath inet dns tty", NULL) == -1) | 360 | if (pledge("stdio rpath inet dns tty", NULL) == -1) |
@@ -507,8 +507,8 @@ main(int argc, char *argv[]) | |||
507 | tls_config_insecure_noverifyname(tls_cfg); | 507 | tls_config_insecure_noverifyname(tls_cfg); |
508 | if (TLSopt & TLS_NOVERIFY) { | 508 | if (TLSopt & TLS_NOVERIFY) { |
509 | if (tls_expecthash != NULL) | 509 | if (tls_expecthash != NULL) |
510 | errx(1, "-H and -T noverify may not be used" | 510 | errx(1, "-H and -T noverify may not be used " |
511 | " together"); | 511 | "together"); |
512 | tls_config_insecure_noverifycert(tls_cfg); | 512 | tls_config_insecure_noverifycert(tls_cfg); |
513 | } | 513 | } |
514 | if (TLSopt & TLS_MUSTSTAPLE) | 514 | if (TLSopt & TLS_MUSTSTAPLE) |