LCOV - code coverage report
Current view: top level - usr/include/security - pam_appl.h (source / functions) Hit Total Coverage
Test: coverage report for v4-17-test 1498b464 Lines: 6 11 54.5 %
Date: 2024-06-13 04:01:37 Functions: 4 8 50.0 %

          Line data    Source code
       1             : /*
       2             :  * <security/pam_appl.h>
       3             :  *
       4             :  * This header file collects definitions for the PAM API --- that is,
       5             :  * public interface between the PAM library and an application program
       6             :  * that wishes to use it.
       7             :  *
       8             :  * Note, the copyright information is at end of file.
       9             :  */
      10             : 
      11             : #ifndef _SECURITY_PAM_APPL_H
      12             : #define _SECURITY_PAM_APPL_H
      13             : 
      14             : #ifdef __cplusplus
      15             : extern "C" {
      16             : #endif
      17             : 
      18             : #include <security/_pam_types.h>      /* Linux-PAM common defined types */
      19             : 
      20             : /* -------------- The Linux-PAM Framework layer API ------------- */
      21             : 
      22             : extern int PAM_NONNULL((1,3,4))
      23         248 : pam_start(const char *service_name, const char *user,
      24             :           const struct pam_conv *pam_conversation,
      25             :           pam_handle_t **pamh);
      26             : 
      27             : extern int PAM_NONNULL((1))
      28         124 : pam_end(pam_handle_t *pamh, int pam_status);
      29             : 
      30             : /* Authentication API's */
      31             : 
      32             : extern int PAM_NONNULL((1))
      33         242 : pam_authenticate(pam_handle_t *pamh, int flags);
      34             : 
      35             : extern int PAM_NONNULL((1))
      36           0 : pam_setcred(pam_handle_t *pamh, int flags);
      37             : 
      38         118 : /* Account Management API's */
      39             : 
      40             : extern int PAM_NONNULL((1))
      41           0 : pam_acct_mgmt(pam_handle_t *pamh, int flags);
      42             : 
      43             : /* Session Management API's */
      44             : 
      45             : extern int PAM_NONNULL((1))
      46           0 : pam_open_session(pam_handle_t *pamh, int flags);
      47             : 
      48             : extern int PAM_NONNULL((1))
      49           0 : pam_close_session(pam_handle_t *pamh, int flags);
      50             : 
      51           0 : /* Password Management API's */
      52             : 
      53             : extern int PAM_NONNULL((1))
      54           6 : pam_chauthtok(pam_handle_t *pamh, int flags);
      55             : 
      56             : 
      57             : /* take care of any compatibility issues */
      58             : #include <security/_pam_compat.h>
      59           6 : 
      60             : #ifdef __cplusplus
      61             : }
      62             : #endif
      63             : 
      64             : /*
      65             :  * Copyright Theodore Ts'o, 1996.  All rights reserved.
      66             :  *
      67             :  * Redistribution and use in source and binary forms, with or without
      68             :  * modification, are permitted provided that the following conditions
      69             :  * are met:
      70             :  * 1. Redistributions of source code must retain the above copyright
      71             :  *    notice, and the entire permission notice in its entirety,
      72             :  *    including the disclaimer of warranties.
      73             :  * 2. Redistributions in binary form must reproduce the above copyright
      74             :  *    notice, this list of conditions and the following disclaimer in the
      75             :  *    documentation and/or other materials provided with the distribution.
      76             :  * 3. The name of the author may not be used to endorse or promote
      77             :  *    products derived from this software without specific prior
      78             :  *    written permission.
      79             :  *
      80             :  * ALTERNATIVELY, this product may be distributed under the terms of
      81             :  * the GNU Public License, in which case the provisions of the GPL are
      82             :  * required INSTEAD OF the above restrictions.  (This clause is
      83             :  * necessary due to a potential bad interaction between the GPL and
      84             :  * the restrictions contained in a BSD-style copyright.)
      85             :  *
      86             :  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
      87             :  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
      88             :  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
      89             :  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
      90             :  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
      91             :  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      92             :  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      93             :  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
      94             :  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
      95             :  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
      96             :  * OF THE POSSIBILITY OF SUCH DAMAGE.
      97             :  */
      98             : 
      99             : #endif /* _SECURITY_PAM_APPL_H */

Generated by: LCOV version 1.13