From f5efddb9aebd896df014a011d68aefb314beee22 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 27 Jul 2014 19:18:09 +0200 Subject: lib: directory_create_or_exist() does not use "uid" parameter Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- lib/param/util.c | 4 ++-- lib/util/samba_util.h | 3 +-- lib/util/util.c | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/param/util.c b/lib/param/util.c index 232e85b75c..faf161d4d4 100644 --- a/lib/param/util.c +++ b/lib/param/util.c @@ -91,7 +91,7 @@ static char *lpcfg_common_path(TALLOC_CTX* mem_ctx, } trim_string(dname,"","/"); - ok = directory_create_or_exist(dname, geteuid(), 0755); + ok = directory_create_or_exist(dname, 0755); if (!ok) { DEBUG(1, ("Unable to create directory %s for file %s. " "Error was %s\n", dname, name, strerror(errno))); @@ -231,7 +231,7 @@ char *smbd_tmp_path(TALLOC_CTX *mem_ctx, return NULL; } - ok = directory_create_or_exist(dname, geteuid(), 0755); + ok = directory_create_or_exist(dname, 0755); if (!ok) { return NULL; } diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index 251ddc26ce..2ffe028959 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -649,8 +649,7 @@ _PUBLIC_ bool file_check_permissions(const char *fname, * @retval true if the directory already existed and has the right permissions * or was successfully created. */ -_PUBLIC_ bool directory_create_or_exist(const char *dname, uid_t uid, - mode_t dir_perms); +_PUBLIC_ bool directory_create_or_exist(const char *dname, mode_t dir_perms); _PUBLIC_ bool directory_create_or_exist_strict(const char *dname, uid_t uid, diff --git a/lib/util/util.c b/lib/util/util.c index d0449e3ae8..1f75266c14 100644 --- a/lib/util/util.c +++ b/lib/util/util.c @@ -191,7 +191,6 @@ _PUBLIC_ bool directory_exist(const char *dname) * or was successfully created. */ _PUBLIC_ bool directory_create_or_exist(const char *dname, - uid_t uid, mode_t dir_perms) { int ret; @@ -254,7 +253,7 @@ _PUBLIC_ bool directory_create_or_exist_strict(const char *dname, bool ok; int rc; - ok = directory_create_or_exist(dname, uid, dir_perms); + ok = directory_create_or_exist(dname, dir_perms); if (!ok) { return false; } -- cgit