search for: concat_path

Displaying 1 result from an estimated 1 matches for "concat_path".

2014 Jan 01
0
Soft chroot jail for sftp-server
...rds Dimitri -------------- next part -------------- 75a76,78 > /* Restrict access to this directory */ > char* jail; > 85a89,213 > /* Concatenate 2 path parts in a way that one doesn't need to care about leading/trailing slashes. Returned pointer can be freed. */ > static char* concat_path(char* parent, char* child) { > size_t parent_len = strlen(parent); > if (parent_len < 1) > return xstrdup(child); > size_t child_len = strlen(child); > if (child_len < 1) > return xstrdup(parent); > > if (*child == '/') { > child++; > child...