now using setrlimit() if present and if not in debug mode; applied changes for removed files

This commit is contained in:
TLINDEN
2015-01-13 13:06:20 +01:00
parent 54986fa6dc
commit f0494385e1
10 changed files with 70 additions and 23 deletions

View File

@@ -309,6 +309,13 @@ int main (int argc, char **argv) {
sodium_init(); /* FIXME: better called from the lib? */
#ifndef DEBUG
# ifdef HAVE_SETRLIMIT
setrlimit(RLIMIT_CORE, &(struct rlimit) {0, 0});
# endif
#endif
errno = 0; /* FIXME: workaround for https://github.com/jedisct1/libsodium/issues/114 */
if(mode == PCP_MODE_ENCRYPT && useid == 0 && userec == 0) {

View File

@@ -28,6 +28,14 @@
#include <stdlib.h>
#include <compat_getopt.h>
#ifndef DEBUG
# ifdef HAVE_SETRLIMIT
# include <sys/types.h>
# include <sys/time.h>
# include <sys/resource.h>
# endif
#endif
/* lib */
#include "mem.h"
#include "z85.h"