Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / network / common / include / libraries / usergroup.h
bloba1405f1cc5221127ec6596e7e9e2113904990aae
1 #ifndef LIBRARIES_USERGROUP_H
2 #define LIBRARIES_USERGROUP_H
3 /*
4 * Definitions of AmiTCP/IP usergroup.library for 32 bit C compilers
6 * Copyright © 1994-2002 AmiTCP/IP Group & The MorphOS Team
7 * Network Solutions Development, Inc.
8 * All rights reserved.
10 * $Id$
13 #ifndef EXEC_TYPES_H
14 #include <exec/types.h>
15 #endif
17 #ifndef _PWD_H_
18 #include <pwd.h>
19 #endif
20 #ifndef _GRP_H_
21 #include <grp.h>
22 #endif
23 #ifndef _UTMP_H_
24 #include <utmp.h>
25 #endif
28 #define USERGROUPNAME "AmiTCP:libs/usergroup.library"
30 /* Extended password encryption begins with underscore */
31 #define _PASSWORD_EFMT1 '_'
33 /* Maximum length for password */
34 #define _PASSWORD_LEN 128
36 /* A user can belong to NGROUPS different groups */
37 #define NGROUPS 32
39 /* Max length of a login name */
40 #define MAXLOGNAME 32
42 /* Credentials of a process. Uses a 16-bit alignement for compatibility reasons */
43 #ifdef __GNUC__
44 #pragma pack(2)
45 #endif
46 struct UserGroupCredentials {
47 uid_t cr_ruid;
48 gid_t cr_rgid;
49 unsigned short cr_umask; /* umask (mode_t) */
50 uid_t cr_euid;
51 short cr_ngroups; /* number of groups */
52 gid_t cr_groups[NGROUPS];
53 struct Task *cr_session; /* pid_t (mode) */
54 char cr_login[MAXLOGNAME]; /* setlogin() name */
56 #ifdef __GNUC__
57 #pragma pack()
58 #endif
61 * ID conversion macros
63 #define UG2MU(id) ((id) == 0 ? 65535 : (id) == -2 ? 0 : (id))
64 #define MU2UG(id) ((id) == 65535 ? 0L : (id) == 0L ? -2L : (id))
67 * Context tags
69 #define UGT_ERRNOBPTR 0x80000001
70 #define UGT_ERRNOWPTR 0x80000002
71 #define UGT_ERRNOLPTR 0x80000004
72 #define UGT_ERRNOPTR(size)\
73 ((size == 4) ? UGT_ERRNOLPTR :\
74 (size == 2) ? UGT_ERRNOWPTR :\
75 (size == 1) ? UGT_ERRNOBPTR : 1L)
76 #define UGT_OWNER 0x80000011
77 #define UGT_INTRMASK 0x80000010
80 #endif /* !LIBRARIES_USERGROUP_H */