Merge from vendor branch TNF:
[pkgsrcv2.git] / www / lynx / patches.v6 / patch-ag
1 $NetBSD: patch-ag,v 1.1 2000/01/15 17:44:21 hubertf Exp $
2
3 diff -x *.orig -urN ./WWW/Library/Implementation/HTACL.h /usr/pkgsrc/www/lynx/work.unpatched/lynx2-8-2/WWW/Library/Implementation/HTACL.h
4 --- ./WWW/Library/Implementation/HTACL.h        Thu Jan  1 01:00:00 1970
5 +++ /usr/pkgsrc/www/lynx/work.unpatched/lynx2-8-2/WWW/Library/Implementation/HTACL.h    Sat Jan 15 07:57:17 2000
6 @@ -0,0 +1,106 @@
7 +/*                               ACCESS CONTROL LIST ROUTINES
8 +
9 + */
10 +
11 +#ifndef HTACL_H
12 +#define HTACL_H
13 +
14 +#include <HTAAUtil.h>
15 +#include <HTGroup.h>
16 +
17 +#ifdef SHORT_NAMES
18 +#define HTAAoACL       HTAA_openAcl
19 +#define HTAAcACL       HTAA_closeAcl
20 +#define HTAAgAEn       HTAA_getAclEntry
21 +#endif /* SHORT_NAMES */
22 +
23 +/*
24 +
25 +Opening Access Control List File
26 +
27 + */
28 +
29 +/* PUBLIC                                              HTAA_openAcl()
30 +**             OPEN THE ACL FILE FOR THE GIVEN DOCUMENT
31 +** ON ENTRY:
32 +**     pathname        is the absolute pathname of
33 +**                     the file to be accessed.
34 +**
35 +** ON EXIT:
36 +**     returns         the FILE* to open ACL.
37 +**                     NULL, if ACL not found.
38 +*/
39 +PUBLIC FILE *HTAA_openAcl PARAMS((CONST char * pathname));
40 +
41 +
42 +/* PUBLIC                                              HTAA_closeAcl()
43 +**                     CLOSE ACL FILE
44 +** ON ENTRY:
45 +**     acl_file is Access Control List file to close.
46 +**
47 +** ON EXIT:
48 +**     returns nothing.
49 +*/
50 +PUBLIC void HTAA_closeAcl PARAMS((FILE * acl_file));
51 +/*
52 +
53 +Getting ACL Entry
54 +
55 + */
56 +
57 +/* PUBLIC                                              HTAA_getAclEntry()
58 +**                     CONSULT THE ACCESS CONTROL LIST AND
59 +**                     GIVE A LIST OF GROUPS (AND USERS)
60 +**                     AUTHORIZED TO ACCESS A GIVEN FILE
61 +** ON ENTRY:
62 +**     acl_file        is an open ACL file.
63 +**     pathname        is the absolute pathname of
64 +**                     the file to be accessed.
65 +**     method          is the method for which access is wanted.
66 +**
67 +** ALC FILE FORMAT:
68 +**
69 +**     template : method, method, ... : group@addr, user, group, ...
70 +**
71 +**     The last item is in fact in exactly the same format as
72 +**     group definition in group file, i.e. everything that
73 +**     follows the 'groupname:' part,
74 +**     e.g.
75 +**             user, group, user@address, group@address,
76 +**             (user,group,...)@(address, address, ...)
77 +**
78 +** ON EXIT:
79 +**     returns         NULL, if there is no entry for the file in the ACL,
80 +**                     or ACL doesn't exist.
81 +**                     If there is, a GroupDef object containing the
82 +**                     group and user names allowed to access the file
83 +**                     is returned (this is automatically freed
84 +**                     next time this function is called).
85 +** IMPORTANT:
86 +**     Returns the first entry with matching template and
87 +**     method. This function should be called multiple times
88 +**     to process all the valid entries (until it returns NULL).
89 +**     This is because there can be multiple entries like:
90 +**
91 +**             *.html : get,put : ari,timbl,robert
92 +**             *.html : get     : jim,james,jonathan,jojo
93 +**
94 +** NOTE:
95 +**     The returned group definition may well contain references
96 +**     to groups defined in group file. Therefore these references
97 +**     must be resolved according to that rule file by function
98 +**     HTAA_resolveGroupReferences() (group file is read in by
99 +**     HTAA_readGroupFile()) and after that access authorization
100 +**     can be checked with function HTAA_userAndInetGroup().
101 +*/
102 +PUBLIC GroupDef *HTAA_getAclEntry PARAMS((FILE *       acl_file,
103 +                                         CONST char *  pathname,
104 +                                         HTAAMethod    method));
105 +/*
106 +
107 + */
108 +
109 +#endif /* not HTACL_H */
110 +/*
111 +
112 +   End of file HTACL.h.  */