Skip to content

Commit

Permalink
Really check return value from pam_set_item
Browse files Browse the repository at this point in the history
  • Loading branch information
sumit-bose authored and sgallagher committed Nov 23, 2009
1 parent 089077a commit f542305
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/providers/proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ static void proxy_pam_handler(struct be_req *req) {
ret = pam_start(ctx->pam_target, pd->user, &conv, &pamh);
if (ret == PAM_SUCCESS) {
DEBUG(1, ("Pam transaction started.\n"));
pam_set_item(pamh, PAM_TTY, pd->tty);
ret = pam_set_item(pamh, PAM_TTY, pd->tty);
if (ret != PAM_SUCCESS) {
DEBUG(1, ("Setting PAM_TTY failed: %s.\n", pam_strerror(pamh, ret)));
}
pam_set_item(pamh, PAM_RUSER, pd->ruser);
ret = pam_set_item(pamh, PAM_RUSER, pd->ruser);
if (ret != PAM_SUCCESS) {
DEBUG(1, ("Setting PAM_RUSER failed: %s.\n", pam_strerror(pamh, ret)));
}
pam_set_item(pamh, PAM_RHOST, pd->rhost);
ret = pam_set_item(pamh, PAM_RHOST, pd->rhost);
if (ret != PAM_SUCCESS) {
DEBUG(1, ("Setting PAM_RHOST failed: %s.\n", pam_strerror(pamh, ret)));
}
Expand Down

0 comments on commit f542305

Please sign in to comment.