misc: Introduce internal function ssh_mkdirs()

If the given path includes missing directories, ssh_mkdirs() tries to
create them recursively.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 742918cb1c)
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-07-31 15:15:22 +02:00
committed by Jakub Jelen
parent 4505c076b3
commit 80c1dbdb61
3 changed files with 167 additions and 6 deletions

View File

@@ -85,4 +85,7 @@ int ssh_match_group(const char *group, const char *object);
void uint64_inc(unsigned char *counter);
void ssh_log_hexdump(const char *descr, const unsigned char *what, size_t len);
int ssh_mkdirs(const char *pathname, mode_t mode);
#endif /* MISC_H_ */