LCOV - code coverage report
Current view: top level - basic - audit-util.h (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 2 2 100.0 %
Date: 2019-08-23 13:36:53 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 3 4 75.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : #pragma once
       3                 :            : 
       4                 :            : #include <stdbool.h>
       5                 :            : #include <stdint.h>
       6                 :            : #include <sys/types.h>
       7                 :            : 
       8                 :            : #define AUDIT_SESSION_INVALID ((uint32_t) -1)
       9                 :            : 
      10                 :            : int audit_session_from_pid(pid_t pid, uint32_t *id);
      11                 :            : int audit_loginuid_from_pid(pid_t pid, uid_t *uid);
      12                 :            : 
      13                 :            : bool use_audit(void);
      14                 :            : 
      15                 :         16 : static inline bool audit_session_is_valid(uint32_t id) {
      16   [ +  -  +  + ]:         16 :         return id > 0 && id != AUDIT_SESSION_INVALID;
      17                 :            : }

Generated by: LCOV version 1.14