[SSSD] [PATCH] PAM: remove unused parameter cdb

Lukas Slebodnik lslebodn at redhat.com
Tue Oct 20 07:42:28 UTC 2015


On (19/10/15 19:05), Pavel Reichl wrote:
>Hello,
>
>while working on unit test for pam responer I noticed that cdb parameter in not used in pam_can_user_cache_auth() and pam_can_user_cache_auth(). Please see trivial patch attached.
>
>Thanks!

>From 001cbeda29d11e5c778d0ad30cc0bd296e163a64 Mon Sep 17 00:00:00 2001
>From: Pavel Reichl <preichl at redhat.com>
>Date: Mon, 19 Oct 2015 13:00:44 -0400
>Subject: [PATCH] PAM: remove unused parameter cdb
>
>---
> src/responder/pam/pamsrv_cmd.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
>diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
>index 2823f8133eb74d245be0750193ed842c0fdb26d3..e3dc1a32642414f1181b923e0c1642e4039771f1 100644
>--- a/src/responder/pam/pamsrv_cmd.c
>+++ b/src/responder/pam/pamsrv_cmd.c
>@@ -1667,7 +1667,6 @@ static void pam_check_user_dp_callback(uint16_t err_maj, uint32_t err_min,
> 
> static errno_t pam_is_last_online_login_fresh(struct sss_domain_info *domain,
>                                               const char* user,
>-                                              struct confdb_ctx *cdb,
>                                               int cached_auth_timeout,
>                                               bool *_result)
> {
>@@ -1723,8 +1722,7 @@ static bool pam_is_authtok_cachable(struct sss_auth_token *authtok)
>     return cachable;
> }
> 
>-static bool pam_can_user_cache_auth(struct confdb_ctx *cdb,
>-                                    struct sss_domain_info *domain,
>+static bool pam_can_user_cache_auth(struct sss_domain_info *domain,
>                                     int pam_cmd,
>                                     struct sss_auth_token *authtok,
>                                     const char* user,
>@@ -1739,7 +1737,7 @@ static bool pam_can_user_cache_auth(struct confdb_ctx *cdb,
>             && pam_is_authtok_cachable(authtok)
>             && pam_is_cmd_cachable(pam_cmd)) {
> 
>-        ret = pam_is_last_online_login_fresh(domain, user, cdb,
>+        ret = pam_is_last_online_login_fresh(domain, user,
>                                              domain->cached_auth_timeout,
>                                              &result);
>         if (ret != EOK) {
>@@ -1785,8 +1783,7 @@ static void pam_dom_forwarder(struct pam_auth_req *preq)
>         return;
>     }
> 
>-    if (pam_can_user_cache_auth(pctx->rctx->cdb,
>-                                preq->domain,
>+    if (pam_can_user_cache_auth(preq->domain,
>                                 preq->pd->cmd,
>                                 preq->pd->authtok,
>                                 preq->pd->user,

Obious ACK

LS


More information about the sssd-devel mailing list