summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e38f07e)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
struct dirent *dirent;
struct dirent *diriter;
size_t dirent_len;
struct dirent *dirent;
struct dirent *diriter;
size_t dirent_len;
ret = -errno;
goto error_dirfd;
}
ret = -errno;
goto error_dirfd;
}
- strncpy(td->collection_path, collection_path, PATH_MAX);
- td->collection_path[PATH_MAX - 1] = '\0';
+ respath = realpath(collection_path, td->collection_path);
+ if (!respath) {
+ fprintf(stdout, "[error] path resolution failure\n");
+ return -EINVAL;
+ }
strncpy(td->path, path, PATH_MAX);
td->path[PATH_MAX - 1] = '\0';
init_domain_name(td);
strncpy(td->path, path, PATH_MAX);
td->path[PATH_MAX - 1] = '\0';
init_domain_name(td);