-/*
- * $Source$
- * $Author$
- * $Header$
+/* $Id$
*
- * Copyright (C) 1987 by the Massachusetts Institute of Technology
- * For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * Query followup routines
+ *
+ * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*
*/
-#ifndef lint
-static char *rcsid_qsupport_dc = "$Header$";
-#endif lint
-
#include <mit-copyright.h>
#include "mr_server.h"
#include "query.h"
+#include "qrtn.h"
+
#include <ctype.h>
+#include <stdlib.h>
#include <string.h>
#ifdef GDSS
#include "gdss.h"
#endif /* GDSS */
+
EXEC SQL INCLUDE sqlca;
-#include "qrtn.h"
+
+RCSID("$Header$");
extern char *whoami, *table_name[];
extern int dbms_errno, mr_errcode;
* username, or # + the users_id.
*/
int followup_fix_modby(struct query *q, struct save_queue *sq,
- struct validate *v, int (*action)(), int actarg,
- client *cl)
+ struct validate *v, int (*action)(int, char *[], void *),
+ void *actarg, client *cl)
{
int i, j;
char **argv;
* routine but don't have a signature.
*/
int followup_guax(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
int i, j;
char **argv;
char *kname;
SigInfo si;
EXEC SQL BEGIN DECLARE SECTION;
- int timestamp, who, siglen;
+ int timestamp, who;
char *login;
char rsig[256];
EXEC SQL VAR rsig IS STRING(256);
si.SigInfoVersion = 0; /* XXXXX this isn't used */
kname_parse(si.pname, si.pinst, si.prealm, kname);
free(kname);
- si.rawsig = (unsigned char *)strsave(rsig);
+ si.rawsig = (unsigned char *)strdup(rsig);
if (log_flags & LOG_GDSS)
com_err(whoami, 0, "rawsig length = %d, sig=\"%s\"",
strlen(si.rawsig), si.rawsig);
GDSS_Recompose(&si, sigbuf);
free(si.rawsig);
free(argv[U_SIGNATURE]);
- argv[U_SIGNATURE] = strsave(sigbuf);
+ argv[U_SIGNATURE] = strdup(sigbuf);
if (log_flags & LOG_GDSS)
com_err(whoami, 0, "generated signature length %d",
strlen(sigbuf));
char fullname[129];
EXEC SQL END DECLARE SECTION;
#ifdef GDSS
- char databuf[32], *kname_unparse();
+ char databuf[32];
EXEC SQL BEGIN DECLARE SECTION;
char rawsig[128];
int sigwho, timestamp;
char *entity, *name;
EXEC SQL END DECLARE SECTION;
#ifdef GDSS
- char databuf[32], *kname_unparse();
+ char databuf[32];
EXEC SQL BEGIN DECLARE SECTION;
char rawsig[128];
char *login;
*/
int followup_gpob(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
char **argv;
char *ptype, *p;
*/
int followup_gsnt(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
char **argv, *type;
int id, i, idx, status;
{
status = 0;
free(argv[idx]);
- argv[idx] = strsave("NONE");
+ argv[idx] = strdup("NONE");
}
else
{
status = 0;
free(argv[idx]);
- argv[idx] = strsave("???");
+ argv[idx] = strdup("???");
}
if (status && status != MR_NO_MATCH)
return status;
*/
int followup_ghst(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
char **argv, *type;
int id, i, idx, status;
{
status = 0;
free(argv[idx]);
- argv[idx] = strsave("NONE");
+ argv[idx] = strdup("NONE");
}
else
{
status = 0;
free(argv[idx]);
- argv[idx] = strsave("???");
+ argv[idx] = strdup("???");
}
if (status && status != MR_NO_MATCH)
return status;
*/
int followup_glin(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
char **argv, *type;
int id, i, idx, status;
{
status = 0;
free(argv[idx]);
- argv[idx] = strsave("NONE");
+ argv[idx] = strdup("NONE");
}
else
{
status = 0;
free(argv[idx]);
- argv[idx] = strsave("???");
+ argv[idx] = strdup("???");
}
if (status && status != MR_NO_MATCH)
return status;
*/
int followup_gqot(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
int j;
char **argv;
break;
case 'A':
free(argv[2]);
- argv[2] = strsave("system:anyuser");
+ argv[2] = strdup("system:anyuser");
break;
default:
id = atoi(argv[2]);
int followup_gpce(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
int i, j;
char **argv;
*/
int followup_gzcl(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
int id, i, status;
char **argv;
{
status = 0;
free(argv[i + 1]);
- argv[i + 1] = strsave("NONE");
+ argv[i + 1] = strdup("NONE");
}
else
{
status = 0;
free(argv[i + 1]);
- argv[i + 1] = strsave("???");
+ argv[i + 1] = strdup("???");
}
if (status && status != MR_NO_MATCH)
return status;
*/
int followup_gsha(struct query *q, struct save_queue *sq, struct validate *v,
- int (*action)(), int actarg, client *cl)
+ int (*action)(int, char *[], void *), void *actarg,
+ client *cl)
{
char **argv;
int i, id, status;
{
status = 0;
free(argv[2]);
- argv[2] = strsave("NONE");
+ argv[2] = strdup("NONE");
}
else
{
status = 0;
free(argv[2]);
- argv[2] = strsave("???");
+ argv[2] = strdup("???");
}
if (status && status != MR_NO_MATCH)
return status;