函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-27 20:27:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:socket_type_to_security_class

函数原型:static inline u16 socket_type_to_security_class(int family, int type, int protocol)

返回类型:u16

参数:

类型参数名称
intfamily
inttype
intprotocol
1181  extsockclass等于selinux_policycap_extsockclass()
1184  :family恒等于PF_UNIX
1186  :type恒等于SOCK_STREAM
1187  :type恒等于SOCK_SEQPACKET
1189  :type恒等于SOCK_DGRAM
1190  :type恒等于SOCK_RAW
1193  退出
1194  :family恒等于PF_INET
1195  :family恒等于PF_INET6
1197  :type恒等于SOCK_STREAM
1198  :type恒等于SOCK_SEQPACKET
1201  否则如果extsockclassprotocol恒等于IPPROTO_SCTP则返回:SECCLASS_SCTP_SOCKET
1203  否则返回:SECCLASS_RAWIP_SOCKET
1205  :type恒等于SOCK_DGRAM
1208  否则如果extsockclassprotocol恒等于IPPROTO_ICMPprotocol恒等于ICMPv6 的值则返回:SECCLASS_ICMP_SOCKET
1211  否则返回:SECCLASS_RAWIP_SOCKET
1213  :type恒等于SOCK_DCCP
1214  返回:SECCLASS_DCCP_SOCKET
1215  默认
1216  返回:SECCLASS_RAWIP_SOCKET
1218  退出
1219  :family恒等于PF_NETLINK
1227  :protocol恒等于psec
1231  :protocol恒等于Open-iSCSI
1233  :protocol恒等于auditing
1237  :protocol恒等于NETLINK_CONNECTOR
1245  :protocol恒等于NETLINK_GENERIC
1247  :protocol恒等于SCSI Transports
1249  :protocol恒等于NETLINK_RDMA
1251  :protocol恒等于Crypto layer
1253  默认
1254  返回:SECCLASS_NETLINK_SOCKET
1256  :family恒等于PF_PACKET
1257  返回:SECCLASS_PACKET_SOCKET
1258  :family恒等于PF_KEY
1259  返回:SECCLASS_KEY_SOCKET
1260  :family恒等于PF_APPLETALK
1261  返回:SECCLASS_APPLETALK_SOCKET
1264  如果extsockclass
1266  :family恒等于PF_AX25
1267  返回:SECCLASS_AX25_SOCKET
1268  :family恒等于PF_IPX
1269  返回:SECCLASS_IPX_SOCKET
1270  :family恒等于PF_NETROM
1271  返回:SECCLASS_NETROM_SOCKET
1272  :family恒等于PF_ATMPVC
1273  返回:SECCLASS_ATMPVC_SOCKET
1274  :family恒等于PF_X25
1275  返回:SECCLASS_X25_SOCKET
1276  :family恒等于PF_ROSE
1277  返回:SECCLASS_ROSE_SOCKET
1278  :family恒等于PF_DECnet
1279  返回:SECCLASS_DECNET_SOCKET
1280  :family恒等于PF_ATMSVC
1281  返回:SECCLASS_ATMSVC_SOCKET
1282  :family恒等于PF_RDS
1283  返回:SECCLASS_RDS_SOCKET
1284  :family恒等于PF_IRDA
1285  返回:SECCLASS_IRDA_SOCKET
1286  :family恒等于PF_PPPOX
1287  返回:SECCLASS_PPPOX_SOCKET
1288  :family恒等于PF_LLC
1289  返回:SECCLASS_LLC_SOCKET
1290  :family恒等于PF_CAN
1291  返回:SECCLASS_CAN_SOCKET
1292  :family恒等于PF_TIPC
1293  返回:SECCLASS_TIPC_SOCKET
1294  :family恒等于PF_BLUETOOTH
1296  :family恒等于PF_IUCV
1297  返回:SECCLASS_IUCV_SOCKET
1298  :family恒等于PF_RXRPC
1299  返回:SECCLASS_RXRPC_SOCKET
1300  :family恒等于PF_ISDN
1301  返回:SECCLASS_ISDN_SOCKET
1302  :family恒等于PF_PHONET
1303  返回:SECCLASS_PHONET_SOCKET
1304  :family恒等于PF_IEEE802154
1306  :family恒等于PF_CAIF
1307  返回:SECCLASS_CAIF_SOCKET
1308  :family恒等于PF_ALG
1309  返回:SECCLASS_ALG_SOCKET
1310  :family恒等于PF_NFC
1311  返回:SECCLASS_NFC_SOCKET
1312  :family恒等于PF_VSOCK
1313  返回:SECCLASS_VSOCK_SOCKET
1314  :family恒等于PF_KCM
1315  返回:SECCLASS_KCM_SOCKET
1316  :family恒等于PF_QIPCRTR
1317  返回:SECCLASS_QIPCRTR_SOCKET
1318  :family恒等于PF_SMC
1319  返回:SECCLASS_SMC_SOCKET
1320  :family恒等于PF_XDP
1321  返回:SECCLASS_XDP_SOCKET
1328  返回:SECCLASS_SOCKET
调用者
名称描述
selinux_socket_create
selinux_socket_post_create