74 } |
74 } |
75 |
75 |
76 int append_acl(pblock *pb, Session *sn, Request *rq) { |
76 int append_acl(pblock *pb, Session *sn, Request *rq) { |
77 const VirtualServer *vs = request_get_vs(rq); |
77 const VirtualServer *vs = request_get_vs(rq); |
78 |
78 |
|
79 WS_ASSERT(vs); |
|
80 |
79 char *aclname = pblock_findval("acl", pb); |
81 char *aclname = pblock_findval("acl", pb); |
80 if(aclname) { |
82 if(aclname) { |
81 ACLList *acl = acl_get(vs->acls, aclname); |
83 ACLList *acl = acl_get(vs->acls, aclname); |
82 if(!acl) { |
84 if(!acl) { |
83 log_ereport( |
85 log_ereport( |
88 } |
90 } |
89 |
91 |
90 acllist_append(sn, rq, acl); |
92 acllist_append(sn, rq, acl); |
91 } |
93 } |
92 |
94 |
93 return REQ_NOACTION; // TODO: should return REQ_PROCEED, fix nsapi_pathcheck |
95 return REQ_PROCEED; |
94 } |
96 } |
95 |
97 |
96 |
98 |
97 int check_acl(pblock *pb, Session *sn, Request *rq) { |
99 int check_acl(pblock *pb, Session *sn, Request *rq) { |
98 int access_mask = ACL_READ_DATA; // TODO: check method and path |
100 int access_mask = ACL_READ_DATA; // TODO: check method and path |