summaryrefslogtreecommitdiff
path: root/src/responder
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/responder
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/responder')
-rw-r--r--src/responder/common/responder_common.c5
-rw-r--r--src/responder/nss/nsssrv_cmd.c15
-rw-r--r--src/responder/nss/nsssrv_services.c2
-rw-r--r--src/responder/pam/pam_LOCAL_domain.c2
-rw-r--r--src/responder/pam/pamsrv_cmd.c4
-rw-r--r--src/responder/pam/pamsrv_dp.c6
-rw-r--r--src/responder/sudo/sudosrv_get_sudorules.c5
7 files changed, 25 insertions, 14 deletions
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 54701d6f..4a878c67 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -462,8 +462,9 @@ static void accept_fd_handler(struct tevent_context *ev,
if (!cctx->cfde) {
close(cctx->cfd);
talloc_free(cctx);
- DEBUG(2, ("Failed to queue client handler%\n",
- accept_ctx->is_private ? " on privileged pipe" : ""));
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Failed to queue client handler%s\n",
+ accept_ctx->is_private ? " on privileged pipe" : ""));
return;
}
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index c409e794..57b5786f 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -1123,7 +1123,8 @@ static int nss_cmd_getbynam(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n", dctx->cmdctx));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
+ dctx->cmdctx->cmd));
ret = EINVAL;
}
@@ -1202,7 +1203,8 @@ static void nss_cmd_getbynam_done(struct tevent_req *req)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n", dctx->cmdctx));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
+ dctx->cmdctx->cmd));
ret = EINVAL;
}
@@ -1407,7 +1409,8 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n", dctx->cmdctx));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
+ dctx->cmdctx->cmd));
ret = EINVAL;
goto done;
}
@@ -1452,7 +1455,8 @@ static int nss_cmd_getbyid(enum sss_cli_command cmd, struct cli_ctx *cctx)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n", dctx->cmdctx));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
+ dctx->cmdctx->cmd));
ret = EINVAL;
}
@@ -1513,7 +1517,8 @@ static void nss_cmd_getbyid_done(struct tevent_req *req)
}
break;
default:
- DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n", dctx->cmdctx));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid command [%d].\n",
+ dctx->cmdctx->cmd));
ret = EINVAL;
}
diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c
index 99fc67e7..42a1deed 100644
--- a/src/responder/nss/nsssrv_services.c
+++ b/src/responder/nss/nsssrv_services.c
@@ -658,7 +658,7 @@ fill_service(struct sss_packet *packet,
port = (uint16_t) ldb_msg_find_attr_as_uint(msg, SYSDB_SVC_PORT, 0);
if (!port) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("No port for service [%s]. Skipping\n"));
+ ("No port for service [%s]. Skipping\n", tmpstr));
}
diff --git a/src/responder/pam/pam_LOCAL_domain.c b/src/responder/pam/pam_LOCAL_domain.c
index 4aec3e4d..e7776cba 100644
--- a/src/responder/pam/pam_LOCAL_domain.c
+++ b/src/responder/pam/pam_LOCAL_domain.c
@@ -332,7 +332,7 @@ int LOCAL_pam_handler(struct pam_auth_req *preq)
break;
default:
lreq->error = EINVAL;
- DEBUG(1, ("Unknown PAM task [%d].\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Unknown PAM task [%d].\n", pd->cmd));
}
done:
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 8350f655..ff86a13a 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -416,7 +416,9 @@ static errno_t filter_responses(struct confdb_ctx *cdb,
break;
default:
- DEBUG(7, ("User info type [%d] not filtered.\n"));
+ DEBUG(SSSDBG_TRACE_LIBS,
+ ("User info type [%d] not filtered.\n",
+ user_info_type));
}
} else if (resp->type & SSS_SERVER_INFO) {
resp->do_not_send_to_client = true;
diff --git a/src/responder/pam/pamsrv_dp.c b/src/responder/pam/pamsrv_dp.c
index 46c54dad..d5a52446 100644
--- a/src/responder/pam/pamsrv_dp.c
+++ b/src/responder/pam/pamsrv_dp.c
@@ -117,8 +117,10 @@ int pam_dp_send_req(struct pam_auth_req *preq, int timeout)
res = sss_dp_get_domain_conn(preq->cctx->rctx,
preq->domain->conn_name, &be_conn);
if (res != EOK) {
- DEBUG(1, ("The Data Provider connection for %s is not available!"
- " This maybe a bug, it shouldn't happen!\n", preq->domain));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("The Data Provider connection for %s is not available!"
+ " This maybe a bug, it shouldn't happen!\n",
+ preq->domain->conn_name));
return EIO;
}
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
index ab363da6..e84631e3 100644
--- a/src/responder/sudo/sudosrv_get_sudorules.c
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
@@ -564,7 +564,8 @@ static errno_t sudosrv_get_sudorules_from_cache(TALLOC_CTX *mem_ctx,
NULL, &groupnames);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to retrieve user info [%d]: %s\n", strerror(ret)));
+ ("Unable to retrieve user info [%d]: %s\n",
+ ret, strerror(ret)));
goto done;
}
flags = SYSDB_SUDO_FILTER_USERINFO | SYSDB_SUDO_FILTER_INCLUDE_ALL;
@@ -582,7 +583,7 @@ static errno_t sudosrv_get_sudorules_from_cache(TALLOC_CTX *mem_ctx,
&rules, &num_rules);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Unable to retrieve sudo rules [%d]: %s\n", strerror(ret)));
+ ("Unable to retrieve sudo rules [%d]: %s\n", ret, strerror(ret)));
goto done;
}