* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zserver.c,v $
- * Revision 1.59 1998-06-12 12:22:13 adam
+ * Revision 1.61 1998-06-24 12:16:15 adam
+ * Support for relations on text operands. Open range support in
+ * DFA module (i.e. [-j], [g-]).
+ *
+ * Revision 1.60 1998/06/22 11:36:49 adam
+ * Added authentication check facility to zebra.
+ *
+ * Revision 1.59 1998/06/12 12:22:13 adam
* Work on Zebra API.
*
* Revision 1.58 1998/05/27 16:57:46 adam
bend_initresult *r = odr_malloc (q->stream, sizeof(*r));
ZebraHandle zh;
struct statserv_options_block *sob;
+ char *user = NULL;
+ char *passwd = NULL;
r->errcode = 0;
r->errstring = 0;
r->errcode = 1;
return r;
}
+ if (q->auth)
+ {
+ if (q->auth->which == Z_IdAuthentication_open)
+ {
+ char *openpass = xstrdup (q->auth->u.open);
+ char *cp = strchr (openpass, '/');
+ if (cp)
+ {
+ *cp = '\0';
+ user = nmem_strdup (odr_getmem (q->stream), openpass);
+ passwd = nmem_strdup (odr_getmem (q->stream), cp+1);
+ }
+ xfree (openpass);
+ }
+ }
+ if (zebra_auth (zh, user, passwd))
+ {
+ r->errcode = 222;
+ r->errstring = user;
+ zebra_close (zh);
+ return r;
+ }
r->handle = zh;
return r;
}
{
ZebraHandle zh = handle;
- zebra_sort (zh, rr->stream, rr->num_input_setnames, rr->input_setnames,
+ zebra_sort (zh, rr->stream,
+ rr->num_input_setnames, (const char **) rr->input_setnames,
rr->output_setname, rr->sort_sequence, &rr->sort_status);
rr->errcode = zh->errCode;
rr->errstring = zh->errString;