LCOV - code coverage report
Current view: top level - home/moyix/DrifuzzRepo/Drifuzz/linux-module-build/security/selinux - flask.h (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 7 0.0 %
Date: 2022-04-01 14:17:54 Functions: 0 1 0.0 %
Branches: 0 2 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* This file is automatically generated.  Do not edit. */
       2                 :            : #ifndef _SELINUX_FLASK_H_
       3                 :            : #define _SELINUX_FLASK_H_
       4                 :            : 
       5                 :            : #define SECCLASS_SECURITY                                 1
       6                 :            : #define SECCLASS_PROCESS                                  2
       7                 :            : #define SECCLASS_PROCESS2                                 3
       8                 :            : #define SECCLASS_SYSTEM                                   4
       9                 :            : #define SECCLASS_CAPABILITY                               5
      10                 :            : #define SECCLASS_FILESYSTEM                               6
      11                 :            : #define SECCLASS_FILE                                     7
      12                 :            : #define SECCLASS_DIR                                      8
      13                 :            : #define SECCLASS_FD                                       9
      14                 :            : #define SECCLASS_LNK_FILE                                10
      15                 :            : #define SECCLASS_CHR_FILE                                11
      16                 :            : #define SECCLASS_BLK_FILE                                12
      17                 :            : #define SECCLASS_SOCK_FILE                               13
      18                 :            : #define SECCLASS_FIFO_FILE                               14
      19                 :            : #define SECCLASS_SOCKET                                  15
      20                 :            : #define SECCLASS_TCP_SOCKET                              16
      21                 :            : #define SECCLASS_UDP_SOCKET                              17
      22                 :            : #define SECCLASS_RAWIP_SOCKET                            18
      23                 :            : #define SECCLASS_NODE                                    19
      24                 :            : #define SECCLASS_NETIF                                   20
      25                 :            : #define SECCLASS_NETLINK_SOCKET                          21
      26                 :            : #define SECCLASS_PACKET_SOCKET                           22
      27                 :            : #define SECCLASS_KEY_SOCKET                              23
      28                 :            : #define SECCLASS_UNIX_STREAM_SOCKET                      24
      29                 :            : #define SECCLASS_UNIX_DGRAM_SOCKET                       25
      30                 :            : #define SECCLASS_SEM                                     26
      31                 :            : #define SECCLASS_MSG                                     27
      32                 :            : #define SECCLASS_MSGQ                                    28
      33                 :            : #define SECCLASS_SHM                                     29
      34                 :            : #define SECCLASS_IPC                                     30
      35                 :            : #define SECCLASS_NETLINK_ROUTE_SOCKET                    31
      36                 :            : #define SECCLASS_NETLINK_TCPDIAG_SOCKET                  32
      37                 :            : #define SECCLASS_NETLINK_NFLOG_SOCKET                    33
      38                 :            : #define SECCLASS_NETLINK_XFRM_SOCKET                     34
      39                 :            : #define SECCLASS_NETLINK_SELINUX_SOCKET                  35
      40                 :            : #define SECCLASS_NETLINK_ISCSI_SOCKET                    36
      41                 :            : #define SECCLASS_NETLINK_AUDIT_SOCKET                    37
      42                 :            : #define SECCLASS_NETLINK_FIB_LOOKUP_SOCKET               38
      43                 :            : #define SECCLASS_NETLINK_CONNECTOR_SOCKET                39
      44                 :            : #define SECCLASS_NETLINK_NETFILTER_SOCKET                40
      45                 :            : #define SECCLASS_NETLINK_DNRT_SOCKET                     41
      46                 :            : #define SECCLASS_ASSOCIATION                             42
      47                 :            : #define SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET           43
      48                 :            : #define SECCLASS_NETLINK_GENERIC_SOCKET                  44
      49                 :            : #define SECCLASS_NETLINK_SCSITRANSPORT_SOCKET            45
      50                 :            : #define SECCLASS_NETLINK_RDMA_SOCKET                     46
      51                 :            : #define SECCLASS_NETLINK_CRYPTO_SOCKET                   47
      52                 :            : #define SECCLASS_APPLETALK_SOCKET                        48
      53                 :            : #define SECCLASS_PACKET                                  49
      54                 :            : #define SECCLASS_KEY                                     50
      55                 :            : #define SECCLASS_DCCP_SOCKET                             51
      56                 :            : #define SECCLASS_MEMPROTECT                              52
      57                 :            : #define SECCLASS_PEER                                    53
      58                 :            : #define SECCLASS_CAPABILITY2                             54
      59                 :            : #define SECCLASS_KERNEL_SERVICE                          55
      60                 :            : #define SECCLASS_TUN_SOCKET                              56
      61                 :            : #define SECCLASS_BINDER                                  57
      62                 :            : #define SECCLASS_CAP_USERNS                              58
      63                 :            : #define SECCLASS_CAP2_USERNS                             59
      64                 :            : #define SECCLASS_SCTP_SOCKET                             60
      65                 :            : #define SECCLASS_ICMP_SOCKET                             61
      66                 :            : #define SECCLASS_AX25_SOCKET                             62
      67                 :            : #define SECCLASS_IPX_SOCKET                              63
      68                 :            : #define SECCLASS_NETROM_SOCKET                           64
      69                 :            : #define SECCLASS_ATMPVC_SOCKET                           65
      70                 :            : #define SECCLASS_X25_SOCKET                              66
      71                 :            : #define SECCLASS_ROSE_SOCKET                             67
      72                 :            : #define SECCLASS_DECNET_SOCKET                           68
      73                 :            : #define SECCLASS_ATMSVC_SOCKET                           69
      74                 :            : #define SECCLASS_RDS_SOCKET                              70
      75                 :            : #define SECCLASS_IRDA_SOCKET                             71
      76                 :            : #define SECCLASS_PPPOX_SOCKET                            72
      77                 :            : #define SECCLASS_LLC_SOCKET                              73
      78                 :            : #define SECCLASS_CAN_SOCKET                              74
      79                 :            : #define SECCLASS_TIPC_SOCKET                             75
      80                 :            : #define SECCLASS_BLUETOOTH_SOCKET                        76
      81                 :            : #define SECCLASS_IUCV_SOCKET                             77
      82                 :            : #define SECCLASS_RXRPC_SOCKET                            78
      83                 :            : #define SECCLASS_ISDN_SOCKET                             79
      84                 :            : #define SECCLASS_PHONET_SOCKET                           80
      85                 :            : #define SECCLASS_IEEE802154_SOCKET                       81
      86                 :            : #define SECCLASS_CAIF_SOCKET                             82
      87                 :            : #define SECCLASS_ALG_SOCKET                              83
      88                 :            : #define SECCLASS_NFC_SOCKET                              84
      89                 :            : #define SECCLASS_VSOCK_SOCKET                            85
      90                 :            : #define SECCLASS_KCM_SOCKET                              86
      91                 :            : #define SECCLASS_QIPCRTR_SOCKET                          87
      92                 :            : #define SECCLASS_SMC_SOCKET                              88
      93                 :            : #define SECCLASS_INFINIBAND_PKEY                         89
      94                 :            : #define SECCLASS_INFINIBAND_ENDPORT                      90
      95                 :            : #define SECCLASS_BPF                                     91
      96                 :            : #define SECCLASS_XDP_SOCKET                              92
      97                 :            : #define SECCLASS_PERF_EVENT                              93
      98                 :            : #define SECCLASS_LOCKDOWN                                94
      99                 :            : 
     100                 :            : #define SECINITSID_KERNEL                                   1
     101                 :            : #define SECINITSID_SECURITY                                 2
     102                 :            : #define SECINITSID_UNLABELED                                3
     103                 :            : #define SECINITSID_FS                                       4
     104                 :            : #define SECINITSID_FILE                                     5
     105                 :            : #define SECINITSID_FILE_LABELS                              6
     106                 :            : #define SECINITSID_INIT                                     7
     107                 :            : #define SECINITSID_ANY_SOCKET                               8
     108                 :            : #define SECINITSID_PORT                                     9
     109                 :            : #define SECINITSID_NETIF                                   10
     110                 :            : #define SECINITSID_NETMSG                                  11
     111                 :            : #define SECINITSID_NODE                                    12
     112                 :            : #define SECINITSID_IGMP_PACKET                             13
     113                 :            : #define SECINITSID_ICMP_SOCKET                             14
     114                 :            : #define SECINITSID_TCP_SOCKET                              15
     115                 :            : #define SECINITSID_SYSCTL_MODPROBE                         16
     116                 :            : #define SECINITSID_SYSCTL                                  17
     117                 :            : #define SECINITSID_SYSCTL_FS                               18
     118                 :            : #define SECINITSID_SYSCTL_KERNEL                           19
     119                 :            : #define SECINITSID_SYSCTL_NET                              20
     120                 :            : #define SECINITSID_SYSCTL_NET_UNIX                         21
     121                 :            : #define SECINITSID_SYSCTL_VM                               22
     122                 :            : #define SECINITSID_SYSCTL_DEV                              23
     123                 :            : #define SECINITSID_KMOD                                    24
     124                 :            : #define SECINITSID_POLICY                                  25
     125                 :            : #define SECINITSID_SCMP_PACKET                             26
     126                 :            : #define SECINITSID_DEVNULL                                 27
     127                 :            : 
     128                 :            : #define SECINITSID_NUM 27
     129                 :            : 
     130                 :          0 : static inline bool security_is_socket_class(u16 kern_tclass)
     131                 :            : {
     132                 :          0 :         bool sock = false;
     133                 :            : 
     134         [ #  # ]:          0 :         switch (kern_tclass) {
     135                 :          0 :         case SECCLASS_SOCKET:
     136                 :            :         case SECCLASS_TCP_SOCKET:
     137                 :            :         case SECCLASS_UDP_SOCKET:
     138                 :            :         case SECCLASS_RAWIP_SOCKET:
     139                 :            :         case SECCLASS_NETLINK_SOCKET:
     140                 :            :         case SECCLASS_PACKET_SOCKET:
     141                 :            :         case SECCLASS_KEY_SOCKET:
     142                 :            :         case SECCLASS_UNIX_STREAM_SOCKET:
     143                 :            :         case SECCLASS_UNIX_DGRAM_SOCKET:
     144                 :            :         case SECCLASS_NETLINK_ROUTE_SOCKET:
     145                 :            :         case SECCLASS_NETLINK_TCPDIAG_SOCKET:
     146                 :            :         case SECCLASS_NETLINK_NFLOG_SOCKET:
     147                 :            :         case SECCLASS_NETLINK_XFRM_SOCKET:
     148                 :            :         case SECCLASS_NETLINK_SELINUX_SOCKET:
     149                 :            :         case SECCLASS_NETLINK_ISCSI_SOCKET:
     150                 :            :         case SECCLASS_NETLINK_AUDIT_SOCKET:
     151                 :            :         case SECCLASS_NETLINK_FIB_LOOKUP_SOCKET:
     152                 :            :         case SECCLASS_NETLINK_CONNECTOR_SOCKET:
     153                 :            :         case SECCLASS_NETLINK_NETFILTER_SOCKET:
     154                 :            :         case SECCLASS_NETLINK_DNRT_SOCKET:
     155                 :            :         case SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET:
     156                 :            :         case SECCLASS_NETLINK_GENERIC_SOCKET:
     157                 :            :         case SECCLASS_NETLINK_SCSITRANSPORT_SOCKET:
     158                 :            :         case SECCLASS_NETLINK_RDMA_SOCKET:
     159                 :            :         case SECCLASS_NETLINK_CRYPTO_SOCKET:
     160                 :            :         case SECCLASS_APPLETALK_SOCKET:
     161                 :            :         case SECCLASS_DCCP_SOCKET:
     162                 :            :         case SECCLASS_TUN_SOCKET:
     163                 :            :         case SECCLASS_SCTP_SOCKET:
     164                 :            :         case SECCLASS_ICMP_SOCKET:
     165                 :            :         case SECCLASS_AX25_SOCKET:
     166                 :            :         case SECCLASS_IPX_SOCKET:
     167                 :            :         case SECCLASS_NETROM_SOCKET:
     168                 :            :         case SECCLASS_ATMPVC_SOCKET:
     169                 :            :         case SECCLASS_X25_SOCKET:
     170                 :            :         case SECCLASS_ROSE_SOCKET:
     171                 :            :         case SECCLASS_DECNET_SOCKET:
     172                 :            :         case SECCLASS_ATMSVC_SOCKET:
     173                 :            :         case SECCLASS_RDS_SOCKET:
     174                 :            :         case SECCLASS_IRDA_SOCKET:
     175                 :            :         case SECCLASS_PPPOX_SOCKET:
     176                 :            :         case SECCLASS_LLC_SOCKET:
     177                 :            :         case SECCLASS_CAN_SOCKET:
     178                 :            :         case SECCLASS_TIPC_SOCKET:
     179                 :            :         case SECCLASS_BLUETOOTH_SOCKET:
     180                 :            :         case SECCLASS_IUCV_SOCKET:
     181                 :            :         case SECCLASS_RXRPC_SOCKET:
     182                 :            :         case SECCLASS_ISDN_SOCKET:
     183                 :            :         case SECCLASS_PHONET_SOCKET:
     184                 :            :         case SECCLASS_IEEE802154_SOCKET:
     185                 :            :         case SECCLASS_CAIF_SOCKET:
     186                 :            :         case SECCLASS_ALG_SOCKET:
     187                 :            :         case SECCLASS_NFC_SOCKET:
     188                 :            :         case SECCLASS_VSOCK_SOCKET:
     189                 :            :         case SECCLASS_KCM_SOCKET:
     190                 :            :         case SECCLASS_QIPCRTR_SOCKET:
     191                 :            :         case SECCLASS_SMC_SOCKET:
     192                 :            :         case SECCLASS_XDP_SOCKET:
     193                 :          0 :                 sock = true;
     194                 :          0 :                 break;
     195                 :            :         default:
     196                 :            :                 break;
     197                 :            :         }
     198                 :            : 
     199                 :          0 :         return sock;
     200                 :            : }
     201                 :            : 
     202                 :            : #endif

Generated by: LCOV version 1.14