=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/eval.c,v retrieving revision 1.34 retrieving revision 1.38 diff -u -p -r1.34 -r1.38 --- OpenXM_contrib2/asir2000/parse/eval.c 2004/06/21 09:05:16 1.34 +++ OpenXM_contrib2/asir2000/parse/eval.c 2004/11/22 04:11:36 1.38 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/eval.c,v 1.33 2004/05/14 09:20:57 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/eval.c,v 1.37 2004/11/22 02:26:56 noro Exp $ */ #include #include "ca.h" @@ -306,8 +306,6 @@ pointer eval(FNODE f) MKLIST(t,NEXT(BDY((LIST)a))); val = (pointer)t; } break; - case I_PROC: - val = (pointer)FA0(f); break; case I_INDEX: a = eval((FNODE)FA0(f)); ind = (NODE)FA1(f); evalnodebody(ind,&tn); getarray(a,tn,&val); @@ -466,6 +464,10 @@ pointer evalf(FUNC f,FNODE a,FNODE opt) sprintf(errbuf,"evalf : %s undefined",NAME(f)); error(errbuf); } + if ( getsecuremode() && !PVSS && !f->secure ) { + sprintf(errbuf,"evalf : %s not permitted",NAME(f)); + error(errbuf); + } if ( f->id != A_PARI ) { for ( i = 0, tn = a?(NODE)FA0(a):0; tn; i++, tn = NEXT(tn) ); if ( ((n = f->argc)>= 0 && i != n) || (n < 0 && i > -n) ) { @@ -696,6 +698,10 @@ pointer bevalf(FUNC f,NODE a) sprintf(errbuf,"bevalf : %s undefined",NAME(f)); error(errbuf); } + if ( getsecuremode() && !PVSS && !f->secure ) { + sprintf(errbuf,"bevalf : %s not permitted",NAME(f)); + error(errbuf); + } if ( f->id != A_PARI ) { for ( i = 0, tn = a; tn; i++, tn = NEXT(tn) ); if ( ((n = f->argc)>= 0 && i != n) || (n < 0 && i > -n) ) { @@ -982,6 +988,9 @@ void mkuf(char *name,char *fname,NODE args,SNODE body, char *longname; int argc; + if ( getsecuremode() ) { + error("defining function is not permitted in the secure mode"); + } if ( *name == ':' ) name += 2; if ( !module ) {