src/server/safs/pathcheck.c

changeset 87
bdec069d2239
parent 77
f1cff81e425a
child 92
382bff43c6eb
equal deleted inserted replaced
86:49bb6c8ceb2b 87:bdec069d2239
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

mercurial