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