Branch: Tag:

1999-01-21

1999-01-21 09:15:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

security system v1.0E-100 checked in... (lots of work left to do)

Rev: src/array.c:1.43
Rev: src/array.h:1.15
Rev: src/builtin_functions.c:1.145
Rev: src/error.h:1.26
Rev: src/interpret.c:1.112
Rev: src/interpret.h:1.25
Rev: src/main.c:1.61
Rev: src/mapping.c:1.38
Rev: src/mapping.h:1.13
Rev: src/modules/files/file.c:1.133
Rev: src/modules/system/system.c:1.61
Rev: src/multiset.c:1.13
Rev: src/multiset.h:1.8
Rev: src/object.c:1.54
Rev: src/object.h:1.20
Rev: src/opcodes.c:1.35
Rev: src/otable.h:1.3(DEAD)
Rev: src/program.c:1.106
Rev: src/program.h:1.47
Rev: src/security.c:1.1
Rev: src/security.h:1.1
Rev: src/svalue.h:1.20
Rev: src/testsuite.in:1.139
Rev: src/threads.c:1.86

21:   #include "cyclic.h"   #include "builtin_functions.h"   #include "module_support.h" + #include "security.h"    - RCSID("$Id: opcodes.c,v 1.34 1999/01/01 01:10:28 hubbe Exp $"); + RCSID("$Id: opcodes.c,v 1.35 1999/01/21 09:15:11 hubbe Exp $");      void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind)   {    INT32 i; -  +  + #ifdef PIKE_SECURITY +  if(what->type <= MAX_COMPLEX) +  if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX)) +  error("Index permission denied.\n"); + #endif +     switch(what->type)    {    case T_ARRAY:
121:       switch(run_time_type)    { +  default: +  error("Cannot perform cast to that type.\n"); +     case T_MIXED:    return;