Changeset 927 in openpam


Ignore:
Timestamp:
Apr 26, 2017, 7:15:30 PM (20 months ago)
Author:
Dag-Erling Smørgrav
Message:

Use the correct error code in some of the places where we have long used
the wrong one.

Location:
trunk/lib/libpam
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libpam/openpam_dispatch.c

    r913 r927  
    108108                        openpam_log(PAM_LOG_ERROR, "%s: no %s()",
    109109                            chain->module->path, pam_sm_func_name[primitive]);
    110                         r = PAM_SYSTEM_ERR;
     110                        r = PAM_SYMBOL_ERR;
    111111                } else {
    112112                        pamh->primitive = primitive;
  • trunk/lib/libpam/pam_end.c

    r913 r927  
    6161
    6262        ENTER();
     63        if (pamh == NULL)
     64                RETURNC(PAM_BAD_HANDLE);
    6365
    6466        /* clear module data */
     
    9092}
    9193
     94/*
     95 * Error codes:
     96 *
     97 *      PAM_BAD_HANDLE
     98 */
     99
    92100/**
    93101 * The =pam_end function terminates a PAM transaction and destroys the
  • trunk/lib/libpam/pam_get_item.c

    r913 r927  
    7777                RETURNC(PAM_SUCCESS);
    7878        default:
    79                 RETURNC(PAM_SYMBOL_ERR);
     79                RETURNC(PAM_BAD_ITEM);
    8080        }
    8181}
     
    8484 * Error codes:
    8585 *
    86  *      PAM_SYMBOL_ERR
     86 *      PAM_BAD_ITEM
    8787 */
    8888
  • trunk/lib/libpam/pam_set_item.c

    r918 r927  
    7171                /* set once only, by pam_start() */
    7272                if (*slot != NULL && item != NULL)
    73                         RETURNC(PAM_SYSTEM_ERR);
     73                        RETURNC(PAM_BAD_ITEM);
    7474                /* fall through */
    7575        case PAM_USER:
     
    9595                break;
    9696        default:
    97                 RETURNC(PAM_SYMBOL_ERR);
     97                RETURNC(PAM_BAD_ITEM);
    9898        }
    9999        if (*slot != NULL) {
     
    114114 * Error codes:
    115115 *
    116  *      PAM_SYMBOL_ERR
    117  *      PAM_SYSTEM_ERR
     116 *      PAM_BAD_ITEM
    118117 *      PAM_BUF_ERR
    119118 */
Note: See TracChangeset for help on using the changeset viewer.