diff options
| author | Volker Lendecke <vl@samba.org> | 2014-07-27 19:18:09 +0200 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2014-07-28 22:04:13 +0200 |
| commit | f5efddb9aebd896df014a011d68aefb314beee22 (patch) | |
| tree | 9deba920075a9aedc2968205dda28ace35e86a9c /lib | |
| parent | 2b9c35da12f6892e22253e8beb6a7ec95ba17c58 (diff) | |
| download | samba-f5efddb9aebd896df014a011d68aefb314beee22.tar.gz samba-f5efddb9aebd896df014a011d68aefb314beee22.tar.xz samba-f5efddb9aebd896df014a011d68aefb314beee22.zip | |
lib: directory_create_or_exist() does not use "uid" parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/param/util.c | 4 | ||||
| -rw-r--r-- | lib/util/samba_util.h | 3 | ||||
| -rw-r--r-- | lib/util/util.c | 3 |
3 files changed, 4 insertions, 6 deletions
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; } |
