Lines Matching defs:path
215 nc->path = xstrdup(auth_sock_name);
1053 * Chroot into a directory after checking it for safety: all path components
1057 safely_chroot(const char *path, uid_t uid)
1063 if (!path_absolute(path))
1064 fatal("chroot path does not begin at root");
1065 if (strlen(path) >= sizeof(component))
1066 fatal("chroot path too long");
1069 * Descend the path, checking that each component is a
1072 for (cp = path; cp != NULL;) {
1074 strlcpy(component, path, sizeof(component));
1077 memcpy(component, path, cp - path);
1078 component[cp - path] = '\0';
1091 fatal("chroot path %s\"%s\" is not a directory",
1096 if (chdir(path) == -1)
1097 fatal("Unable to chdir to chroot path \"%s\": "
1098 "%s", path, strerror(errno));
1099 if (chroot(path) == -1)
1100 fatal("chroot(\"%s\"): %s", path, strerror(errno));
1103 verbose("Changed root directory to \"%s\"", path);