version 1.1, 2021/03/09 20:01:38 |
version 1.2, 2021/04/02 23:46:00 |
|
|
ESCDELAY=64; |
ESCDELAY=64; |
#endif |
#endif |
|
|
|
#if defined(__OpenBSD__) |
|
if ( unveil("/usr","r")==-1 ) |
|
{ |
|
perror("Unveil failure. Aborting."); |
|
exit (1); |
|
} |
|
#ifdef SCOREFILE |
|
if ( unveil(SCOREFILE,"rwc")==-1 ) |
|
{ |
|
perror("Unveil failure. Aborting."); |
|
exit (1); |
|
} |
|
#endif |
|
#ifdef LOGFILE |
|
if ( unveil(LOGFILE,"rwc")==-1 ) |
|
{ |
|
perror("Unveil failure. Aborting."); |
|
exit(1); |
|
} |
|
#endif |
|
#if defined(SCOREFILE) && defined(LOCKFILE) |
|
if ( unveil(LOCKFILE,"rwc")==-1 ) |
|
{ |
|
perror("Unveil failure. Aborting."); |
|
exit(1); |
|
} |
|
#endif |
|
#ifdef SAVEDIR |
|
if ( unveil(SAVEDIR,"rwc")==-1 ) |
|
{ |
|
perror("Unveil failure. Aborting."); |
|
exit(1); |
|
} |
|
#else |
|
if ( unveil(md_gethomedir(),"rwc")==-1 ) |
|
{ |
|
perror("Unveil failure. Aborting."); |
|
exit(1); |
|
} |
|
#endif |
|
if ( pledge("stdio rpath wpath cpath fattr flock " |
|
"getpw id tty proc", NULL )==-1 ) |
|
{ |
|
perror("Pledge failure. Aborting."); |
|
exit (1); |
|
} |
|
#endif /* OpenBSD*/ |
|
|
#if defined(DUMP) |
#if defined(DUMP) |
md_onsignal_default(); |
md_onsignal_default(); |
#else |
#else |