Differences From Artifact [c3a4b738ae]:
- File utils/ofhttp/OFHTTP.m — part of check-in [7ffbd24169] at 2017-02-27 21:57:16 on branch trunk — ofhttp: Move formatting out of localized strings (user: js, size: 24536) [annotate] [blame] [check-ins using]
To Artifact [9d1be742e3]:
- File
utils/ofhttp/OFHTTP.m
— part of check-in
[40cf53506a]
at
2017-04-09 18:22:14
on branch trunk
— Add OFSandbox
Only OpenBSD's pledge() is supported so far. (user: js, size: 24999) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #import "OFOptionsParser.h" #import "OFStdIOStream.h" #import "OFSystemInfo.h" #import "OFTCPSocket.h" #import "OFTLSSocket.h" #import "OFURL.h" #import "OFLocalization.h" #import "OFAddressTranslationFailedException.h" #import "OFConnectionFailedException.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidFormatException.h" #import "OFInvalidServerReplyException.h" #import "OFOpenItemFailedException.h" | > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #import "OFOptionsParser.h" #import "OFStdIOStream.h" #import "OFSystemInfo.h" #import "OFTCPSocket.h" #import "OFTLSSocket.h" #import "OFURL.h" #import "OFLocalization.h" #import "OFSandbox.h" #import "OFAddressTranslationFailedException.h" #import "OFConnectionFailedException.h" #import "OFHTTPRequestFailedException.h" #import "OFInvalidFormatException.h" #import "OFInvalidServerReplyException.h" #import "OFOpenItemFailedException.h" |
︙ | ︙ | |||
245 246 247 248 249 250 251 | { 'O', @"detect-filename", 0, &_detectFileName, NULL }, { 'P', @"socks5-proxy", 1, NULL, NULL }, { 'q', @"quiet", 0, &_quiet, NULL }, { 'v', @"verbose", 0, &_verbose, NULL }, { '\0', @"insecure", 0, &_insecure, NULL }, { '\0', nil, 0, NULL, NULL } }; | | < > > > > > > > > > > > > > > > > > > | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | { 'O', @"detect-filename", 0, &_detectFileName, NULL }, { 'P', @"socks5-proxy", 1, NULL, NULL }, { 'q', @"quiet", 0, &_quiet, NULL }, { 'v', @"verbose", 0, &_verbose, NULL }, { '\0', @"insecure", 0, &_insecure, NULL }, { '\0', nil, 0, NULL, NULL } }; OFOptionsParser *optionsParser; of_unichar_t option; #ifdef OF_HAVE_SANDBOX OFSandbox *sandbox = [[OFSandbox alloc] init]; @try { [sandbox setAllowsStdIO: true]; [sandbox setAllowsReadingFiles: true]; [sandbox setAllowsWritingFiles: true]; [sandbox setAllowsCreatingFiles: true]; [sandbox setAllowsIPSockets: true]; [sandbox setAllowsDNS: true]; [sandbox setAllowsTTY: true]; [OFApplication activateSandbox: sandbox]; } @finally { [sandbox release]; } #endif [OFLocalization addLanguageDirectory: @LANGUAGE_DIR]; optionsParser = [OFOptionsParser parserWithOptions: options]; while ((option = [optionsParser nextOption]) != '\0') { switch (option) { case 'b': [self setBody: [optionsParser argument]]; break; case 'h': help(of_stdout, true, 0); |
︙ | ︙ |