makepath(): Update doc, recommend mkpath() over this function

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-31 21:08:21 +01:00
parent add4d5d325
commit 714ea88cc9
+5
View File
@@ -50,6 +50,11 @@ int mkpath(const char *dir, mode_t mode)
* makepath - Create all components of the specified directory.
* @dir: Directory to create.
*
* Comment:
* It is recommended to use mkpath() over this function since it has
* the @mode argument while this function instead default ot 0777,
* which in most cases is insecure.
*
* Returns:
* POSIX OK (0) on success, otherwise -1 and errno set appropriately.
* This function returns EINVAL on bad argument, or ENOMEM when it