From 9119288ed805a1243ff73f98a05a44e626b5b6b8 Mon Sep 17 00:00:00 2001 From: wesommer Date: Mon, 4 Jan 1988 11:56:09 +0000 Subject: [PATCH] Fixed access on access_pop; small changes for xxx_user_by_uid queries. --- server/qsupport.qc | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/server/qsupport.qc b/server/qsupport.qc index fed050f9..6b5f9dd6 100644 --- a/server/qsupport.qc +++ b/server/qsupport.qc @@ -6,10 +6,13 @@ * Copyright (C) 1987 by the Massachusetts Institute of Technology * * $Log$ - * Revision 1.15 1987-09-11 15:31:58 wesommer - * add_user_group modified to side-effect the time for tbs for groups as - * well as the other things. + * Revision 1.16 1988-01-04 11:56:09 wesommer + * Fixed access on access_pop; small changes for xxx_user_by_uid queries. * +Revision 1.15 87/09/11 15:31:58 wesommer +add_user_group modified to side-effect the time for tbs for groups as +well as the other things. + Revision 1.15 87/09/10 22:44:49 wesommer One more table needs to be modified when adding the user-group. @@ -144,10 +147,8 @@ access_pop(q, argv, cl) mach_id = *(int *)argv[2]; box = argv[3]; ## range of p is pobox -## repeat retrieve (exists = any(p.#box where p.#users_id = @users_id -## and p.type = "POP" -## and p.#mach_id = @mach_id -## and p.#box = @box)) +## repeat retrieve (exists = any(p.#box where p.#users_id = @users_id)) + if (exists) return(SMS_EXISTS); } @@ -1753,8 +1754,13 @@ validate_id(argv, vo) for (c = name; *c; c++) if (islower(*c)) *c = toupper(*c); namefield = vo->namefield; idfield = vo->idfield; -## retrieve (id = table.idfield) where table.namefield = name -## inquire_equel (rowcount = "rowcount") + if (!bcmp(namefield, "uid", 4)) { +## retrieve (id = table.idfield) where table.namefield = int4(name) +## inquire_equel (rowcount = "rowcount") + } else { +## retrieve (id = table.idfield) where table.namefield = name +## inquire_equel (rowcount = "rowcount") + } if (rowcount != 1) return(vo->error); *(int *)argv[vo->index] = id; return(SMS_EXISTS); -- 2.45.2