]> andersk Git - moira.git/blobdiff - server/mr_server.h
Check userhistory table as well as users table to determine if login is
[moira.git] / server / mr_server.h
index 903ff091a3b30714f91058790d9e9effb55327a8..4c11f46fbb218702390000db96129325b5fed51f 100644 (file)
 
 #include <krb.h>
 
-/* This should be in the kerberos header file. */
-
-struct krbname {
-  char name[ANAME_SZ];
-  char inst[INST_SZ];
-  char realm[REALM_SZ];
-};
-
 enum clstate { CL_ACCEPTING, CL_ACTIVE, CL_CLOSING };
 
 /*
@@ -37,10 +29,11 @@ typedef struct _client {
   struct sockaddr_in haddr;    /* IP address of client */
   enum clstate state;          /* State of the connection */
   char clname[MAX_K_NAME_SZ];  /* Name client authenticated to */
-  struct krbname kname;        /* Parsed version of the above */
-  char entity[9];              /* client program being used */
+  char entity[USERS_MODWITH_SIZE]; /* client program being used */
   int users_id;                        /* Moira-internal ID of authenticated user */
   int client_id;               /* Moira-internal ID of client */
+  int proxy_id;                        /* client_id of orig user, if proxied */
+  int version;                 /* Max query version known by client */
   time_t last_time_used;       /* Last time connection used */
   mr_params req;               /* Current request */
   mr_params *tuples;           /* Tuples waiting to send back to client */
@@ -56,13 +49,13 @@ extern char krb_realm[REALM_SZ];
 /* 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 ever be chosen for IDs */
-#define MAX_ID_VALUE   31999
+/* Maximum and minimum values that will be used for uids and gids */
+#define MAX_ID_VALUE   65535
 #define MIN_ID_VALUE   100
 
 /* Sleepy states for the server! */
@@ -120,6 +113,7 @@ void clist_delete(client *cp);
 
 /* prototypes from mr_sauth.c */
 void do_auth(client *cl);
+void do_proxy(client *cl);
 
 /* prototypes from mr_scall.c */
 void do_client(client *cl);
@@ -145,6 +139,7 @@ char *xstrdup(char *);
 /* prototypes from qaccess.pc */
 int access_user(struct query *q, char *argv[], client *cl);
 int access_login(struct query *q, char *argv[], client *cl);
+int access_spob(struct query *q, char *argv[], client *cl);
 int access_list(struct query *q, char *argv[], client *cl);
 int access_visible_list(struct query *q, char *argv[], client *cl);
 int access_vis_list_by_name(struct query *q, char *argv[], client *cl);
@@ -155,6 +150,10 @@ int access_filesys(struct query *q, char *argv[], client *cl);
 int access_host(struct query *q, char *argv[], 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);
 
 /* prototypes from qfollow.pc */
 int followup_fix_modby(struct query *q, struct save_queue *sq,
@@ -166,6 +165,9 @@ int followup_gpob(struct query *q, struct save_queue *sq, struct validate *v,
 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);
@@ -175,9 +177,6 @@ int followup_gsha(struct query *q, struct save_queue *sq, struct validate *v,
 int followup_gqot(struct query *q, struct save_queue *sq, struct validate *v,
                  int (*action)(int, char **, void *), void *actarg,
                  client *cl);
-int followup_gpce(struct query *q, struct save_queue *sq, struct validate *v,
-                 int (*action)(int, char **, void *), void *actarg,
-                 client *cl);
 int followup_guax(struct query *q, struct save_queue *sq, struct validate *v,
                  int (*action)(int, char **, void *), void *actarg,
                  client *cl);
@@ -187,11 +186,19 @@ int followup_gsnt(struct query *q, struct save_queue *sq, struct validate *v,
 int followup_ghst(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 followup_dqot(struct query *q, char *argv[], client *cl);
-int followup_uuac(struct query *q, char *argv[], client *cl);
 
 int set_modtime(struct query *q, char *argv[], client *cl);
 int set_modtime_by_id(struct query *q, char *argv[], client *cl);
@@ -204,6 +211,7 @@ int set_serverhost_modtime(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);
 
@@ -212,7 +220,6 @@ int prefetch_value(struct query *q, char *argv[], client *cl);
 int prefetch_filesys(struct query *q, char *argv[], client *cl);
 int setup_ausr(struct query *q, char *argv[], client *cl);
 int setup_dusr(struct query *q, char *argv[], client *cl);
-int setup_spop(struct query *q, char *argv[], client *cl);
 int setup_dpob(struct query *q, char *argv[], client *cl);
 int setup_dmac(struct query *q, char *argv[], client *cl);
 int setup_dclu(struct query *q, char *argv[], client *cl);
@@ -226,25 +233,37 @@ int setup_dfil(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);
 
 /* 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 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 (*action)(int, char *[], void *), void *actarg);
-int get_end_members_of_list(struct query *q, char **argv, client *cl,
-                           int (*action)(int, char *[], void *),
-                           void *actarg);
 int qualified_get_server(struct query *q, char **argv, client *cl,
                         int (*action)(int, char *[], void *), void *actarg);
 int qualified_get_serverhost(struct query *q, char **argv, client *cl,
@@ -254,8 +273,19 @@ int count_members_of_list(struct query *q, char **argv, client *cl,
                          int (*action)(int, char *[], void *), void *actarg);
 int get_lists_of_member(struct query *q, char **argv, client *cl,
                        int (*action)(int, char *[], void *), void *actarg);
+int get_user_reservations(struct query *q, char **argv, client *cl,
+                         int (*action)(int, char *[], void *), void *actarg);
+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 */
-/* from qvalidate.dc */
 int validate_fields(struct query *q, char *argv[], struct valobj *vo, int n);
 int validate_row(struct query *q, char *argv[], struct validate *v);
This page took 0.041583 seconds and 4 git commands to generate.