Alias: Removed the address group `*', which meant everyone on the system.
[mmh] / h / aliasbr.h
1 /*
2 ** aliasbr.h -- definitions for the aliasing system
3 */
4
5 #define PASSWD "/etc/passwd"    /* passwd(5)               */
6 #define GROUP   "/etc/group"    /* group(5)                */
7
8 struct aka {
9         char *ak_name;          /* name to match against             */
10         struct adr *ak_addr;    /* list of addresses that it maps to */
11         struct aka *ak_next;    /* next aka in list                  */
12         char ak_visible;        /* should be visible in headers      */
13 };
14
15 struct adr {
16         char *ad_text;          /* text of this address in list        */
17         struct adr *ad_next;    /* next adr in list                    */
18         char ad_local;          /* text is local (check for expansion) */
19 };
20
21 /*
22 ** incore version of /etc/passwd
23 */
24 struct home {
25         char *h_name;           /* user name                             */
26         uid_t h_uid;            /* user id                               */
27         gid_t h_gid;            /* user's group                          */
28         char *h_home;           /* user's home directory                 */
29         char *h_shell;          /* user's shell                          */
30         int h_ngrps;            /* number of groups this user belongs to */
31         struct home *h_next;    /* next home in list                     */
32 };
33
34 struct home *seek_home(char *);
35
36 /*
37 ** prototypes
38 */
39 int alias(char *);
40 int akvisible(void);
41 void init_pw(void);
42 char *akresult(struct aka *);
43 char *akvalue(char *);
44 char *akerror(int);
45
46 /* codes returned by alias() */
47
48 #define AK_OK       0   /* file parsed ok        */
49 #define AK_NOFILE   1   /* couldn't read file    */
50 #define AK_ERROR    2   /* error parsing file    */
51 #define AK_LIMIT    3   /* memory limit exceeded */
52 #define AK_NOGROUP  4   /* no such group         */