}
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)));
return NULL;
}
- ok = directory_create_or_exist(dname, geteuid(), 0755);
+ ok = directory_create_or_exist(dname, 0755);
if (!ok) {
return NULL;
}
* @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,
* or was successfully created.
*/
_PUBLIC_ bool directory_create_or_exist(const char *dname,
- uid_t uid,
mode_t dir_perms)
{
int ret;
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;
}
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;
/* 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;
}
}
#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);
}
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));
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",
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;
}
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;
}
* 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;
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;
/* 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;
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)));
* Make sure the directory for the privileged ldapi socket exists, and
* is of the correct permissions
*/
- if (!directory_create_or_exist(priv_dir, geteuid(), 0750)) {
+ if (!directory_create_or_exist(priv_dir, 0750)) {
task_server_terminate(task, "Cannot create ldap "
"privileged ldapi directory", true);
return;
goto fail;
}
- if (!directory_create_or_exist(lpcfg_ncalrpc_dir(lp_ctx), geteuid(), 0755)) {
+ if (!directory_create_or_exist(lpcfg_ncalrpc_dir(lp_ctx), 0755)) {
status = map_nt_error_from_unix_common(errno);
DEBUG(0,(__location__ ": Failed to create ncalrpc pipe directory '%s' - %s\n",
lpcfg_ncalrpc_dir(lp_ctx), nt_errstr(status)));