summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-07-27 19:18:09 +0200
committerJeremy Allison <jra@samba.org>2014-07-28 22:04:13 +0200
commitf5efddb9aebd896df014a011d68aefb314beee22 (patch)
tree9deba920075a9aedc2968205dda28ace35e86a9c /source3
parent2b9c35da12f6892e22253e8beb6a7ec95ba17c58 (diff)
downloadsamba-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 'source3')
-rw-r--r--source3/lib/dumpcore.c2
-rw-r--r--source3/lib/eventlog/eventlog.c2
-rw-r--r--source3/nmbd/nmbd.c4
-rw-r--r--source3/printing/nt_printing.c6
-rw-r--r--source3/printing/printing.c2
-rw-r--r--source3/registry/reg_perfcount.c2
-rw-r--r--source3/rpc_server/rpc_server.c4
-rw-r--r--source3/smbd/server.c2
-rw-r--r--source3/winbindd/winbindd.c4
9 files changed, 13 insertions, 15 deletions
diff --git a/source3/lib/dumpcore.c b/source3/lib/dumpcore.c
index f284ea4673..487ccecc74 100644
--- a/source3/lib/dumpcore.c
+++ b/source3/lib/dumpcore.c
@@ -67,7 +67,7 @@ static char *get_default_corepath(const char *logbase, const char *progname)
goto err_out;
}
- if (!directory_create_or_exist(tmp_corepath, uid, mode)) {
+ if (!directory_create_or_exist(tmp_corepath, mode)) {
DEBUG(0, ("Failed to create %s for user %d with mode 0%o\n",
tmp_corepath, (int)uid, (int)mode));
goto err_out;
diff --git a/source3/lib/eventlog/eventlog.c b/source3/lib/eventlog/eventlog.c
index 0cc0240bcc..4c6767d550 100644
--- a/source3/lib/eventlog/eventlog.c
+++ b/source3/lib/eventlog/eventlog.c
@@ -373,7 +373,7 @@ ELOG_TDB *elog_open_tdb( const char *logname, bool force_clear, bool read_only )
/* make sure that the eventlog dir exists */
eventlogdir = state_path( "eventlog" );
- ok = directory_create_or_exist(eventlogdir, geteuid(), 0755);
+ ok = directory_create_or_exist(eventlogdir, 0755);
if (!ok) {
return NULL;
}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 8c66d75082..50b18e5ea4 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -973,12 +973,12 @@ static bool open_sockets(bool isdaemon, int port)
}
#endif
- ok = directory_create_or_exist(lp_lock_directory(), geteuid(), 0755);
+ ok = directory_create_or_exist(lp_lock_directory(), 0755);
if (!ok) {
exit_daemon("Failed to create directory for lock files, check 'lock directory'", errno);
}
- ok = directory_create_or_exist(lp_pid_directory(), geteuid(), 0755);
+ ok = directory_create_or_exist(lp_pid_directory(), 0755);
if (!ok) {
exit_daemon("Failed to create directory for pid files, check 'pid directory'", errno);
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 6a5f2d744a..b76badf3f0 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -95,7 +95,7 @@ static bool print_driver_directories_init(void)
return false;
}
- ok = directory_create_or_exist(driver_path, sec_initial_uid(), 0755);
+ ok = directory_create_or_exist(driver_path, 0755);
if (!ok) {
DEBUG(1, ("Failed to create printer driver directory %s\n",
driver_path));
@@ -115,9 +115,7 @@ static bool print_driver_directories_init(void)
return false;
}
- ok = directory_create_or_exist(arch_path,
- sec_initial_uid(),
- 0755);
+ ok = directory_create_or_exist(arch_path, 0755);
if (!ok) {
DEBUG(1, ("Failed to create printer driver "
"architecture directory %s\n",
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index fa4a2fc741..dcfd2a2dc5 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -203,7 +203,7 @@ bool print_backend_init(struct messaging_context *msg_ctx)
return false;
}
- ok = directory_create_or_exist(cache_path("printing"), geteuid(), 0755);
+ ok = directory_create_or_exist(cache_path("printing"), 0755);
if (!ok) {
return false;
}
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index 82e5624d47..b875067721 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -48,7 +48,7 @@ static char *counters_directory(const char *dbname)
TALLOC_CTX *ctx = talloc_tos();
path = state_path(PERFCOUNTDIR);
- if (!directory_create_or_exist(path, geteuid(), 0755)) {
+ if (!directory_create_or_exist(path, 0755)) {
return NULL;
}
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 2ac29e1bb4..01a854ccaf 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -106,7 +106,7 @@ int create_named_pipe_socket(const char *pipe_name)
* lp_ncalrpc_dir()/np should have 0700, we need to
* create lp_ncalrpc_dir() first.
*/
- if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) {
+ if (!directory_create_or_exist(lp_ncalrpc_dir(), 0755)) {
DEBUG(0, ("Failed to create pipe directory %s - %s\n",
lp_ncalrpc_dir(), strerror(errno)));
goto out;
@@ -773,7 +773,7 @@ int create_dcerpc_ncalrpc_socket(const char *name)
name = "DEFAULT";
}
- if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) {
+ if (!directory_create_or_exist(lp_ncalrpc_dir(), 0755)) {
DEBUG(0, ("Failed to create ncalrpc directory %s - %s\n",
lp_ncalrpc_dir(), strerror(errno)));
return -1;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index dd1e20a420..ec9348c34c 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1488,7 +1488,7 @@ extern void build_options(bool screen);
/* This MUST be done before start_epmd() because otherwise
* start_epmd() forks and races against dcesrv_ep_setup() to
* call directory_create_or_exist() */
- if (!directory_create_or_exist(lp_ncalrpc_dir(), geteuid(), 0755)) {
+ if (!directory_create_or_exist(lp_ncalrpc_dir(), 0755)) {
DEBUG(0, ("Failed to create pipe directory %s - %s\n",
lp_ncalrpc_dir(), strerror(errno)));
return -1;
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index cb6164674f..a51a172973 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1519,14 +1519,14 @@ int main(int argc, const char **argv)
exit(1);
}
- ok = directory_create_or_exist(lp_lock_directory(), geteuid(), 0755);
+ ok = directory_create_or_exist(lp_lock_directory(), 0755);
if (!ok) {
DEBUG(0, ("Failed to create directory %s for lock files - %s\n",
lp_lock_directory(), strerror(errno)));
exit(1);
}
- ok = directory_create_or_exist(lp_pid_directory(), geteuid(), 0755);
+ ok = directory_create_or_exist(lp_pid_directory(), 0755);
if (!ok) {
DEBUG(0, ("Failed to create directory %s for pid files - %s\n",
lp_pid_directory(), strerror(errno)));