From: <da...@us...> - 2002-10-04 18:12:11
|
Update of /cvsroot/cerber/cerb-ng/kcerb In directory usw-pr-cvs1:/tmp/cvs-serv29392/kcerb Modified Files: .cvsignore cerb_action.c cerb_action.h cerb_addons.h cerb_desc.h cerb_globals.h cerb_malloc.h cerb_rules.h cerb_string.h cerb_syscalls.h cerb_urules.c cerb_urules.h cerb_usmalloc.h Log Message: - Added .cvsignore to cerb-ng directory. - Kcerb: + Added seting arguments and cerb's registers when type is qual to ECB_DEFPTR_T, ECB_UDEFPTR_T, ECB_STRPTR_T or ECB_PTR_T. + Some changes like: if ((a = b) == c) to: a = b; if (a == c) for long expressions. Now it looks more cleaner. + Added needed #includes to header files. + Added #ifdefs with _KERNEL to hearder files that are used in ucerb also. + Moved tcb_local2type[] from cerb_globals.h to cerb_urules.c. - Ucerb: + Added 'diff' to .cvsignore. + Added #include "cerb_globals.h" to libcerb.c. + Removed secound #include "cerb_rules.h". + Added #include "cerb_globals.h" to rlister.c. Index: .cvsignore =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 4 Oct 2002 16:51:43 -0000 1.1 --- .cvsignore 4 Oct 2002 18:12:05 -0000 1.2 *************** *** 1,3 **** ! .* *.o *.a *.ko *.kld *.core vnode_if.h setdef* --- 1,4 ---- ! .* *.o *.a *.ko *.kld *.core vnode_if.h setdef* + diff Index: cerb_action.c =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_action.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** cerb_action.c 26 Sep 2002 21:55:51 -0000 1.22 --- cerb_action.c 4 Oct 2002 18:12:05 -0000 1.23 *************** *** 154,158 **** register struct scb_val *lastv; register_t *val; ! u_int i, nv; if (nvals <= 1) --- 154,160 ---- register struct scb_val *lastv; register_t *val; ! char ***strp; ! size_t size; ! u_int i, j, nv; if (nvals <= 1) *************** *** 179,211 **** *val = lastv->v_val; uprintf("SET: %u\n", *val); break; case CB_STR_T: if (v[i]->v_id == ECB_REG_I) { ! if ((*val = (register_t)fcb_malloc("fcb_op_set", ! lastv->v_size, M_NOWAIT)) == NULL) { MCB_XDEBUG(ENOMEM, "Can't allocate " ! "memory for register %d.", i); } } else /* if (v[i]->v_id == ECB_ARG_I) */ { ! if ((*val = (register_t)fcb_usm_alloc(p, ! lastv->v_size)) == NULL) { MCB_XDEBUG(ENOMEM, "Can't allocate " ! "memory for argument %d.", i); } } ! strcpy((char *)(*val), lastv->v_str); break; - case CB_DEFPTR_T: - case CB_UDEFPTR_T: case CB_PTR_T: ! /* XXX: Only something like this for now. */ ! *val = lastv->v_val; } ! /* ! * Only when everythings goes fine we're ! * marking register as non-empty. ! */ ! if (v[i]->v_id == ECB_REG_I) tcb_regs[nv].v_id = ECB_CONST_I; } --- 181,269 ---- *val = lastv->v_val; uprintf("SET: %u\n", *val); + size = 0; break; case CB_STR_T: + size = lastv->v_size; + break; + case CB_DEFPTR_T: + size = lastv->v_size * sizeof (register_t); + break; + case CB_UDEFPTR_T: + size = lastv->v_size * sizeof (u_register_t); + break; + case CB_STRPTR_T: + strp = (char ***)val; if (v[i]->v_id == ECB_REG_I) { ! *strp = fcb_malloc(__func__, ! lastv->v_size * sizeof (char *), M_NOWAIT); ! if (*strp == NULL) { MCB_XDEBUG(ENOMEM, "Can't allocate " ! "memory for register %u.", i); ! } ! for (j = 0; j < lastv->v_size; ++j) { ! size = strlen(lastv->v_strp[j]) + 1; ! (*strp)[j] = fcb_malloc(__func__, size, ! M_NOWAIT); ! if ((*strp)[j] == NULL) { ! MCB_XDEBUG(ENOMEM, "Can't " ! "allocate memory for " ! "register %u.", i); ! } ! memcpy((*strp)[j], lastv->v_strp[j], ! size); } } else /* if (v[i]->v_id == ECB_ARG_I) */ { ! *strp = fcb_usm_alloc(p, ! lastv->v_size * sizeof (char *)); ! if (*strp == NULL) { MCB_XDEBUG(ENOMEM, "Can't allocate " ! "memory for argument %u.", i); ! } ! for (j = 0; j < lastv->v_size; ++j) { ! size = strlen(lastv->v_strp[j]) + 1; ! (*strp)[j] = fcb_usm_alloc(p, size); ! if ((*strp)[j] == NULL) { ! MCB_XDEBUG(ENOMEM, "Can't " ! "allocate memory for " ! "argument %u.", i); ! } ! memcpy((*strp)[j], lastv->v_strp[j], ! size); } } ! size = 0; break; case CB_PTR_T: ! if ((size = lastv->v_size) == 0) { ! MCB_XDEBUG(EFAULT, "Sizeof pointer " ! "value isn't know for %u.", i); ! } } ! ! if (size == 0) { ! /* ! * Only when everythings goes fine we're ! * marking register as non-empty. ! */ ! if (v[i]->v_id == ECB_REG_I) ! tcb_regs[nv].v_id = ECB_CONST_I; ! continue; ! } ! ! if (v[i]->v_id == ECB_REG_I) { ! *(void **)val = fcb_malloc(__func__, size, M_NOWAIT); ! if (*(void **)val == NULL) { ! MCB_XDEBUG(ENOMEM, "Can't allocate " ! "memory for register %u.", i); ! } tcb_regs[nv].v_id = ECB_CONST_I; + } else /* if (v[i]->v_id == ECB_ARG_I) */ { + *(void **)val = fcb_usm_alloc(p, size); + if (*(void **)val == NULL) { + MCB_XDEBUG(ENOMEM, "Can't allocate " + "memory for argument %u.", i); + } + } + memcpy(*(void **)val, lastv->v_ptr, size); } *************** *** 509,519 **** MCB_XDEBUG(EINVAL, "Invalid argument type."); ! if ((retv->v_str = fcb_malloc("fcb_op_realpath()", MAXPATHLEN, ! M_NOWAIT)) == NULL) { MCB_XDEBUG(ENOMEM, "Can't allocate memory."); ! } fcb_mtemp_add(retv->v_str); ! if ((error = fcb_realpath(p, v[0]->v_str, retv->v_str, ! MAXPATHLEN)) == 0) { retv->v_id = ECB_CONST_I; retv->v_type = CB_STR_T; --- 567,577 ---- MCB_XDEBUG(EINVAL, "Invalid argument type."); ! retv->v_str = fcb_malloc(__func__, MAXPATHLEN, M_NOWAIT); ! if (retv->v_str == NULL) MCB_XDEBUG(ENOMEM, "Can't allocate memory."); ! fcb_mtemp_add(retv->v_str); ! error = fcb_realpath(p, v[0]->v_str, retv->v_str, MAXPATHLEN); ! if (error == 0) { retv->v_id = ECB_CONST_I; retv->v_type = CB_STR_T; *************** *** 532,539 **** if (nvals == 0) { ! if ((error = VOP_GETATTR(p->p_textvp, &va, ! p->p_ucred, p)) != 0) { return (error); - } } else if (nvals == 1) { if (v[0]->v_type == CB_STR_T) { --- 590,596 ---- if (nvals == 0) { ! error = VOP_GETATTR(p->p_textvp, &va, p->p_ucred, p); ! if (error != 0) return (error); } else if (nvals == 1) { if (v[0]->v_type == CB_STR_T) { *************** *** 557,564 **** return (ESRCH); ! if ((error = VOP_GETATTR(proc->p_textvp, &va, ! proc->p_ucred, proc)) != 0) { return (error); - } } else { MCB_XDEBUG(EINVAL, "Invalid argument type."); --- 614,621 ---- return (ESRCH); ! error = VOP_GETATTR(proc->p_textvp, &va, proc->p_ucred, ! proc); ! if (error != 0) return (error); } else { MCB_XDEBUG(EINVAL, "Invalid argument type."); *************** *** 798,801 **** --- 855,861 ---- } + /* + * Operation returns true if given process is a member of given group. + */ int fcb_op_ismember(CB_OPARGS) *************** *** 845,852 **** if (fun != ECB_FD2NAME_O) { ! if ((error = VOP_GETATTR(proc->p_textvp, &va, ! proc->p_ucred, proc)) != 0) { MCB_XDEBUG(error, "Error while getting attributes."); - } } --- 905,911 ---- if (fun != ECB_FD2NAME_O) { ! error = VOP_GETATTR(proc->p_textvp, &va, proc->p_ucred, proc); ! if (error != 0) MCB_XDEBUG(error, "Error while getting attributes."); } *************** *** 916,923 **** oid[1] = 3; oidlen = sizeof oid; ! if ((error = kernel_sysctl(p, oid, 2, oid, &oidlen, ! v[0]->v_str, v[0]->v_size, &plen)) != 0) { ! MCB_XDEBUG(error, "Can't get sysctl."); ! } oidp = oid; plen /= sizeof (int); --- 975,982 ---- oid[1] = 3; oidlen = sizeof oid; ! error = kernel_sysctl(p, oid, 2, oid, &oidlen, v[0]->v_str, ! v[0]->v_size, &plen); ! if (error != 0) ! MCB_XDEBUG(error, "Cannot get sysctl."); oidp = oid; plen /= sizeof (int); *************** *** 930,934 **** } ! if ((error = sysctl_find_oid(oidp, plen, &soid, &oidlen, &req)) != 0) MCB_XDEBUG(error, "Can't find oid."); --- 989,994 ---- } ! error = sysctl_find_oid(oidp, plen, &soid, &oidlen, &req); ! if (error != 0) MCB_XDEBUG(error, "Can't find oid."); *************** *** 939,944 **** case CTLTYPE_LONG: if (nvals == 2) { ! if ((error = fcb_checkdef(v[1]->v_val, v[1]->v_type, ! CB_DEF_T)) == 0) { new = &(v[1]->v_val); newlen = sizeof (register_t); --- 999,1005 ---- case CTLTYPE_LONG: if (nvals == 2) { ! error = fcb_checkdef(v[1]->v_val, v[1]->v_type, ! CB_DEF_T); ! if (error == 0) { new = &(v[1]->v_val); newlen = sizeof (register_t); *************** *** 956,961 **** case CTLTYPE_ULONG: if (nvals == 2) { ! if ((error = fcb_checkdef(v[1]->v_val, v[1]->v_type, ! CB_UDEF_T)) == 0) { new = &(v[1]->v_uval); newlen = sizeof (u_register_t); --- 1017,1023 ---- case CTLTYPE_ULONG: if (nvals == 2) { ! error = fcb_checkdef(v[1]->v_val, v[1]->v_type, ! CB_UDEF_T); ! if (error == 0) { new = &(v[1]->v_uval); newlen = sizeof (u_register_t); *************** *** 976,988 **** newlen = v[1]->v_size - 1; } ! if ((error = kernel_sysctl(p, oidp, plen, NULL, NULL, NULL, 0, ! &oldlen)) != 0) { MCB_XDEBUG(error, "Can't get sysctl size."); ! } ! if ((old = fcb_malloc("fcb_op_sysctl()", oldlen + 1, ! M_NOWAIT)) == NULL) { ! MCB_XDEBUG(ENOMEM, "Can't allocate memory for " ! "temporary value."); ! } fcb_mtemp_add(old); /* kernel_sysctl() don't terminate string */ --- 1038,1051 ---- newlen = v[1]->v_size - 1; } ! ! error = kernel_sysctl(p, oidp, plen, NULL, NULL, NULL, 0, ! &oldlen); ! if (error != 0) MCB_XDEBUG(error, "Can't get sysctl size."); ! ! old = fcb_malloc(__func__, oldlen + 1, M_NOWAIT); ! if (old == NULL) ! MCB_XDEBUG(ENOMEM, "Can't allocate temporary value."); ! fcb_mtemp_add(old); /* kernel_sysctl() don't terminate string */ *************** *** 996,1003 **** } ! if ((error = kernel_sysctl(p, oidp, plen, old, &oldlen, new, newlen, ! &retval)) != 0) { MCB_XDEBUG(error, "Can't get sysctl."); - } return (0); --- 1059,1066 ---- } ! error = kernel_sysctl(p, oidp, plen, old, &oldlen, new, newlen, ! &retval); ! if (error != 0) MCB_XDEBUG(error, "Can't get sysctl."); return (0); *************** *** 1088,1101 **** MCB_XDEBUG(EINVAL, "Invalid type of format string."); ! if ((buf = fcb_malloc("fcb_op_genstr()", CB_GENSTRSIZE_G, ! M_NOWAIT)) == NULL) { MCB_XDEBUG(ENOMEM, "Cannot allocate memory for string."); ! } fcb_mtemp_add(buf); ! if ((error = fcb_vprintf(buf, CB_GENSTRSIZE_G, v[1]->v_str, ! v + 1, nvals - 1)) != 0) { MCB_XDEBUG(error, "Error while parsing."); - } retv->v_id = ECB_CONST_I; --- 1151,1164 ---- MCB_XDEBUG(EINVAL, "Invalid type of format string."); ! buf = fcb_malloc(__func__, CB_GENSTRSIZE_G, M_NOWAIT); ! if (buf == NULL) MCB_XDEBUG(ENOMEM, "Cannot allocate memory for string."); ! fcb_mtemp_add(buf); ! error = fcb_vprintf(buf, CB_GENSTRSIZE_G, v[1]->v_str, v + 1, ! nvals - 1); ! if (error != 0) MCB_XDEBUG(error, "Error while parsing."); retv->v_id = ECB_CONST_I; *************** *** 1122,1129 **** MCB_XDEBUG(EINVAL, "Invalid type of log level number."); ! if ((error = fcb_vprintf(buf, sizeof buf, v[1]->v_str, v + 2, ! nvals - 2)) != 0) { MCB_XDEBUG(error, "Error while parsing."); - } log(v[0]->v_val, "CerbNG: %s\n", buf); --- 1185,1191 ---- MCB_XDEBUG(EINVAL, "Invalid type of log level number."); ! error = fcb_vprintf(buf, sizeof buf, v[1]->v_str, v + 2, nvals - 2); ! if (error != 0) MCB_XDEBUG(error, "Error while parsing."); log(v[0]->v_val, "CerbNG: %s\n", buf); *************** *** 1204,1211 **** if (sin->sin_family == AF_INET) { ! if ((buf = fcb_malloc("fcb_op_getip()", CB_MAXIPCHARS_G, ! M_NOWAIT)) == NULL) { MCB_XDEBUG(ENOMEM, "Cannot allocate memory for IP."); - } retv->v_str = buf; bzero(buf, CB_MAXIPCHARS_G); --- 1266,1272 ---- if (sin->sin_family == AF_INET) { ! buf = fcb_malloc(__func__, CB_MAXIPCHARS_G, M_NOWAIT); ! if (buf == NULL) MCB_XDEBUG(ENOMEM, "Cannot allocate memory for IP."); retv->v_str = buf; bzero(buf, CB_MAXIPCHARS_G); *************** *** 1215,1222 **** } } else if (sin6->sin6_family == AF_INET6) { ! if ((buf = fcb_malloc("fcb_op_getip()", CB_MAXIP6CHARS_G, ! M_NOWAIT)) == NULL) { MCB_XDEBUG(ENOMEM, "Cannot allocate memory for IP6."); - } retv->v_str = buf; bzero(buf, CB_MAXIP6CHARS_G); --- 1276,1282 ---- } } else if (sin6->sin6_family == AF_INET6) { ! buf = fcb_malloc(__func__, CB_MAXIP6CHARS_G, M_NOWAIT); ! if (buf == NULL) MCB_XDEBUG(ENOMEM, "Cannot allocate memory for IP6."); retv->v_str = buf; bzero(buf, CB_MAXIP6CHARS_G); Index: cerb_action.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_action.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** cerb_action.h 4 Oct 2002 17:44:08 -0000 1.19 --- cerb_action.h 4 Oct 2002 18:12:05 -0000 1.20 *************** *** 11,14 **** --- 11,22 ---- #define _CERB_ACTION_H_ + #ifdef _KERNEL + + #include <sys/param.h> + #include <sys/proc.h> + + #include "cerb_globals.h" + #include "cerb_rules.h" + #define CB_OPARGS struct proc *p, register struct scb_val **v, \ u_int nvals, register struct scb_val *retv, u_int fun *************** *** 16,19 **** --- 24,28 ---- extern dcb_op *tcb_op[]; + #endif /* _KERNEL */ /* *************** *** 35,38 **** --- 44,49 ---- ECB_MUL_O, /* * */ ECB_DIV_O, /* / */ + ECB_AND_O, /* & */ + ECB_OR_O, /* | */ ECB_CALL_O, /* call() */ ECB_RETURN_O, /* return () */ *************** *** 91,94 **** --- 102,107 ---- }; + #ifdef _KERNEL + void fcb_regfree(u_int no); *************** *** 124,127 **** --- 137,142 ---- int fcb_op_chkenvs(CB_OPARGS); */ + + #endif /* _KERNEL */ #endif /* _CERB_ACTION_H_ */ Index: cerb_addons.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_addons.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cerb_addons.h 26 Sep 2002 21:55:52 -0000 1.3 --- cerb_addons.h 4 Oct 2002 18:12:05 -0000 1.4 *************** *** 11,14 **** --- 11,19 ---- #define _CERB_ADDONS_H_ + #include <sys/param.h> + #include <sys/proc.h> + #include <sys/queue.h> + + /* Maximum value grater that 0 in signed type. */ #define CB_MAXREG_G ((u_int)~0 >> 1) Index: cerb_desc.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_desc.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cerb_desc.h 26 Sep 2002 21:55:52 -0000 1.6 --- cerb_desc.h 4 Oct 2002 18:12:05 -0000 1.7 *************** *** 11,14 **** --- 11,19 ---- #define _CERB_DESC_H_ + #include <sys/param.h> + #include <sys/proc.h> + #include <sys/queue.h> + + extern char *vcb_desc_null; Index: cerb_globals.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_globals.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cerb_globals.h 26 Sep 2002 21:55:52 -0000 1.13 --- cerb_globals.h 4 Oct 2002 18:12:05 -0000 1.14 *************** *** 11,14 **** --- 11,16 ---- #define _CERB_GLOBALS_H_ + #ifdef _KERNEL + #define CB_NREGS_G 10 /* How many registers (in rules) should be allocated */ *************** *** 26,29 **** --- 28,33 ---- #define CB_MAXIP6CHARS_G 48 + #endif /* _KERNEL */ + /* * Value ID placed in scb_val.v_id. *************** *** 86,119 **** ECB_FSIZE_L, /* size of executable */ ECB_MAXLOCAL_L - }; - - /* - * Types of local variables. - */ - static const u_int tcb_local2type[] = { - CB_UDEF_T, /* ECB_SYSCALL */ - CB_STR_T, /* ECB_NAME_L */ - CB_UDEF_T, /* ECB_PID_L */ - CB_UDEF_T, /* ECB_PPID_L */ - CB_UDEF_T, /* ECB_RUID_L */ - CB_UDEF_T, /* ECB_RGID_L */ - CB_UDEF_T, /* ECB_EUID_L */ - CB_UDEF_T, /* ECB_EGID_L */ - CB_UDEF_T, /* ECB_SVUID_L */ - CB_UDEF_T, /* ECB_SVGID_L */ - CB_UDEFPTR_T, /* ECB_GROUPS_L */ - CB_STR_T, /* ECB_LOGIN_L */ - CB_PTR_T, /* ECB_PRISON_L */ - CB_DEF_T, /* ECB_RETVAL0_L */ - CB_DEF_T, /* ECB_RETVAL1_L */ - CB_STR_T, /* ECB_FNAME_L */ - CB_UDEF_T, /* ECB_FINODE_L */ - CB_UDEF_T, /* ECB_FDEV_L */ - CB_UDEF_T, /* ECB_FUID_L */ - CB_UDEF_T, /* ECB_FGID_L */ - CB_UDEF_T, /* ECB_FMODE_L */ - CB_UDEF_T, /* ECB_FFLAGS_L */ - CB_UDEF_T, /* ECB_FNLINKS_L */ - CB_UDEF_T /* ECB_FSIZE_L */ }; --- 90,93 ---- Index: cerb_malloc.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_malloc.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cerb_malloc.h 26 Sep 2002 21:55:52 -0000 1.6 --- cerb_malloc.h 4 Oct 2002 18:12:05 -0000 1.7 *************** *** 11,14 **** --- 11,18 ---- #define _CERB_MALLOC_H_ + #include <sys/param.h> + #include <sys/queue.h> + + extern u_int ccb_safemalloc; Index: cerb_rules.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_rules.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** cerb_rules.h 4 Oct 2002 17:44:08 -0000 1.16 --- cerb_rules.h 4 Oct 2002 18:12:05 -0000 1.17 *************** *** 11,22 **** #define _CERB_RULES_H_ - #include <sys/types.h> #include <sys/param.h> #include <sys/proc.h> - #include <machine/types.h> #include "cerb_globals.h" - #define __P(x) x struct scb_val; --- 11,22 ---- #define _CERB_RULES_H_ #include <sys/param.h> + + #ifdef _KERNEL + #include <sys/proc.h> #include "cerb_globals.h" struct scb_val; *************** *** 30,33 **** --- 30,34 ---- extern u_int vcb_nrules; + #endif /* _KERNEL */ struct scb_val { Index: cerb_string.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_string.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cerb_string.h 26 Sep 2002 21:55:52 -0000 1.6 --- cerb_string.h 4 Oct 2002 18:12:05 -0000 1.7 *************** *** 11,14 **** --- 11,19 ---- #define _CERB_STRING_H_ + #include <sys/param.h> + + #include "cerb_rules.h" + + u_int fcb_getpart(register char *string, char *buf, char *sep, u_int no); u_int fcb_getlen(register char *string, char *sep); Index: cerb_syscalls.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_syscalls.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cerb_syscalls.h 26 Sep 2002 21:55:52 -0000 1.6 --- cerb_syscalls.h 4 Oct 2002 18:12:05 -0000 1.7 *************** *** 11,14 **** --- 11,18 ---- #define _CERB_SYSCALLS_H_ + #include <sys/param.h> + #include <sys/sysent.h> + + extern sy_call_t *tcb_oldscall[]; extern u_int vcb_syscall; Index: cerb_urules.c =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_urules.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** cerb_urules.c 26 Sep 2002 21:55:52 -0000 1.22 --- cerb_urules.c 4 Oct 2002 18:12:05 -0000 1.23 *************** *** 26,29 **** --- 26,60 ---- /* + * Types of local variables. + */ + static const u_int tcb_local2type[] = { + CB_UDEF_T, /* ECB_SYSCALL */ + CB_STR_T, /* ECB_NAME_L */ + CB_UDEF_T, /* ECB_PID_L */ + CB_UDEF_T, /* ECB_PPID_L */ + CB_UDEF_T, /* ECB_RUID_L */ + CB_UDEF_T, /* ECB_RGID_L */ + CB_UDEF_T, /* ECB_EUID_L */ + CB_UDEF_T, /* ECB_EGID_L */ + CB_UDEF_T, /* ECB_SVUID_L */ + CB_UDEF_T, /* ECB_SVGID_L */ + CB_UDEFPTR_T, /* ECB_GROUPS_L */ + CB_STR_T, /* ECB_LOGIN_L */ + CB_PTR_T, /* ECB_PRISON_L */ + CB_DEF_T, /* ECB_RETVAL0_L */ + CB_DEF_T, /* ECB_RETVAL1_L */ + CB_STR_T, /* ECB_FNAME_L */ + CB_UDEF_T, /* ECB_FINODE_L */ + CB_UDEF_T, /* ECB_FDEV_L */ + CB_UDEF_T, /* ECB_FUID_L */ + CB_UDEF_T, /* ECB_FGID_L */ + CB_UDEF_T, /* ECB_FMODE_L */ + CB_UDEF_T, /* ECB_FFLAGS_L */ + CB_UDEF_T, /* ECB_FNLINKS_L */ + CB_UDEF_T /* ECB_FSIZE_L */ + }; + + + /* * Syscall definition. */ Index: cerb_urules.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_urules.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** cerb_urules.h 26 Sep 2002 21:55:52 -0000 1.7 --- cerb_urules.h 4 Oct 2002 18:12:05 -0000 1.8 *************** *** 11,14 **** --- 11,17 ---- #define _CERB_URULES_H_ + #include "cerb_rules.h" + + /* * Userland rule structure. Index: cerb_usmalloc.h =================================================================== RCS file: /cvsroot/cerber/cerb-ng/kcerb/cerb_usmalloc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cerb_usmalloc.h 26 Sep 2002 21:55:52 -0000 1.2 --- cerb_usmalloc.h 4 Oct 2002 18:12:05 -0000 1.3 *************** *** 11,14 **** --- 11,18 ---- #define _CERB_USMALLOC_H_ + #include <sys/param.h> + #include <sys/proc.h> + + extern u_int vcb_usm_pages, vcb_usm_free; |