Changeset 161 in openpam for trunk


Ignore:
Timestamp:
Jun 30, 2002, 10:41:59 PM (17 years ago)
Author:
Dag-Erling Smørgrav
Message:

Implement the "binding" control flag (from Solaris 9)

Sponsored by: DARPA, NAI Labs

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/security/pam_constants.h

    r157 r161  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/include/security/pam_constants.h#15 $
     34 * $P4: //depot/projects/openpam/include/security/pam_constants.h#16 $
    3535 */
    3636
  • trunk/lib/openpam_configure.c

    r157 r161  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_configure.c#4 $
     34 * $P4: //depot/projects/openpam/lib/openpam_configure.c#5 $
    3535 */
    3636
     
    151151                } else if (strcmp(p, "optional") == 0) {
    152152                        flag = PAM_OPTIONAL;
     153                } else if (strcmp(p, "binding") == 0) {
     154                        flag = PAM_BINDING;
    153155                } else {
    154156                        openpam_log(PAM_LOG_ERROR,
  • trunk/lib/openpam_dispatch.c

    r158 r161  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_dispatch.c#16 $
     34 * $P4: //depot/projects/openpam/lib/openpam_dispatch.c#17 $
    3535 */
    3636
     
    110110                if (r == PAM_IGNORE)
    111111                        continue;
    112                 if (r == PAM_SUCCESS || r == PAM_NEW_AUTHTOK_REQD) {
     112                if (r == PAM_SUCCESS) {
    113113                        /*
    114114                         * For pam_setcred() and pam_chauthtok() with the
     
    116116                         * "optional".
    117117                         */
    118                         if (chain->flag == PAM_SUFFICIENT && !fail &&
     118                        if ((chain->flag == PAM_SUFFICIENT ||
     119                            chain->flag == PAM_BINDING) && !fail &&
    119120                            primitive != PAM_SM_SETCRED &&
    120121                            !(primitive == PAM_SM_CHAUTHTOK &&
     
    133134                if (err == 0)
    134135                        err = r;
    135                 if (chain->flag == PAM_REQUIRED && !fail) {
     136                if ((chain->flag == PAM_REQUIRED ||
     137                    chain->flag == PAM_BINDING) && !fail) {
    136138                        openpam_log(PAM_LOG_DEBUG, "required module failed");
    137139                        fail = 1;
  • trunk/lib/openpam_impl.h

    r157 r161  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_impl.h#15 $
     34 * $P4: //depot/projects/openpam/lib/openpam_impl.h#16 $
    3535 */
    3636
     
    4949#define PAM_SUFFICIENT          3
    5050#define PAM_OPTIONAL            4
    51 #define PAM_NUM_CONTROLFLAGS    5
     51#define PAM_BINDING             5
     52#define PAM_NUM_CONTROLFLAGS    6
    5253
    5354/*
Note: See TracChangeset for help on using the changeset viewer.