3 * Check access to a Moira query
5 * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
12 #include "mr_private.h"
21 * Check access to a named query.
23 int mr_access(char *name, int argc, char **argv)
25 mr_params params, reply;
30 params.u.mr_procno = MR_ACCESS;
31 params.mr_argc = argc + 1;
32 params.mr_argv = malloc(sizeof(char *) * (argc + 1));
35 params.mr_argv[0] = name;
36 memcpy(params.mr_argv + 1, argv, sizeof(char *) * argc);
37 params.mr_argl = NULL;
39 if ((status = mr_do_call(¶ms, &reply)) == MR_SUCCESS)
40 status = reply.u.mr_status;
42 mr_destroy_reply(reply);