summaryrefslogtreecommitdiffstats
path: root/src/tools/tools_util.c
diff options
context:
space:
mode:
authorFabiano Fidêncio <fidencio@redhat.com>2017-08-02 12:10:10 +0200
committerJakub Hrozek <jhrozek@redhat.com>2017-08-28 20:40:43 +0200
commit5b93634c7f0e34f69b4cf8fb9b2e77b9179024a7 (patch)
tree0587d1c30c467b7283bd6639be58c451550b4a6a /src/tools/tools_util.c
parent7c1d1393537dec95e09b83b607ce9d0e8f49584c (diff)
downloadsssd-5b93634c7f0e34f69b4cf8fb9b2e77b9179024a7.tar.gz
sssd-5b93634c7f0e34f69b4cf8fb9b2e77b9179024a7.tar.xz
sssd-5b93634c7f0e34f69b4cf8fb9b2e77b9179024a7.zip
UTIL: move {files,selinux}.c under util directory
files.c has at least one function that will be re-used for the new session provider that's about to be added. Also, a few other functions may be added and files.c seems the right place for those. selinux.c has been moved together with files.c as the latter takes advantage of some functions from the former and we do not want to always link agains the tools code. The public functions from files.c got a "sss_" prefix and it has been changed whenever they're used. Last but not least, all the places that included "tools/tools_util.h" due to the functions on files.c had this include removed (as they were already including "util/util.h". Related: https://pagure.io/SSSD/sssd/issue/2995 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/tools/tools_util.c')
-rw-r--r--src/tools/tools_util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/tools_util.c b/src/tools/tools_util.c
index 5e51a4089..87a17491d 100644
--- a/src/tools/tools_util.c
+++ b/src/tools/tools_util.c
@@ -33,7 +33,6 @@
#include "util/util.h"
#include "confdb/confdb.h"
#include "db/sysdb.h"
-#include "tools/tools_util.h"
#include "tools/sss_sync_ops.h"
static int setup_db(struct tools_ctx *ctx)
@@ -414,7 +413,7 @@ int remove_homedir(TALLOC_CTX *mem_ctx,
}
/* Remove the tree */
- ret = remove_tree(homedir);
+ ret = sss_remove_tree(homedir);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, "Cannot remove homedir %s: %d\n",
homedir, ret);
@@ -502,7 +501,7 @@ int create_homedir(const char *skeldir,
selinux_file_context(homedir);
- ret = copy_tree(skeldir, homedir, 0777 & ~default_umask, uid, gid);
+ ret = sss_copy_tree(skeldir, homedir, 0777 & ~default_umask, uid, gid);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
"Cannot populate user's home directory: [%d][%s].\n",