force core dumps to be disabled

This commit is contained in:
xfnw 2021-11-08 17:30:01 -05:00
parent dcf227b95a
commit 6339649983

View file

@ -32,6 +32,15 @@
#include <openssl/pem.h>
#include <openssl/sha.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
void nodumps()
{
struct rlimit r;
r.rlim_cur = r.rlim_max = 0;
setrlimit(RLIMIT_CORE, &r);
}
static int called_passcb = 0;
static int pass_cb(char *buf, int size, int rwflag, void *u)
@ -215,6 +224,8 @@ read_challenge(FILE *f)
int
main(int argc, char **argv)
{
nodumps();
FILE *kfile;
RSA *rsa = NULL;
SHA_CTX ctx;