Changeset 137 in openpam for trunk/lib/openpam_load.c


Ignore:
Timestamp:
May 2, 2002, 6:08:02 AM (19 years ago)
Author:
Dag-Erling Smørgrav
Message:

Fall in line with Solaris and Linux-PAM wrt use of the "other" policy:
use it to fill the gaps in incomplete policies as well as to replace
missing ones.

Sponsored by: DARPA, NAI Labs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_load.c

    r94 r137  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_load.c#12 $
     34 * $P4: //depot/projects/openpam/lib/openpam_load.c#13 $
    3535 */
    3636
     
    157157
    158158int
    159 openpam_add_module(pam_handle_t *pamh,
     159openpam_add_module(pam_chain_t *policy[],
    160160        int chain,
    161161        int flag,
     
    179179                return (PAM_OPEN_ERR);
    180180        }
    181         if ((iterator = pamh->chains[chain]) != NULL) {
     181        if ((iterator = policy[chain]) != NULL) {
    182182                while (iterator->next != NULL)
    183183                        iterator = iterator->next;
    184184                iterator->next = new;
    185185        } else {
    186                 pamh->chains[chain] = new;
     186                policy[chain] = new;
    187187        }
    188188        return (PAM_SUCCESS);
     
    200200
    201201void
    202 openpam_clear_chains(pam_handle_t *pamh)
     202openpam_clear_chains(pam_chain_t *policy[])
    203203{
    204204        int i;
    205205
    206206        for (i = 0; i < PAM_NUM_CHAINS; ++i)
    207                 openpam_destroy_chain(pamh->chains[i]);
     207                openpam_destroy_chain(policy[i]);
    208208}
    209209
Note: See TracChangeset for help on using the changeset viewer.