X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/0fc7ab46de61be879bf4518e76e733109821a571..3c42035009809aefd1cdd283c40bfacdd84a6ac1:/server/qsupport.dc diff --git a/server/qsupport.dc b/server/qsupport.dc index 89718c01..a2b17f5e 100644 --- a/server/qsupport.dc +++ b/server/qsupport.dc @@ -592,6 +592,7 @@ int setup_alis(q, argv, cl) int ngid; EXEC SQL END DECLARE SECTION; char *malloc(); + unsigned char *p; int idx; if (!strcmp(q->shortname, "alis")) @@ -942,26 +943,6 @@ setup_dfil(q, argv, cl) } -/* setup_aftg: needed only because using the query table would - * create an invalid SQL statement. *sigh* Basically just validates - * that the first argument has type 'FSGROUP' in table 'filesys'. - */ - -setup_aftg(q, argv, cl) - struct query *q; - char **argv; - client *cl; -{ - EXEC SQL SELECT filsys_id INTO :idummy FROM filesys - WHERE type='FSGROUP'; - - if (sqlca.sqlcode != 0) - return(MR_NO_MATCH); /* Is there a better error code to return? */ - - return(MR_SUCCESS); -} - - /* setup_dnfp: check to see that the nfs physical partition does not have * any filesystems assigned to it before allowing it to be deleted. */ @@ -1428,8 +1409,8 @@ followup_guax(q, sq, v, action, actarg, cl) #ifdef GDSS if (q->vcnt == U_END && strlen(argv[U_SIGNATURE])) { login = argv[U_NAME]; - EXEC SQL REPEATED SELECT sigdate, sigwho FROM users - INTO :timestamp, :who + EXEC SQL REPEATED SELECT sigdate, sigwho + INTO :timestamp, :who FROM users WHERE login = :login; /** Use LEFT(...,SIZE(...)) here? **/ /** What about (INGRES) error handling? **/ /** Is this guaranteed to be a singleton select? **/ @@ -1502,7 +1483,7 @@ followup_ausr(q, argv, cl) name = kname_unparse(si.pname, si.pinst, si.prealm); status = name_to_id(name, "STRING", &sigwho); if (status == MR_NO_MATCH) { - EXEC SQL REPEATED SELECT value INTO sigwho FROM numvalues + EXEC SQL REPEATED SELECT value INTO :sigwho FROM numvalues WHERE name='strings_id'; sigwho++; EXEC SQL REPEATED UPDATE numvalues SET value = :sigwho @@ -1592,7 +1573,7 @@ followup_uuac(q, argv, cl) name = kname_unparse(si.pname, si.pinst, si.prealm); status = name_to_id(name, "STRING", &sigwho); if (status == MR_NO_MATCH) { - EXEC SQL REPEATED SELECT value INTO sigwho FROM numvalues + EXEC SQL REPEATED SELECT value INTO :sigwho FROM numvalues WHERE name='strings_id'; sigwho++; EXEC SQL REPEATED UPDATE numvalues SET value = :sigwho @@ -1614,7 +1595,7 @@ followup_uuac(q, argv, cl) /* create finger entry, pobox & set modtime on user */ #ifdef GDSS - EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity + EXEC SQL REPEATED UPDATE users SET modtime='now', modby = :who, modwith = :entity, signature = :rawsig, sigdate = :timestamp, sigwho = :sigwho WHERE users_id = :id; #else /* GDSS */ @@ -2976,7 +2957,7 @@ gmol_internal(q, argv, cl, action, actarg, flag) SELECT strings.string FROM strings, imembers WHERE imembers.list_id = :list_id AND imembers.member_type='KERBEROS' AND imembers.member_id = strings.string_id - AND imembers.direct > :direct; + AND imembers.direct > :direct ORDER BY 1; EXEC SQL OPEN csr122; while(1) { @@ -3938,7 +3919,7 @@ prefetch_value(q,argv,cl) if(sqlca.sqlerrd[2] != 1) return(MR_INTERNAL); argc = q->argc + q->vcnt; /* end of Argv for APPENDs */ - sprintf(argv[argc],"%d",value); + sprintf(argv[argc],"%d",value); /** Could save this step by changing tlist from %s to %d **/ return(MR_SUCCESS); }