diff options
author | Sumit Bose <sbose@redhat.com> | 2009-03-06 13:33:40 +0100 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-03-10 09:41:15 -0400 |
commit | b8919e480b4ad25fa03fa3961043e6dcfa28991b (patch) | |
tree | c0fd30ee68503326a3a9ab331b564c5dc8756c70 /server/responder/pam/pamsrv_util.c | |
parent | d0e33c2a035c4c877b9f624b6999899666cb6385 (diff) | |
download | sssd-b8919e480b4ad25fa03fa3961043e6dcfa28991b.tar.gz sssd-b8919e480b4ad25fa03fa3961043e6dcfa28991b.tar.bz2 sssd-b8919e480b4ad25fa03fa3961043e6dcfa28991b.zip |
added generic PAM return messages and a false login delay
Diffstat (limited to 'server/responder/pam/pamsrv_util.c')
-rw-r--r-- | server/responder/pam/pamsrv_util.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/server/responder/pam/pamsrv_util.c b/server/responder/pam/pamsrv_util.c index 5dab9b67..f43783a6 100644 --- a/server/responder/pam/pamsrv_util.c +++ b/server/responder/pam/pamsrv_util.c @@ -1,7 +1,8 @@ #include "util/util.h" #include "responder/pam/pamsrv.h" -void pam_print_data(int l, struct pam_data *pd) { +void pam_print_data(int l, struct pam_data *pd) +{ DEBUG(l, ("command: %d\n", pd->cmd)); DEBUG(l, ("domain: %s\n", pd->domain)); DEBUG(l, ("user: %s\n", pd->user)); @@ -14,3 +15,21 @@ void pam_print_data(int l, struct pam_data *pd) { DEBUG(l, ("newauthtok type: %d\n", pd->newauthtok_type)); DEBUG(l, ("newauthtok size: %d\n", pd->newauthtok_size)); } + +int pam_add_response(struct pam_data *pd, enum response_type type, + int len, uint8_t *data) +{ + struct response_data *new; + + new = talloc(pd, struct response_data); + if (new == NULL) return ENOMEM; + + new->type = type; + new->len = len; + new->data = talloc_memdup(pd, data, len); + if (new->data == NULL) return ENOMEM; + new->next = pd->resp_list; + pd->resp_list = new; + + return EOK; +} |