11
typedef HTList GroupDefList;
12
typedef HTList ItemList;
21
** Access Authorization failure reasons
25
HTAA_OK_GATEWAY, /* 200 OK, acting as a gateway */
26
HTAA_NO_AUTH, /* 401 Unauthorized, not authenticated */
27
HTAA_NOT_MEMBER, /* 401 Unauthorized, not authorized */
28
HTAA_IP_MASK, /* 403 Forbidden by IP mask */
29
HTAA_BY_RULE, /* 403 Forbidden by rule */
30
HTAA_NO_ACL, /* 403 Forbidden, ACL non-existent */
31
HTAA_NO_ENTRY, /* 403 Forbidden, no ACL entry */
32
HTAA_SETUP_ERROR, /* 403 Forbidden, server setup error */
33
HTAA_DOTDOT, /* 403 Forbidden, URL with /../ illegal */
34
HTAA_HTBIN, /* 403 Forbidden, /htbin not enabled */
35
HTAA_NOT_FOUND /* 404 Not found, or read protected */
40
Group definition grammar
43
"sequence of alphanumeric characters"
58
user_def { ',' user_def }
61
user_def | '(' user_def_list ')'
65
"sequence of alphanumeric characters and '*'s"
68
templ '.' templ '.' templ '.' templ
75
ip_number_mask | domain_name_mask
82
address_def { ',' address_def }
85
address_def | '(' address_def_list ')'
88
[user_part] ['@' address_part]
97
group_name ':' group_def
99
PARSE GROUP DEFINITION
103
PUBLIC GroupDef *HTAA_parseGroupDef PARAMS((FILE * fp));
106
Fill in Pointers to referenced Group Definitions in a Group Definition
108
References to groups (by their name) are resolved from group_def_list and pointers to
109
those structures are added to group_def.
113
PUBLIC void HTAA_resolveGroupReferences PARAMS((GroupDef * group_def,
114
GroupDefList * group_def_list));
117
Read Group File (and do caching)
119
If group file is already in cache returns a pointer to previously read group definition
124
PUBLIC GroupDefList *HTAA_readGroupFile PARAMS((CONST char * filename));
127
Delete Group Definition
129
Groups in cache should never be freed by this function. This should only be used to
130
free group definitions read by HTAA_parseGroupDef.
134
PUBLIC void GroupDef_delete PARAMS((GroupDef * group_def));
137
Print Out Group Definition (for trace purposes)
141
PUBLIC void HTAA_printGroupDef PARAMS((GroupDef * group_def));
144
Does a User Belong to a Given Set of Groups
146
This function checks both the username and the internet address.
150
/* PUBLIC HTAA_userAndInetInGroup()
151
** CHECK IF USER BELONGS TO TO A GIVEN GROUP
152
** AND THAT THE CONNECTION COMES FROM AN
153
** ADDRESS THAT IS ALLOWED BY THAT GROUP
155
** group the group definition structure.
156
** username connecting user.
157
** ip_number browser host IP number, optional.
158
** ip_name browser host IP name, optional.
159
** However, one of ip_number or ip_name
162
** returns HTAA_IP_MASK, if IP address mask was
163
** reason for failing.
164
** HTAA_NOT_MEMBER, if user does not belong
166
** HTAA_OK if both IP address and user are ok.
168
PUBLIC HTAAFailReasonType HTAA_userAndInetInGroup PARAMS((GroupDef * group,
173
#endif /* not HTGROUP_H */