cryptonas-branches/pythonrewrite/bin/cryptobox_wrapper.c

22 lines
514 B
C
Raw Normal View History

2006-08-14 17:40:12 +02:00
/* $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);
}