MCPcopy Index your code
hub / github.com/RsyncProject/rsync / access_match

Function access_match

access.c:246–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246static int access_match(const char *list, const char *addr, const char **host_ptr)
247{
248 char *tok;
249 char *list2 = strdup(list);
250
251 strlower(list2);
252
253 for (tok = strtok(list2, " ,\t"); tok; tok = strtok(NULL, " ,\t")) {
254 if (match_hostname(host_ptr, addr, tok) || match_address(addr, tok)) {
255 free(list2);
256 return 1;
257 }
258 }
259
260 free(list2);
261 return 0;
262}
263
264int allow_access(const char *addr, const char **host_ptr, int i)
265{

Callers 1

allow_accessFunction · 0.85

Calls 3

strlowerFunction · 0.85
match_hostnameFunction · 0.85
match_addressFunction · 0.85

Tested by

no test coverage detected