Subversion Repositories wimsdev

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 reyssat 1
#! /bin/sh
2
 
3
# sysmask test
4
../bin/true 2>/dev/null && {
5
 echo Cannot compile c: security protection unavailable. >&2
6
 exit
7
}
8
 
9
echo "$wims_exec_parm" | sed 's/\$/\$/g' >$tmp_dir/test.c
10
rm -f $tmp_dir/main.c
11
 
12
echo "
13
#include <stdio.h>
14
#include <math.h>
15
#include <string.h>
16
#include <time.h>
17
 
18
int test(void);
19
 
20
int main(int argc, char *argv[])
21
{
22
        time(0);
23
        return test();
24
}
25
 
26
#define main test
27
#include \"test.c\"
28
 
29
" >$tmp_dir/main.c
30
 
31
w_wims_priv_chroot=tmpdir
32
export w_wims_priv_chroot
33
ulimit -f 256
34
bin/ch..root gcc -Wall main.c -lm -o test || exit
35
 
36
[ -s $tmp_dir/test ] || exit
37
 
38
#rm -f $tmp_dir/*.c
39
ulimit -f 64
40
bin/ch..root /lib/ld-2.3.2.so ./test
41