Changeset 106 in openpam for trunk


Ignore:
Timestamp:
Apr 8, 2002, 1:42:13 PM (18 years ago)
Author:
Dag-Erling Smørgrav
Message:

Add openpam_{borrow,restore}_cred() (for temporarily switching to
user credentials) and openpam_free_data() (generic cleanup function
for pam_set_data() consumers)

Sponsored by: DARPA, NAI Labs

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/man/Makefile

    r93 r106  
    3232# SUCH DAMAGE.
    3333#
    34 # $P4: //depot/projects/openpam/doc/man/Makefile#5 $
     34# $P4: //depot/projects/openpam/doc/man/Makefile#6 $
    3535#
    3636
    3737MAN              =
     38MAN             += openpam_borrow_cred.3
     39MAN             += openpam_free_data.3
    3840MAN             += openpam_get_option.3
    3941MAN             += openpam_log.3
     42MAN             += openpam_restore_cred.3
    4043MAN             += openpam_set_option.3
    4144MAN             += openpam_ttyconv.3
  • trunk/include/security/openpam.h

    r104 r106  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/include/security/openpam.h#14 $
     34 * $P4: //depot/projects/openpam/include/security/openpam.h#15 $
    3535 */
    3636
     
    4747#endif
    4848
     49struct passwd;
     50
    4951/*
    5052 * API extensions
    5153 */
     54int
     55openpam_borrow_cred(pam_handle_t *_pamh,
     56        const struct passwd *_pwd);
     57
     58void
     59openpam_free_data(pam_handle_t *_pamh,
     60        void *_data,
     61        int _status);
     62
    5263const char *
    5364openpam_get_option(pam_handle_t *_pamh,
    5465        const char *_option);
     66
     67int
     68openpam_restore_cred(pam_handle_t *_pamh);
    5569
    5670int
  • trunk/lib/Makefile

    r93 r106  
    3232# SUCH DAMAGE.
    3333#
    34 # $P4: //depot/projects/openpam/lib/Makefile#12 $
     34# $P4: //depot/projects/openpam/lib/Makefile#13 $
    3535#
    3636
     
    4545
    4646SRCS             =
     47SRCS            += openpam_borrow_cred.c
    4748SRCS            += openpam_dispatch.c
    4849SRCS            += openpam_dynamic.c
    4950SRCS            += openpam_findenv.c
     51SRCS            += openpam_free_data.c
    5052SRCS            += openpam_get_option.c
    5153SRCS            += openpam_load.c
    5254SRCS            += openpam_log.c
     55SRCS            += openpam_restore_cred.c
    5356SRCS            += openpam_set_option.c
    5457SRCS            += openpam_static.c
  • trunk/lib/openpam_impl.h

    r93 r106  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_impl.h#11 $
     34 * $P4: //depot/projects/openpam/lib/openpam_impl.h#12 $
    3535 */
    3636
     
    9494};
    9595
     96#ifdef NGROUPS_MAX
     97#define PAM_SAVED_CRED "pam_saved_cred"
     98struct pam_saved_cred {
     99        uid_t    euid;
     100        gid_t    egid;
     101        gid_t    groups[NGROUPS_MAX];
     102        int      ngroups;
     103};
     104#endif
     105
    96106#define PAM_OTHER       "other"
    97107
Note: See TracChangeset for help on using the changeset viewer.