"stdio rpath", while objdump(1) also needs "tmppath" for objdump -i.
ok deraadt@, comments sthen@ kettenis@
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ if (pledge ("stdio rpath", NULL) == -1)
+ fatal (_("Failed to pledge"));
+
program_name = *argv;
xmalloc_set_program_name (program_name);
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ if (pledge ("stdio rpath tmppath", NULL) == -1)
+ fatal (_("Failed to pledge"));
+
program_name = *argv;
xmalloc_set_program_name (program_name);
parse_args (argc, argv);
+ if (pledge ("stdio rpath", NULL) == -1) {
+ error (_("Failed to pledge\n"));
+ return 1;
+ }
+
if (num_dump_sects > 0)
{
/* Make a copy of the dump_sects array. */
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ if (pledge ("stdio rpath", NULL) == -1)
+ fatal (_("Failed to pledge"));
+
program_name = argv[0];
xmalloc_set_program_name (program_name);