* $Header$
*
* Copyright (C) 1987 by the Massachusetts Institute of Technology
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
*
* Glue routines to allow the database stuff to be linked in to
* a program expecting a library level interface.
- *
- * $Log$
- * Revision 1.5 1988-06-30 14:39:30 mar
- * argument to sms_auth; trim args before returning them, fix trigger_dcm
- *
- * Revision 1.4 87/09/21 15:17:09 wesommer
- * Also need to initialize pseudo_client.clname.
- *
- * Revision 1.3 87/08/22 17:31:56 wesommer
- * Fix a "fall-through".
- *
- * Revision 1.2 87/07/29 16:03:58 wesommer
- * Initialize krb_realm.
- *
- * Revision 1.1 87/07/14 00:41:18 wesommer
- * Initial revision
- *
*/
#ifndef lint
static char *rcsid_sms_glue_c = "$Header$";
#endif lint
+#include <mit-copyright.h>
#include "sms_server.h"
#include <krb.h> /* XXX for error codes */
#include <pwd.h>
static client pseudo_client;
extern int krb_err_base, errno;
extern char *malloc(), *whoami;
+extern time_t now;
-sms_connect()
+sms_connect(server)
+char *server;
{
register int status;
strcpy(pseudo_client.clname, buf);
pseudo_client.users_id = get_users_id(pseudo_client.kname.name);
pseudo_client.entity = strsave(prog);
+ pseudo_client.args = (sms_params *) malloc(sizeof(sms_params));
+ pseudo_client.args->sms_version_no = SMS_VERSION_2;
return 0;
}
{
struct hint hints;
+ time(&now);
hints.proc = callproc;
hints.hint = callarg;
return sms_process_query(&pseudo_client, name, argc, argv,
int argc; /* Arg count */
char **argv; /* Args */
{
+ time(&now);
return sms_check_access(&pseudo_client, name, argc, argv);
}
{
struct hint hints;
+ time(&now);
hints.proc = callproc;
hints.hint = callarg;
return sms_process_query(&pseudo_client, argv[0], argc-1, argv+1,
int argc;
char **argv;
{
+ time(&now);
return sms_check_access(&pseudo_client, argv[0], argc-1, argv+1);
}
return(SMS_SUCCESS);
}
}
-
-
-/*
- * Local Variables:
- * mode: c
- * c-indent-level: 4
- * c-continued-statement-offset: 4
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * End:
- */