Lines Matching full:path

98 	int c = strcmp(a->path, b->path);  in pf_anchor_compare()
114 pf_find_anchor(const char *path) in pf_find_anchor() argument
121 strlcpy(key->path, path, sizeof(key->path)); in pf_find_anchor()
128 pf_find_ruleset(const char *path) in pf_find_ruleset() argument
132 while (*path == '/') in pf_find_ruleset()
133 path++; in pf_find_ruleset()
134 if (!*path) in pf_find_ruleset()
136 anchor = pf_find_anchor(path); in pf_find_ruleset()
144 pf_get_leaf_ruleset(char *path, char **path_remainder) in pf_get_leaf_ruleset() argument
150 p = path; in pf_get_leaf_ruleset()
163 leaf = path; in pf_get_leaf_ruleset()
165 * if no path component exists, then main ruleset is in pf_get_leaf_ruleset()
175 /* restore slashes in path. */ in pf_get_leaf_ruleset()
192 ((parent != NULL) && (strlen(parent->path) >= PF_ANCHOR_MAXPATH))) in pf_create_anchor()
203 * Make sure path for levels 2, 3, ... is terminated by '/': in pf_create_anchor()
206 strlcpy(anchor->path, parent->path, sizeof(anchor->path)); in pf_create_anchor()
207 strlcat(anchor->path, "/", sizeof(anchor->path)); in pf_create_anchor()
209 strlcat(anchor->path, anchor->name, sizeof(anchor->path)); in pf_create_anchor()
214 __func__, anchor->path, anchor->name, dup->path, dup->name); in pf_create_anchor()
225 "'%s' '%s'", __func__, anchor->path, anchor->name, in pf_create_anchor()
226 dup->path, dup->name); in pf_create_anchor()
244 pf_find_or_create_ruleset(const char *path) in pf_find_or_create_ruleset() argument
250 if (path[0] == 0) in pf_find_or_create_ruleset()
253 while (*path == '/') in pf_find_or_create_ruleset()
254 path++; in pf_find_or_create_ruleset()
256 ruleset = pf_find_ruleset(path); in pf_find_or_create_ruleset()
263 strlcpy(p, path, MAXPATHLEN); in pf_find_or_create_ruleset()
271 * aname is a path remainder, which contains nodes we must create. We in pf_find_or_create_ruleset()
272 * process the aname path from left to right, effectively descending in pf_find_or_create_ruleset()
325 char *p, *path; in pf_anchor_setup() local
333 path = rs_malloc(MAXPATHLEN); in pf_anchor_setup()
334 if (path == NULL) in pf_anchor_setup()
337 strlcpy(path, name + 1, MAXPATHLEN); in pf_anchor_setup()
339 /* relative path */ in pf_anchor_setup()
341 if (s->anchor == NULL || !s->anchor->path[0]) in pf_anchor_setup()
342 path[0] = 0; in pf_anchor_setup()
344 strlcpy(path, s->anchor->path, MAXPATHLEN); in pf_anchor_setup()
346 if (!path[0]) { in pf_anchor_setup()
349 rs_free(path, MAXPATHLEN); in pf_anchor_setup()
352 if ((p = strrchr(path, '/')) != NULL) in pf_anchor_setup()
355 path[0] = 0; in pf_anchor_setup()
359 if (path[0]) in pf_anchor_setup()
360 strlcat(path, "/", MAXPATHLEN); in pf_anchor_setup()
361 strlcat(path, name, MAXPATHLEN); in pf_anchor_setup()
363 if ((p = strrchr(path, '/')) != NULL && !strcmp(p, "/*")) { in pf_anchor_setup()
367 ruleset = pf_find_or_create_ruleset(path); in pf_anchor_setup()
368 rs_free(path, MAXPATHLEN); in pf_anchor_setup()
388 strlcat(pr->anchor_call, r->anchor->path, in pf_anchor_copyout()
400 strlcpy(a, rs->anchor->path, MAXPATHLEN); in pf_anchor_copyout()
408 if (strncmp(a, r->anchor->path, strlen(a))) { in pf_anchor_copyout()
411 r->anchor->path); in pf_anchor_copyout()
415 if (strlen(r->anchor->path) > strlen(a)) in pf_anchor_copyout()
416 strlcat(pr->anchor_call, r->anchor->path + (a[0] ? in pf_anchor_copyout()