From 714ea88cc9f7789a4bb612c0b36a257694a9d127 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 31 Oct 2017 21:05:37 +0100 Subject: [PATCH] makepath(): Update doc, recommend mkpath() over this function Signed-off-by: Joachim Nilsson --- makepath.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makepath.c b/makepath.c index 5185ee6..1b05134 100644 --- a/makepath.c +++ b/makepath.c @@ -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