From 476cf567700471d32c7f0bece14c90642f15e865 Mon Sep 17 00:00:00 2001 From: mar Date: Thu, 14 Jan 1988 12:00:38 +0000 Subject: [PATCH] separate access check from setup routine. make get_query_need be more paranoid --- server/qsupport.qc | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/server/qsupport.qc b/server/qsupport.qc index de3dfc8b..f28dc8a0 100644 --- a/server/qsupport.qc +++ b/server/qsupport.qc @@ -6,9 +6,13 @@ * Copyright (C) 1987 by the Massachusetts Institute of Technology * * $Log$ - * Revision 1.17 1988-01-04 12:09:00 mar - * fixup pobox access checking & make id assignment more paranoid (wesommer) + * Revision 1.18 1988-01-14 12:00:38 mar + * separate access check from setup routine. + * make get_query_need be more paranoid * +Revision 1.17 88/01/04 12:09:00 mar +fixup pobox access checking & make id assignment more paranoid (wesommer) + Revision 1.16 87/11/12 18:16:56 wesommer Add support for delete_user_by_uid. Fix access_pop. @@ -252,21 +256,16 @@ access_maillist(q, argv, cl) ** **/ -setup_add_group(q, argv, cl, access_check) +setup_add_group(q, argv, cl) struct query *q; char *argv[]; client *cl; - int access_check; ##{ ## int ngid; ## int exists; ## int rowcount; int status; - status = access_list(q, argv, cl); - - if (status != SMS_SUCCESS || access_check) return(status); - ## range of g is groups ## range of v is values ## repeat retrieve (ngid = v.value) where v.name = "gid" @@ -295,17 +294,14 @@ setup_add_group(q, argv, cl, access_check) ** **/ -setup_add_user(q, argv, cl, access_check) +setup_add_user(q, argv, cl) struct query *q; register char *argv[]; client *cl; - int access_check; ##{ ## int nuid; ## int exists; - if (access_check) return(SMS_SUCCESS); - if (!bcmp(argv[1], "#", 2)) { ## range of u is users ## range of v is values @@ -803,19 +799,16 @@ add_new_quota(q, argv) return(SMS_SUCCESS); ##} -delete_current_quota(q, argv, cl, access_check) +delete_current_quota(q, argv, cl) struct query *q; register char *argv[]; client *cl; - int access_check; ##{ ## int mach_id; ## int users_id; ## char *device; ## int quota; - if (access_check) return(SMS_SUCCESS); - mach_id = *(int *)argv[0]; device = argv[1]; users_id = *(int *)argv[2]; @@ -1106,7 +1099,8 @@ get_query_need(q, argv, action, actarg) last_get_time = argv[1]; table = q1->rtable; - if (q1->type != RETRIEVE) return(SMS_NO_MATCH); + if (q1 == NULL || q1->type != RETRIEVE || table == NULL) + return(SMS_NO_MATCH); ## range of tbs is tblstats ## repeat retrieve (need = any(tbs.modtime where tbs.#table = @table and -- 2.45.2