File: aliasbr.h

package info (click to toggle)
nmh 1.6-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,204 kB
  • ctags: 3,851
  • sloc: ansic: 48,922; sh: 16,422; makefile: 559; perl: 509; lex: 402; awk: 74
file content (59 lines) | stat: -rw-r--r-- 1,769 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

/*
 * aliasbr.h -- definitions for the aliasing system
 *
 */

extern char *AliasFile;		/* mh-alias(5)             */
#define	PASSWD	"/etc/passwd"	/* passwd(5)               */
#define GROUP   "/etc/group"	/* group(5)                */
#define EVERYONE 200		/* lowest uid for everyone */

struct aka {
    char *ak_name;		/* name to match against             */
    struct adr *ak_addr;	/* list of addresses that it maps to */
    struct aka *ak_next;	/* next aka in list                  */
    char ak_visible;		/* should be visible in headers      */
};

struct adr {
    char *ad_text;		/* text of this address in list        */
    struct adr *ad_next;	/* next adr in list                    */
    char ad_local;		/* text is local (check for expansion) */
};

/*
 * incore version of /etc/passwd
 */
struct home {
    char *h_name;		/* user name                             */
    uid_t h_uid;		/* user id                               */
    gid_t h_gid;		/* user's group                          */
    char *h_home;		/* user's home directory                 */
    char *h_shell;		/* user's shell                          */
    int	h_ngrps;		/* number of groups this user belongs to */
    struct home *h_next;	/* next home in list                     */
};

/*
 * prototypes
 */
int alias (char *);
int akvisible (void);
void init_pw (void);
char *akresult (struct aka *);
char *akvalue (char *);
char *akerror (int);

/* codes returned by alias() */

#define	AK_OK		0	/* file parsed ok 	 */
#define	AK_NOFILE	1	/* couldn't read file 	 */
#define	AK_ERROR	2	/* error parsing file 	 */
#define	AK_LIMIT	3	/* memory limit exceeded */
#define	AK_NOGROUP	4	/* no such group 	 */

/* should live here, not in mts.c */

extern int Everyone;
extern char *NoShell;