#include "system/filesys.h"
#include "system/dir.h"
#include "param/param.h"
+#include "libds/common/roles.h"
/**
* @file
}
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)));
* @brief Returns an absolute path to a NTDB or TDB file in the Samba
* private directory.
*
- * @param name File to find, relative to PRIVATEDIR, without .(n)tdb extension.
- * Only provide fixed-string names which are supposed to change with "use ntdb"
- * option.
+ * @param name File to find, relative to PRIVATEDIR, without .tdb extension.
*
* @retval Pointer to a talloc'ed string containing the full path, for
* use with dbwrap_local_open().
struct loadparm_context *lp_ctx,
const char *name)
{
- const char *extension = ".tdb";
-
- if (lpcfg_use_ntdb(lp_ctx)) {
- extension = ".ntdb";
- }
-
- return talloc_asprintf(mem_ctx, "%s/%s%s",
- lpcfg_private_dir(lp_ctx), name, extension);
+ return talloc_asprintf(mem_ctx, "%s/%s.tdb",
+ lpcfg_private_dir(lp_ctx), name);
}
/**
return NULL;
}
- ok = directory_create_or_exist(dname, geteuid(), 0755);
+ ok = directory_create_or_exist(dname, 0755);
if (!ok) {
return NULL;
}