client *cl;
{
register int i, j;
- char **argv, *malloc();
+ char **argv;
int id, status;
i = q->vcnt - 2;
client *cl;
{
register int i, j;
- char **argv, *malloc();
+ char **argv;
#ifdef GDSS
unsigned char sigbuf[256];
char *kname;
int actarg;
client *cl;
{
- char **argv, *index();
+ char **argv;
char *ptype, *p;
int mid, sid, status, i;
int actarg;
client *cl;
{
- char **argv, *malloc(), *realloc(), *type;
+ char **argv, *type;
int id, i, idx, status;
- idx = 7;
+ idx = 8;
while (sq_get_data(sq, &argv)) {
mr_trim_args(q->vcnt, argv);
}
+/* followup_ghst: fix the ace_name in argv[12]. argv[11] will contain the
+ * ace_type: "LIST", "USER", or "NONE". Decode the id in argv[12] into the
+ * proper name based on the type, and repace that string in the argv.
+ * Also fixes the modby field by called followup_fix_modby.
+ */
+
+followup_ghst(q, sq, v, action, actarg, cl)
+ register struct query *q;
+ register struct save_queue *sq;
+ register struct validate *v;
+ register int (*action)();
+ int actarg;
+ client *cl;
+{
+ char **argv, *type;
+ int id, i, idx, status;
+
+ while (sq_get_data(sq, &argv)) {
+ mr_trim_args(q->vcnt, argv);
+
+ id = atoi(argv[i = q->vcnt - 2]);
+ if (id > 0)
+ status = id_to_name(id, "USER", &argv[i]);
+ else
+ status = id_to_name(-id, "STRING", &argv[i]);
+ if (status && status != MR_NO_MATCH)
+ return(status);
+
+ id = atoi(argv[13]);
+ status = id_to_name(id, "STRING", &argv[13]);
+ if (status) return(status);
+ id = atoi(argv[14]);
+ status = id_to_name(id, "STRING", &argv[14]);
+ if (status) return(status);
+ id = atoi(argv[16]);
+ if (id < 0)
+ status = id_to_name(-id, "STRING", &argv[16]);
+ else
+ status = id_to_name(id, "USER", &argv[16]);
+ if (status) return(status);
+
+ idx = 12;
+ id = atoi(argv[idx]);
+ type = strtrim(argv[idx - 1]);
+
+ if (!strcmp(type, "LIST")) {
+ status = id_to_name(id, "LIST", &argv[idx]);
+ } else if (!strcmp(type, "USER")) {
+ status = id_to_name(id, "USER", &argv[idx]);
+ } else if (!strcmp(type, "KERBEROS")) {
+ status = id_to_name(id, "STRING", &argv[idx]);
+ } else if (!strcmp(type, "NONE")) {
+ status = 0;
+ free(argv[idx]);
+ argv[idx] = strsave("NONE");
+ } else {
+ status = 0;
+ free(argv[idx]);
+ argv[idx] = strsave("???");
+ }
+ if (status && status != MR_NO_MATCH)
+ return(status);
+
+ /* send the data */
+ (*action)(q->vcnt, argv, actarg);
+
+ /* free saved data */
+ for (i = 0; i < q->vcnt; i++)
+ free(argv[i]);
+ free(argv);
+ }
+
+ sq_destroy(sq);
+ return (MR_SUCCESS);
+}
+
+
/* followup_glin: fix the ace_name in argv[8]. argv[7] will contain the
* ace_type: "LIST", "USER", or "NONE". Decode the id in argv[8] into the
* proper name based on the type, and repace that string in the argv.
int actarg;
client *cl;
{
- char **argv, *malloc(), *realloc(), *type;
+ char **argv, *type;
int id, i, idx, status;
idx = 8;
client *cl;
{
register int j;
- char **argv, *malloc();
+ char **argv;
EXEC SQL BEGIN DECLARE SECTION;
int id;
char *name, *label;
client *cl;
{
register int i, j;
- char **argv, *malloc();
+ char **argv;
int id, status;
i = q->vcnt - 2;