]> andersk Git - moira.git/blame - clients/userreg/userreg.h
second code style cleanup: void/void * usage, proper #includes. try to
[moira.git] / clients / userreg / userreg.h
CommitLineData
989a2c2c 1/*
2 * $Source$
3 * $Author$
4 * $Locker$
5 * $Header$
6 */
7
8#include <stdio.h>
7ac48069 9#include "ureg_proto.h"
989a2c2c 10#include "files.h"
11
48a6cc01 12/*
13 * This is a kludge for compatibility with the old Athenareg stuff
14 */
15
16struct user {
5eaef520 17 char u_first[100];
18 char u_mid_init[100];
19 char u_last[100];
20 char u_login[100];
21 char u_password[100];
22 char u_mit_id[100];
23 char u_home_dir[100];
24 int u_status;
48a6cc01 25};
26
27struct alias {
5eaef520 28 int foo;
48a6cc01 29};
30
31#define SUCCESS 0
32#define FAILURE 1
33#define NOT_FOUND 2
d21fc900 34#define FIRST_NAME_SIZE 17
35#define LAST_NAME_SIZE 17
36#define MID_INIT_SIZE 17
48a6cc01 37#define LOGIN_SIZE 9
30993175 38#define PASSWORD_SIZE 64
989a2c2c 39
40/* Input timeouts. The most important timeouts are those for the username
41 and the new password which should not be any longer than necessary. The
42 firstname timeout causes userreg to restart itself periodically since
43 userreg is waiting for a firstname when it is not being used. All the
44 other timeouts are just there so that userreg will not stay in a half-used
45 state -- possibly confusing an unwary registree.
46 */
445b483b 47#define FIRSTNAME_TIMEOUT 180 /* 3 minutes */
8041f8ea 48#define MI_TIMEOUT 90 /* 1.5 minutes */
49#define LASTNAME_TIMEOUT 90 /* 1.5 minutes */
50#define MITID_TIMEOUT 90 /* 1.5 minutes */
56c57bc8 51#define USERNAME_TIMEOUT 180 /* This should not be too long */
8041f8ea 52#define OLD_PASSWORD_TIMEOUT 90 /* 1.5 minutes */
56c57bc8 53#define NEW_PASSWORD_TIMEOUT 180 /* Neither should this */
8041f8ea 54#define REENTER_PASSWORD_TIMEOUT 90 /* 1.5 minutes */
55#define YN_TIMEOUT 90 /* 1.5 minutes */
989a2c2c 56#define TIMER_TIMEOUT 90 /* default timeout for timer_on() */
57
58#define NO 0
59#define YES 1
60
989a2c2c 61/* Global variables */
62extern struct user user,
63 db_user;
7ac48069 64
65/* prototypes from disable.c */
66char *disabled(char **msg);
67
68/* prototypes from display.c */
69void setup_display(void);
70void reset_display(void);
71void redisp(void);
72void input(char *prompt, char *buf, int maxsize, int timeout, int emptyok);
73void input_no_echo(char *prompt, char *buf, int maxsize, int timeout);
74void wait_for_user(void);
75int askyn(char *prompt);
76void display_text_line(char *line);
77void display_text(char *filename, char *string);
78void restore_display(void);
79void timer_on(void);
80void timer_off(void);
81void wfeep(void);
This page took 0.110514 seconds and 5 git commands to generate.