diff options
author | Sumit Bose <sbose@redhat.com> | 2009-05-14 12:38:03 +0200 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-05-14 11:29:02 -0400 |
commit | 5422d203f05859fa2841e3a68980813806eb9581 (patch) | |
tree | d33d35a0cfe135e330c360ea4069022620a1981b /server/responder | |
parent | fbd46659003e418c2cd3551b425fcd24a1befd13 (diff) | |
download | sssd-5422d203f05859fa2841e3a68980813806eb9581.tar.gz sssd-5422d203f05859fa2841e3a68980813806eb9581.tar.bz2 sssd-5422d203f05859fa2841e3a68980813806eb9581.zip |
added check for NULL values
- allow unspecified value in struct pam_data to be NULL
- check if domain structure is initialized in pam_reply
Diffstat (limited to 'server/responder')
-rw-r--r-- | server/responder/pam/pamsrv_cmd.c | 1 | ||||
-rw-r--r-- | server/responder/pam/pamsrv_dp.c | 9 |
2 files changed, 1 insertions, 9 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c index 6d3f8991..df0cba45 100644 --- a/server/responder/pam/pamsrv_cmd.c +++ b/server/responder/pam/pamsrv_cmd.c @@ -141,6 +141,7 @@ static void pam_reply(struct pam_auth_req *preq) DEBUG(4, ("pam_reply get called.\n")); if ((pd->cmd == SSS_PAM_AUTHENTICATE) && + (preq->domain != NULL) && (preq->domain->cache_credentials == true) && (pd->offline_auth == false)) { diff --git a/server/responder/pam/pamsrv_dp.c b/server/responder/pam/pamsrv_dp.c index f352b270..fadb284a 100644 --- a/server/responder/pam/pamsrv_dp.c +++ b/server/responder/pam/pamsrv_dp.c @@ -88,15 +88,6 @@ int pam_dp_send_req(struct pam_auth_req *preq, int timeout) DBusConnection *conn; dbus_bool_t ret; - if ((pd->domain == NULL) || - (pd->user == NULL) || - (pd->service == NULL) || - (pd->tty == NULL) || - (pd->ruser == NULL) || - (pd->rhost == NULL) ) { - return EINVAL; - } - /* double check dp_ctx has actually been initialized. * in some pathological cases it may happen that nss starts up before * dp connection code is actually able to establish a connection. |