Differences From Artifact [f2fa0ce091]:
- File utils/ofarc/OFArc.m — part of check-in [3356b9940c] at 2020-04-19 10:02:51 on branch trunk — Clean up which exception is used when a little (user: js, size: 21219) [annotate] [blame] [check-ins using] [more...]
To Artifact [edd8dd6d33]:
- File
utils/ofarc/OFArc.m
— part of check-in
[510628432f]
at
2020-12-22 13:16:28
on branch 1.0
— Make OFSandbox private
It is unclear whether the same API can be applied to other sandboxing
frameworks. (user: js, size: 21234) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
180 181 182 183 184 185 186 | sandbox.allowsWritingFiles = true; sandbox.allowsCreatingFiles = true; sandbox.allowsChangingFileAttributes = true; sandbox.allowsUserDatabaseReading = true; /* Dropped after parsing options */ sandbox.allowsUnveil = true; | | | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | sandbox.allowsWritingFiles = true; sandbox.allowsCreatingFiles = true; sandbox.allowsChangingFileAttributes = true; sandbox.allowsUserDatabaseReading = true; /* Dropped after parsing options */ sandbox.allowsUnveil = true; [OFApplication of_activateSandbox: sandbox]; #endif #ifndef OF_AMIGAOS [OFLocale addLanguageDirectory: @LANGUAGE_DIR]; #else [OFLocale addLanguageDirectory: @"PROGDIR:/share/ofarc/lang"]; #endif |
︙ | ︙ | |||
326 327 328 329 330 331 332 | permissions: (mode == 'a' ? @"rwc" : @"wc")]; for (OFString *path in files) [sandbox unveilPath: path permissions: @"r"]; sandbox.allowsUnveil = false; | | | | | 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | permissions: (mode == 'a' ? @"rwc" : @"wc")]; for (OFString *path in files) [sandbox unveilPath: path permissions: @"r"]; sandbox.allowsUnveil = false; [OFApplication of_activateSandbox: sandbox]; #endif archive = [self openArchiveWithPath: remainingArguments.firstObject type: type mode: mode encoding: encoding]; [archive addFiles: files]; break; case 'l': if (remainingArguments.count != 1) help(of_stderr, false, 1); #ifdef OF_HAVE_SANDBOX if (![remainingArguments.firstObject isEqual: @"-"]) [sandbox unveilPath: remainingArguments.firstObject permissions: @"r"]; sandbox.allowsUnveil = false; [OFApplication of_activateSandbox: sandbox]; #endif archive = [self openArchiveWithPath: remainingArguments.firstObject type: type mode: mode encoding: encoding]; [archive listFiles]; break; case 'p': if (remainingArguments.count < 1) help(of_stderr, false, 1); #ifdef OF_HAVE_SANDBOX if (![remainingArguments.firstObject isEqual: @"-"]) [sandbox unveilPath: remainingArguments.firstObject permissions: @"r"]; sandbox.allowsUnveil = false; [OFApplication of_activateSandbox: sandbox]; #endif files = [remainingArguments objectsInRange: of_range(1, remainingArguments.count - 1)]; archive = [self openArchiveWithPath: remainingArguments.firstObject |
︙ | ︙ | |||
407 408 409 410 411 412 413 | ? outputDir : OF_PATH_CURRENT_DIRECTORY); /* We need 'r' to change the directory to it. */ [sandbox unveilPath: path permissions: @"rwc"]; } sandbox.allowsUnveil = false; | | | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 | ? outputDir : OF_PATH_CURRENT_DIRECTORY); /* We need 'r' to change the directory to it. */ [sandbox unveilPath: path permissions: @"rwc"]; } sandbox.allowsUnveil = false; [OFApplication of_activateSandbox: sandbox]; #endif archive = [self openArchiveWithPath: remainingArguments.firstObject type: type mode: mode encoding: encoding]; |
︙ | ︙ |