cryptonas/bin-perl-old/cryptobox_wrapper.c

21 lines
514 B
C

/* $Id$ */
// define the location of your cryptobox.pl file in this header file
#include "cryptobox_wrapper.h"
#include <stdio.h>
#include <unistd.h>
/* C wrapper to allow cryptobox to run under a different uid */
/* Copyright (C) 02006, senselab, All Rights Reserved */
/* See the LICENSE file in this distribution for copyright information */
int main(int argc, char *argv[]) {
// necessary for mount action of the root-script
setreuid(geteuid(), -1);
argv[0] = EXEC_PATH;
execv(EXEC_PATH, argv);
}