From 122ec37277329b92f613a34e7ff031d15d302c68 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 29 Aug 1987 00:05:54 +0000 Subject: [PATCH] Fixed bug in check_nfs. Added code to upcasify machine names in validate_id. --- server/qsupport.qc | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/server/qsupport.qc b/server/qsupport.qc index c016c232..3d8e43e6 100644 --- a/server/qsupport.qc +++ b/server/qsupport.qc @@ -6,11 +6,15 @@ * Copyright (C) 1987 by the Massachusetts Institute of Technology * * $Log$ - * Revision 1.11 1987-08-28 14:55:45 mike - * Modified delete_locker to require only one argument, the login name. - * Modified get_groups_of_all_users and get_all_poboxes to disable INGRES - * table locking. + * Revision 1.12 1987-08-29 00:05:54 mike + * Fixed bug in check_nfs. + * Added code to upcasify machine names in validate_id. * +Revision 1.11 87/08/28 14:55:45 mike +Modified delete_locker to require only one argument, the login name. +Modified get_groups_of_all_users and get_all_poboxes to disable INGRES +table locking. + Revision 1.10 87/08/25 15:56:54 mike - Fixed bugs in get_groups_of_all_users - Added tblstats updates to add_user_group @@ -456,12 +460,14 @@ setup_update_filesys(q, argv) ## int rowcount; ## char dir[32]; char caccess; + register int status; register char *cp1; register char *cp2; caccess = (isupper(*access)) ? tolower(*access) : *access; if (caccess != 'r' && caccess != 'w') return(SMS_FILESYS_ACCESS); + status = SMS_NFS; ## range of np is nfsphys ## retrieve (dir = np.#dir) where np.#mach_id = mach_id ## { @@ -471,10 +477,13 @@ setup_update_filesys(q, argv) if (*cp1++ != *cp2) break; cp2++; } - if (*cp2 == 0) return(SMS_SUCCESS); + if (*cp2 == 0) { + status = SMS_SUCCESS; +## endretrieve + } ## } - return(SMS_NFS); + return(status); ##} /* Followup Routines */ @@ -1710,9 +1719,13 @@ validate_id(argv, vo) ## char *idfield; ## int id; ## int rowcount; + register char *c; name = argv[vo->index]; table = vo->table; + /* minor kludge to upcasify machine names */ + if (!bcmp(table, "machine", 7)) + 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 -- 2.45.2