summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-05-17 17:36:38 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-20 22:37:25 +0200
commit7486dea9f5f7b2a6fbbacc6db740a82140b6377c (patch)
treea7f7cfc4f772860423e56d363ade1f6408f45f71 /src/tools
parent574061e65d3fb687b9cb2c757afa1fe92812245e (diff)
downloadsssd-7486dea9f5f7b2a6fbbacc6db740a82140b6377c.tar.gz
sssd-7486dea9f5f7b2a6fbbacc6db740a82140b6377c.tar.bz2
sssd-7486dea9f5f7b2a6fbbacc6db740a82140b6377c.zip
Fixing critical format string issues.
--missing arguments. --format '%s', but argument is integer. --wrong format string, examle: '%\n'
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/files.c6
-rw-r--r--src/tools/sss_seed.c2
-rw-r--r--src/tools/sss_userdel.c6
-rw-r--r--src/tools/tools_mc_util.c3
-rw-r--r--src/tools/tools_util.c3
5 files changed, 12 insertions, 8 deletions
diff --git a/src/tools/files.c b/src/tools/files.c
index 186f18b9..1c1b0855 100644
--- a/src/tools/files.c
+++ b/src/tools/files.c
@@ -208,7 +208,7 @@ static int remove_tree_with_ctx(TALLOC_CTX *mem_ctx,
if (parent_dev && parent_dev != statres.st_dev) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Directory %s is on different filesystem, "
- "will not follow\n"));
+ "will not follow\n", result->d_name));
ret = EFAULT;
goto fail;
}
@@ -588,8 +588,8 @@ copy_entry(struct copy_ctx *cctx,
&st);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
- ("Could recursively copy '%s' to '%s': %s\n",
- src_ent_path, dest_dir_fd, strerror(ret)));
+ ("Couldn't recursively copy '%s' to '%s': %s\n",
+ src_ent_path, dest_ent_path, strerror(ret)));
goto done;
}
} else if (S_ISREG(st.st_mode)) {
diff --git a/src/tools/sss_seed.c b/src/tools/sss_seed.c
index 846a4472..75f7e8c5 100644
--- a/src/tools/sss_seed.c
+++ b/src/tools/sss_seed.c
@@ -789,7 +789,7 @@ int main(int argc, const char **argv)
/* initialize seed context and parse options */
ret = seed_init(sctx, argc, argv, &sctx);
if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE,("Seed init failed [%d][%d]\n",
+ DEBUG(SSSDBG_OP_FAILURE,("Seed init failed [%d][%s]\n",
ret, strerror(ret)));
goto done;
}
diff --git a/src/tools/sss_userdel.c b/src/tools/sss_userdel.c
index ac87a736..d61a4571 100644
--- a/src/tools/sss_userdel.c
+++ b/src/tools/sss_userdel.c
@@ -96,8 +96,10 @@ static int kick_user(struct tools_ctx *tctx)
} else {
/* parent */
if (pid == -1) {
- DEBUG(1, ("fork failed [%d]: %s\n"));
- return errno;
+ ret = errno;
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("fork failed [%d]: %s\n", ret, strerror(ret)));
+ return ret;
}
while((child_pid = waitpid(pid, &status, 0)) > 0) {
diff --git a/src/tools/tools_mc_util.c b/src/tools/tools_mc_util.c
index b563fac3..33d5d26d 100644
--- a/src/tools/tools_mc_util.c
+++ b/src/tools/tools_mc_util.c
@@ -117,7 +117,8 @@ done:
if (pret == -1) {
DEBUG(SSSDBG_MINOR_FAILURE,
("Failed to unlink file %s. "
- "Will be unlinked later by sssd_nss.\n"));
+ "Will be unlinked later by sssd_nss.\n",
+ mc_filename));
}
}
}
diff --git a/src/tools/tools_util.c b/src/tools/tools_util.c
index 1ad5326e..6798b658 100644
--- a/src/tools/tools_util.c
+++ b/src/tools/tools_util.c
@@ -532,8 +532,9 @@ int run_userdel_cmd(struct tools_ctx *tctx)
} else {
/* parent */
if (pid == -1) {
- DEBUG(1, ("fork failed [%d]: %s\n"));
ret = errno;
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("fork failed [%d]: %s\n", ret, strerror(ret)));
goto done;
}