#include <stdarg.h>
+#ifdef HAVE_KRB4
#include <krb.h>
+#else
+#include <mr_krb.h>
+#endif
+#include <krb5.h>
enum clstate { CL_ACCEPTING, CL_ACTIVE, CL_CLOSING };
int hslen; /* Length of data in hsbuf */
} client;
-extern char krb_realm[REALM_SZ];
+struct mxentry
+{
+ char *name;
+ int pref;
+};
+
+extern char *krb_realm;
/* max length of query argument allowed */
#define ARGLEN 257
/* Used to setup static argv, maximum argc */
-#define QMAXARGS 22
+#define QMAXARGS 25
/* statistics on number of queries by version number */
extern int newqueries;
/* Maximum and minimum values that will be used for uids and gids */
-#define MAX_ID_VALUE 65535
+#define MAX_ID_VALUE 131072
#define MIN_ID_VALUE 100
/* Sleepy states for the server! */
/* prototypes from mr_sauth.c */
void do_auth(client *cl);
void do_proxy(client *cl);
+void do_krb5_auth(client *cl);
/* prototypes from mr_scall.c */
void do_client(client *cl);
int access_ahal(struct query *q, char *argv[], client *cl);
int access_snt(struct query *q, char *argv[], client *cl);
int access_printer(struct query *q, char *argv[], client *cl);
+int access_zephyr(struct query *q, char *argv[], client *cl);
+int access_container(struct query *q, char *argv[], client *cl);
+int access_update_user(struct query *q, char *argv[], client *cl);
+int check_mail_string(char *mailstring);
+struct mxentry *getmxrecords(const char *);
/* prototypes from qfollow.pc */
int followup_fix_modby(struct query *q, struct save_queue *sq,
int followup_glin(struct query *q, struct save_queue *sq, struct validate *v,
int (*action)(int, char **, void *), void *actarg,
client *cl);
+int followup_gsin(struct query *q, struct save_queue *sq, struct validate *v,
+ int (*action)(int, char **, void *), void *actarg,
+ client *cl);
int followup_gzcl(struct query *q, struct save_queue *sq, struct validate *v,
int (*action)(int, char **, void *), void *actarg,
client *cl);
int followup_gpsv(struct query *q, struct save_queue *sq, struct validate *v,
int (*action)(int, char **, void *), void *actarg,
client *cl);
+int followup_gcon(struct query *q, struct save_queue *sq, struct validate *v,
+ int (*action)(int, char **, void *), void *actarg,
+ client *cl);
+int followup_get_user(struct query *q, struct save_queue *sq,
+ struct validate *v, int (*action)(int, char **, void *),
+ void *actarg, client *cl);
int followup_ausr(struct query *q, char *argv[], client *cl);
int followup_aqot(struct query *q, char *argv[], client *cl);
int set_nfsphys_modtime(struct query *q, char *argv[], client *cl);
int set_filesys_modtime(struct query *q, char *argv[], client *cl);
int set_zephyr_modtime(struct query *q, char *argv[], client *cl);
+int set_service_modtime(struct query *q, char *argv[], client *cl);
int _sdl_followup(struct query *q, char *argv[], client *cl);
int trigger_dcm(struct query *q, char *argv[], client *cl);
int setup_aftg(struct query *q, char *argv[], client *cl);
int setup_dnfp(struct query *q, char *argv[], client *cl);
int setup_dqot(struct query *q, char *argv[], client *cl);
+int setup_asnt(struct query *q, char *argv[], client *cl);
int setup_dsnt(struct query *q, char *argv[], client *cl);
+int setup_ghst(struct query *q, char *argv[], client *cl);
int setup_ahst(struct query *q, char *argv[], client *cl);
int setup_ahal(struct query *q, char *argv[], client *cl);
int setup_uhha(struct query *q, char *argv[], client *cl);
int setup_aprn(struct query *q, char *argv[], client *cl);
int setup_dpsv(struct query *q, char *argv[], client *cl);
+int setup_dcon(struct query *q, char *argv[], client *cl);
+int setup_acon(struct query *q, char *argv[], client *cl);
+int setup_scli(struct query *q, char *argv[], client *cl);
+int setup_aali(struct query *q, char *argv[], client *cl);
/* prototypes from qsupport.pc */
int set_pobox(struct query *q, char *argv[], client *cl);
int set_pobox_pop(struct query *q, char *argv[], client *cl);
int add_member_to_list(struct query *q, char *argv[], client *cl);
int delete_member_from_list(struct query *q, char *argv[], client *cl);
+int tag_member_of_list(struct query *q, char *argv[], client *cl);
int register_user(struct query *q, char *argv[], client *cl);
int do_user_reservation(struct query *q, char *argv[], client *cl);
+int update_container(struct query *q, char *argv[], client *cl);
+int set_container_list(struct query *q, char *argv[], client *cl);
int get_ace_use(struct query *q, char **argv, client *cl,
int (*action)(int, char *[], void *), void *actarg);
int get_host_by_owner(struct query *q, char **argv, client *cl,
int (*action)(int, char *[], void *), void *actarg);
+int get_user_account_by_sponsor(struct query *q, char **argv, client *cl,
+ int (*action)(int, char *[], void *),
+ void *actarg);
int qualified_get_lists(struct query *q, char **argv, client *cl,
int (*action)(int, char *[], void *), void *actarg);
int get_members_of_list(struct query *q, char **argv, client *cl,
int get_user_by_reservation(struct query *q, char **argv, client *cl,
int (*action)(int, char *[], void *),
void *actarg);
+int get_machines_of_container(struct query *q, char **argv, client *cl,
+ int (*action)(int, char *[], void *),
+ void *actarg);
+int get_subcontainers_of_container(struct query *q, char **argv, client *cl,
+ int (*action)(int, char *[], void *),
+ void *actarg);
+
/* prototypes from qvalidate.pc */
int validate_fields(struct query *q, char *argv[], struct valobj *vo, int n);