]> diplodocus.org Git - nmh/blob - h/aliasbr.h
Make the test suite work on systems other than Linux. Still needs work.
[nmh] / h / aliasbr.h
1
2 /*
3 * aliasbr.h -- definitions for the aliasing system
4 *
5 */
6
7 extern char *AliasFile; /* mh-alias(5) */
8 #define PASSWD "/etc/passwd" /* passwd(5) */
9 #define GROUP "/etc/group" /* group(5) */
10 #define EVERYONE 200 /* lowest uid for everyone */
11
12 struct aka {
13 char *ak_name; /* name to match against */
14 struct adr *ak_addr; /* list of addresses that it maps to */
15 struct aka *ak_next; /* next aka in list */
16 char ak_visible; /* should be visible in headers */
17 };
18
19 struct adr {
20 char *ad_text; /* text of this address in list */
21 struct adr *ad_next; /* next adr in list */
22 char ad_local; /* text is local (check for expansion) */
23 };
24
25 /*
26 * incore version of /etc/passwd
27 */
28 struct home {
29 char *h_name; /* user name */
30 uid_t h_uid; /* user id */
31 gid_t h_gid; /* user's group */
32 char *h_home; /* user's home directory */
33 char *h_shell; /* user's shell */
34 int h_ngrps; /* number of groups this user belongs to */
35 struct home *h_next; /* next home in list */
36 };
37
38 struct home *seek_home (char *);
39
40 /*
41 * prototypes
42 */
43 int alias (char *);
44 int akvisible (void);
45 void init_pw (void);
46 char *akresult (struct aka *);
47 char *akvalue (char *);
48 char *akerror (int);
49
50 /* codes returned by alias() */
51
52 #define AK_OK 0 /* file parsed ok */
53 #define AK_NOFILE 1 /* couldn't read file */
54 #define AK_ERROR 2 /* error parsing file */
55 #define AK_LIMIT 3 /* memory limit exceeded */
56 #define AK_NOGROUP 4 /* no such group */
57
58 /* should live here, not in mts.c */
59
60 extern int Everyone;
61 extern char *NoShell;