1 #ifndef LIBRARIES_USERGROUP_H
2 #define LIBRARIES_USERGROUP_H
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.
14 #include <exec/types.h>
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 */
39 /* Max length of a login name */
42 /* Credentials of a process. Uses a 16-bit alignement for compatibility reasons */
46 struct UserGroupCredentials
{
49 unsigned short cr_umask
; /* umask (mode_t) */
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 */
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))
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 */