1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
/* automatically generated by rust-bindgen 0.69.4 */

pub const SELINUX_AVD_FLAGS_PERMISSIVE: i32 = 1;
pub const SELINUX_CB_LOG: i32 = 0;
pub const SELINUX_CB_AUDIT: i32 = 1;
pub const SELINUX_CB_VALIDATE: i32 = 2;
pub const SELINUX_CB_SETENFORCE: i32 = 3;
pub const SELINUX_CB_POLICYLOAD: i32 = 4;
pub const SELINUX_ERROR: i32 = 0;
pub const SELINUX_WARNING: i32 = 1;
pub const SELINUX_INFO: i32 = 2;
pub const SELINUX_AVC: i32 = 3;
pub const SELINUX_POLICYLOAD: i32 = 4;
pub const SELINUX_SETENFORCE: i32 = 5;
pub const SELINUX_TRANS_DIR: &[u8; 17] = b"/var/run/setrans\0";
pub const MATCHPATHCON_BASEONLY: i32 = 1;
pub const MATCHPATHCON_NOTRANS: i32 = 2;
pub const MATCHPATHCON_VALIDATE: i32 = 4;
pub const AVC_OPT_UNUSED: i32 = 0;
pub const AVC_OPT_SETENFORCE: i32 = 1;
pub const AVC_CALLBACK_GRANT: i32 = 1;
pub const AVC_CALLBACK_TRY_REVOKE: i32 = 2;
pub const AVC_CALLBACK_REVOKE: i32 = 4;
pub const AVC_CALLBACK_RESET: i32 = 8;
pub const AVC_CALLBACK_AUDITALLOW_ENABLE: i32 = 16;
pub const AVC_CALLBACK_AUDITALLOW_DISABLE: i32 = 32;
pub const AVC_CALLBACK_AUDITDENY_ENABLE: i32 = 64;
pub const AVC_CALLBACK_AUDITDENY_DISABLE: i32 = 128;
pub const AVC_CACHE_STATS: i32 = 1;
pub const SELABEL_CTX_FILE: i32 = 0;
pub const SELABEL_CTX_MEDIA: i32 = 1;
pub const SELABEL_CTX_X: i32 = 2;
pub const SELABEL_CTX_DB: i32 = 3;
pub const SELABEL_CTX_ANDROID_PROP: i32 = 4;
pub const SELABEL_CTX_ANDROID_SERVICE: i32 = 5;
pub const SELABEL_OPT_UNUSED: i32 = 0;
pub const SELABEL_OPT_VALIDATE: i32 = 1;
pub const SELABEL_OPT_BASEONLY: i32 = 2;
pub const SELABEL_OPT_PATH: i32 = 3;
pub const SELABEL_OPT_SUBSET: i32 = 4;
pub const SELABEL_OPT_DIGEST: i32 = 5;
pub const SELABEL_NOPT: i32 = 6;
pub const SELABEL_X_PROP: i32 = 1;
pub const SELABEL_X_EXT: i32 = 2;
pub const SELABEL_X_CLIENT: i32 = 3;
pub const SELABEL_X_EVENT: i32 = 4;
pub const SELABEL_X_SELN: i32 = 5;
pub const SELABEL_X_POLYPROP: i32 = 6;
pub const SELABEL_X_POLYSELN: i32 = 7;
pub const SELABEL_DB_DATABASE: i32 = 1;
pub const SELABEL_DB_SCHEMA: i32 = 2;
pub const SELABEL_DB_TABLE: i32 = 3;
pub const SELABEL_DB_COLUMN: i32 = 4;
pub const SELABEL_DB_SEQUENCE: i32 = 5;
pub const SELABEL_DB_VIEW: i32 = 6;
pub const SELABEL_DB_PROCEDURE: i32 = 7;
pub const SELABEL_DB_BLOB: i32 = 8;
pub const SELABEL_DB_TUPLE: i32 = 9;
pub const SELABEL_DB_LANGUAGE: i32 = 10;
pub const SELABEL_DB_EXCEPTION: i32 = 11;
pub const SELABEL_DB_DATATYPE: i32 = 12;
pub const SELINUX_RESTORECON_IGNORE_DIGEST: i32 = 1;
pub const SELINUX_RESTORECON_NOCHANGE: i32 = 2;
pub const SELINUX_RESTORECON_SET_SPECFILE_CTX: i32 = 4;
pub const SELINUX_RESTORECON_RECURSE: i32 = 8;
pub const SELINUX_RESTORECON_VERBOSE: i32 = 16;
pub const SELINUX_RESTORECON_PROGRESS: i32 = 32;
pub const SELINUX_RESTORECON_REALPATH: i32 = 64;
pub const SELINUX_RESTORECON_XDEV: i32 = 128;
pub const SELINUX_RESTORECON_ADD_ASSOC: i32 = 256;
pub const SELINUX_RESTORECON_ABORT_ON_ERROR: i32 = 512;
pub const SELINUX_RESTORECON_SYSLOG_CHANGES: i32 = 1024;
pub const SELINUX_RESTORECON_LOG_MATCHES: i32 = 2048;
pub const SELINUX_RESTORECON_IGNORE_NOENTRY: i32 = 4096;
pub const SELINUX_RESTORECON_IGNORE_MOUNTS: i32 = 8192;
pub const SELINUX_RESTORECON_MASS_RELABEL: i32 = 16384;
pub const SELINUX_RESTORECON_SKIP_DIGEST: i32 = 32768;
pub const SELINUX_RESTORECON_CONFLICT_ERROR: i32 = 65536;
pub const SELINUX_RESTORECON_XATTR_RECURSE: i32 = 1;
pub const SELINUX_RESTORECON_XATTR_DELETE_NONMATCH_DIGESTS: i32 = 2;
pub const SELINUX_RESTORECON_XATTR_DELETE_ALL_DIGESTS: i32 = 4;
pub const SELINUX_RESTORECON_XATTR_IGNORE_MOUNTS: i32 = 8;
pub const SELINUX_DEFAULTUSER: &[u8; 7] = b"user_u\0";
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __pid_t = ::std::os::raw::c_int;
pub type ino_t = __ino_t;
pub type mode_t = __mode_t;
pub type pid_t = __pid_t;
extern "C" {
    pub fn is_selinux_enabled() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn is_selinux_mls_enabled() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn freecon(con: *mut ::std::os::raw::c_char);
}
extern "C" {
    pub fn freeconary(con: *mut *mut ::std::os::raw::c_char);
}
extern "C" {
    pub fn getcon(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getcon_raw(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setcon(con: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setcon_raw(con: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getpidcon(pid: pid_t, con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getpidcon_raw(
        pid: pid_t,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getprevcon(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getprevcon_raw(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getexeccon(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getexeccon_raw(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setexeccon(con: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setexeccon_raw(con: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getfscreatecon(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getfscreatecon_raw(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setfscreatecon(context: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setfscreatecon_raw(context: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getkeycreatecon(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getkeycreatecon_raw(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setkeycreatecon(context: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setkeycreatecon_raw(context: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getsockcreatecon(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getsockcreatecon_raw(con: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setsockcreatecon(context: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setsockcreatecon_raw(context: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getfilecon(
        path: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getfilecon_raw(
        path: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lgetfilecon(
        path: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lgetfilecon_raw(
        path: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fgetfilecon(
        fd: ::std::os::raw::c_int,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fgetfilecon_raw(
        fd: ::std::os::raw::c_int,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setfilecon(
        path: *const ::std::os::raw::c_char,
        con: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn setfilecon_raw(
        path: *const ::std::os::raw::c_char,
        con: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lsetfilecon(
        path: *const ::std::os::raw::c_char,
        con: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn lsetfilecon_raw(
        path: *const ::std::os::raw::c_char,
        con: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fsetfilecon(
        fd: ::std::os::raw::c_int,
        con: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn fsetfilecon_raw(
        fd: ::std::os::raw::c_int,
        con: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getpeercon(
        fd: ::std::os::raw::c_int,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getpeercon_raw(
        fd: ::std::os::raw::c_int,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
pub type access_vector_t = ::std::os::raw::c_uint;
pub type security_class_t = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct av_decision {
    pub allowed: access_vector_t,
    pub decided: access_vector_t,
    pub auditallow: access_vector_t,
    pub auditdeny: access_vector_t,
    pub seqno: ::std::os::raw::c_uint,
    pub flags: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_av_decision() {
    const UNINIT: ::std::mem::MaybeUninit<av_decision> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<av_decision>(),
        24usize,
        concat!("Size of: ", stringify!(av_decision))
    );
    assert_eq!(
        ::std::mem::align_of::<av_decision>(),
        4usize,
        concat!("Alignment of ", stringify!(av_decision))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).allowed) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(av_decision),
            "::",
            stringify!(allowed)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).decided) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(av_decision),
            "::",
            stringify!(decided)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).auditallow) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(av_decision),
            "::",
            stringify!(auditallow)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).auditdeny) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(av_decision),
            "::",
            stringify!(auditdeny)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).seqno) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(av_decision),
            "::",
            stringify!(seqno)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(av_decision),
            "::",
            stringify!(flags)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct selinux_opt {
    pub type_: ::std::os::raw::c_int,
    pub value: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_selinux_opt() {
    const UNINIT: ::std::mem::MaybeUninit<selinux_opt> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<selinux_opt>(),
        16usize,
        concat!("Size of: ", stringify!(selinux_opt))
    );
    assert_eq!(
        ::std::mem::align_of::<selinux_opt>(),
        8usize,
        concat!("Alignment of ", stringify!(selinux_opt))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_opt),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_opt),
            "::",
            stringify!(value)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union selinux_callback {
    pub func_log: ::std::option::Option<
        unsafe extern "C" fn(
            type_: ::std::os::raw::c_int,
            fmt: *const ::std::os::raw::c_char,
            ...
        ) -> ::std::os::raw::c_int,
    >,
    pub func_audit: ::std::option::Option<
        unsafe extern "C" fn(
            auditdata: *mut ::std::os::raw::c_void,
            cls: security_class_t,
            msgbuf: *mut ::std::os::raw::c_char,
            msgbufsize: usize,
        ) -> ::std::os::raw::c_int,
    >,
    pub func_validate: ::std::option::Option<
        unsafe extern "C" fn(ctx: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int,
    >,
    pub func_setenforce: ::std::option::Option<
        unsafe extern "C" fn(enforcing: ::std::os::raw::c_int) -> ::std::os::raw::c_int,
    >,
    pub func_policyload: ::std::option::Option<
        unsafe extern "C" fn(seqno: ::std::os::raw::c_int) -> ::std::os::raw::c_int,
    >,
}
#[test]
fn bindgen_test_layout_selinux_callback() {
    const UNINIT: ::std::mem::MaybeUninit<selinux_callback> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<selinux_callback>(),
        8usize,
        concat!("Size of: ", stringify!(selinux_callback))
    );
    assert_eq!(
        ::std::mem::align_of::<selinux_callback>(),
        8usize,
        concat!("Alignment of ", stringify!(selinux_callback))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_log) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_callback),
            "::",
            stringify!(func_log)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_audit) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_callback),
            "::",
            stringify!(func_audit)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_validate) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_callback),
            "::",
            stringify!(func_validate)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_setenforce) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_callback),
            "::",
            stringify!(func_setenforce)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_policyload) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(selinux_callback),
            "::",
            stringify!(func_policyload)
        )
    );
}
impl ::std::fmt::Debug for selinux_callback {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        write!(f, "selinux_callback {{ union }}")
    }
}
extern "C" {
    pub fn selinux_get_callback(type_: ::std::os::raw::c_int) -> selinux_callback;
}
extern "C" {
    pub fn selinux_set_callback(type_: ::std::os::raw::c_int, cb: selinux_callback);
}
extern "C" {
    pub fn security_compute_av(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        requested: access_vector_t,
        avd: *mut av_decision,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_av_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        requested: access_vector_t,
        avd: *mut av_decision,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_av_flags(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        requested: access_vector_t,
        avd: *mut av_decision,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_av_flags_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        requested: access_vector_t,
        avd: *mut av_decision,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_create(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_create_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_create_name(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        objname: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_create_name_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        objname: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_relabel(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_relabel_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_member(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_compute_member_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_validatetrans(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_validatetrans_raw(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: security_class_t,
        newcon: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_load_policy(
        data: *mut ::std::os::raw::c_void,
        len: usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_get_initial_context(
        name: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_get_initial_context_raw(
        name: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_mkload_policy(preservebools: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_init_load_policy(enforce: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct SELboolean {
    pub name: *mut ::std::os::raw::c_char,
    pub value: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_SELboolean() {
    const UNINIT: ::std::mem::MaybeUninit<SELboolean> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<SELboolean>(),
        16usize,
        concat!("Size of: ", stringify!(SELboolean))
    );
    assert_eq!(
        ::std::mem::align_of::<SELboolean>(),
        8usize,
        concat!("Alignment of ", stringify!(SELboolean))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(SELboolean),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(SELboolean),
            "::",
            stringify!(value)
        )
    );
}
extern "C" {
    pub fn security_set_boolean_list(
        boolcnt: usize,
        boollist: *mut SELboolean,
        permanent: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_check_context(con: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_check_context_raw(con: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_canonicalize_context(
        con: *const ::std::os::raw::c_char,
        canoncon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_canonicalize_context_raw(
        con: *const ::std::os::raw::c_char,
        canoncon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_getenforce() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_setenforce(value: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_reject_unknown() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_deny_unknown() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_get_checkreqprot() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_disable() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_policyvers() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_get_boolean_names(
        names: *mut *mut *mut ::std::os::raw::c_char,
        len: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_get_boolean_pending(
        name: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_get_boolean_active(
        name: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_set_boolean(
        name: *const ::std::os::raw::c_char,
        value: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn security_commit_booleans() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct security_class_mapping {
    pub name: *const ::std::os::raw::c_char,
    pub perms: [*const ::std::os::raw::c_char; 33usize],
}
#[test]
fn bindgen_test_layout_security_class_mapping() {
    const UNINIT: ::std::mem::MaybeUninit<security_class_mapping> =
        ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<security_class_mapping>(),
        272usize,
        concat!("Size of: ", stringify!(security_class_mapping))
    );
    assert_eq!(
        ::std::mem::align_of::<security_class_mapping>(),
        8usize,
        concat!("Alignment of ", stringify!(security_class_mapping))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(security_class_mapping),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).perms) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(security_class_mapping),
            "::",
            stringify!(perms)
        )
    );
}
extern "C" {
    pub fn selinux_set_mapping(map: *mut security_class_mapping) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn mode_to_security_class(mode: mode_t) -> security_class_t;
}
extern "C" {
    pub fn string_to_security_class(name: *const ::std::os::raw::c_char) -> security_class_t;
}
extern "C" {
    pub fn security_class_to_string(cls: security_class_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn security_av_perm_to_string(
        tclass: security_class_t,
        perm: access_vector_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn string_to_av_perm(
        tclass: security_class_t,
        name: *const ::std::os::raw::c_char,
    ) -> access_vector_t;
}
extern "C" {
    pub fn security_av_string(
        tclass: security_class_t,
        av: access_vector_t,
        result: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn print_access_vector(tclass: security_class_t, av: access_vector_t);
}
extern "C" {
    pub fn selinux_flush_class_cache();
}
extern "C" {
    pub fn set_matchpathcon_printf(
        f: ::std::option::Option<unsafe extern "C" fn(fmt: *const ::std::os::raw::c_char, ...)>,
    );
}
extern "C" {
    pub fn set_matchpathcon_invalidcon(
        f: ::std::option::Option<
            unsafe extern "C" fn(
                path: *const ::std::os::raw::c_char,
                lineno: ::std::os::raw::c_uint,
                context: *mut ::std::os::raw::c_char,
            ) -> ::std::os::raw::c_int,
        >,
    );
}
extern "C" {
    pub fn set_matchpathcon_canoncon(
        f: ::std::option::Option<
            unsafe extern "C" fn(
                path: *const ::std::os::raw::c_char,
                lineno: ::std::os::raw::c_uint,
                context: *mut *mut ::std::os::raw::c_char,
            ) -> ::std::os::raw::c_int,
        >,
    );
}
extern "C" {
    pub fn set_matchpathcon_flags(flags: ::std::os::raw::c_uint);
}
extern "C" {
    pub fn matchpathcon_filespec_add(
        ino: ino_t,
        specind: ::std::os::raw::c_int,
        file: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn matchpathcon_filespec_destroy();
}
extern "C" {
    pub fn matchpathcon_filespec_eval();
}
extern "C" {
    pub fn matchpathcon_checkmatches(str_: *mut ::std::os::raw::c_char);
}
extern "C" {
    pub fn matchmediacon(
        media: *const ::std::os::raw::c_char,
        con: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_getenforcemode(enforce: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_boolean_sub(
        boolean_name: *const ::std::os::raw::c_char,
    ) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_getpolicytype(
        policytype: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_policy_root() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_set_policy_root(
        rootpath: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_current_policy_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_binary_policy_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_failsafe_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_removable_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_default_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_user_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_file_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_file_context_homedir_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_file_context_local_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_file_context_subs_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_file_context_subs_dist_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_homedir_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_media_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_virtual_domain_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_virtual_image_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_lxc_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_x_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_sepgsql_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_openrc_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_openssh_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_snapperd_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_systemd_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_contexts_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_securetty_types_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_booleans_subs_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_customizable_types_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_usersconf_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_translations_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_colors_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_netfilter_context_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn selinux_check_access(
        scon: *const ::std::os::raw::c_char,
        tcon: *const ::std::os::raw::c_char,
        tclass: *const ::std::os::raw::c_char,
        perm: *const ::std::os::raw::c_char,
        auditdata: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_check_securetty_context(
        tty_context: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn set_selinuxmnt(mnt: *const ::std::os::raw::c_char);
}
extern "C" {
    pub fn fini_selinuxmnt();
}
extern "C" {
    pub fn is_context_customizable(
        scontext: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_trans_to_raw_context(
        trans: *const ::std::os::raw::c_char,
        rawp: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_raw_to_trans_context(
        raw: *const ::std::os::raw::c_char,
        transp: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_raw_context_to_color(
        raw: *const ::std::os::raw::c_char,
        color_str: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getseuserbyname(
        linuxuser: *const ::std::os::raw::c_char,
        seuser: *mut *mut ::std::os::raw::c_char,
        level: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn getseuser(
        username: *const ::std::os::raw::c_char,
        service: *const ::std::os::raw::c_char,
        r_seuser: *mut *mut ::std::os::raw::c_char,
        r_level: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_file_context_cmp(
        a: *const ::std::os::raw::c_char,
        b: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_file_context_verify(
        path: *const ::std::os::raw::c_char,
        mode: mode_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_lsetfilecon_default(
        path: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_reset_config();
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct context_s_t {
    pub ptr: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_context_s_t() {
    const UNINIT: ::std::mem::MaybeUninit<context_s_t> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<context_s_t>(),
        8usize,
        concat!("Size of: ", stringify!(context_s_t))
    );
    assert_eq!(
        ::std::mem::align_of::<context_s_t>(),
        8usize,
        concat!("Alignment of ", stringify!(context_s_t))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(context_s_t),
            "::",
            stringify!(ptr)
        )
    );
}
pub type context_t = *mut context_s_t;
extern "C" {
    pub fn context_new(arg1: *const ::std::os::raw::c_char) -> context_t;
}
extern "C" {
    pub fn context_str(arg1: context_t) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    pub fn context_free(arg1: context_t);
}
extern "C" {
    pub fn context_type_get(arg1: context_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn context_range_get(arg1: context_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn context_role_get(arg1: context_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn context_user_get(arg1: context_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn context_type_set(
        arg1: context_t,
        arg2: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn context_range_set(
        arg1: context_t,
        arg2: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn context_role_set(
        arg1: context_t,
        arg2: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn context_user_set(
        arg1: context_t,
        arg2: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct security_id {
    pub ctx: *mut ::std::os::raw::c_char,
    pub refcnt: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_security_id() {
    const UNINIT: ::std::mem::MaybeUninit<security_id> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<security_id>(),
        16usize,
        concat!("Size of: ", stringify!(security_id))
    );
    assert_eq!(
        ::std::mem::align_of::<security_id>(),
        8usize,
        concat!("Alignment of ", stringify!(security_id))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ctx) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(security_id),
            "::",
            stringify!(ctx)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).refcnt) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(security_id),
            "::",
            stringify!(refcnt)
        )
    );
}
pub type security_id_t = *mut security_id;
extern "C" {
    pub fn avc_sid_to_context(
        sid: security_id_t,
        ctx: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_sid_to_context_raw(
        sid: security_id_t,
        ctx: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_context_to_sid(
        ctx: *const ::std::os::raw::c_char,
        sid: *mut security_id_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_context_to_sid_raw(
        ctx: *const ::std::os::raw::c_char,
        sid: *mut security_id_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_get_initial_sid(
        name: *const ::std::os::raw::c_char,
        sid: *mut security_id_t,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct avc_entry {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct avc_entry_ref {
    pub ae: *mut avc_entry,
}
#[test]
fn bindgen_test_layout_avc_entry_ref() {
    const UNINIT: ::std::mem::MaybeUninit<avc_entry_ref> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<avc_entry_ref>(),
        8usize,
        concat!("Size of: ", stringify!(avc_entry_ref))
    );
    assert_eq!(
        ::std::mem::align_of::<avc_entry_ref>(),
        8usize,
        concat!("Alignment of ", stringify!(avc_entry_ref))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).ae) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_entry_ref),
            "::",
            stringify!(ae)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct avc_memory_callback {
    pub func_malloc:
        ::std::option::Option<unsafe extern "C" fn(size: usize) -> *mut ::std::os::raw::c_void>,
    pub func_free: ::std::option::Option<unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void)>,
}
#[test]
fn bindgen_test_layout_avc_memory_callback() {
    const UNINIT: ::std::mem::MaybeUninit<avc_memory_callback> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<avc_memory_callback>(),
        16usize,
        concat!("Size of: ", stringify!(avc_memory_callback))
    );
    assert_eq!(
        ::std::mem::align_of::<avc_memory_callback>(),
        8usize,
        concat!("Alignment of ", stringify!(avc_memory_callback))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_malloc) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_memory_callback),
            "::",
            stringify!(func_malloc)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_free) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_memory_callback),
            "::",
            stringify!(func_free)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct avc_log_callback {
    pub func_log:
        ::std::option::Option<unsafe extern "C" fn(fmt: *const ::std::os::raw::c_char, ...)>,
    pub func_audit: ::std::option::Option<
        unsafe extern "C" fn(
            auditdata: *mut ::std::os::raw::c_void,
            cls: security_class_t,
            msgbuf: *mut ::std::os::raw::c_char,
            msgbufsize: usize,
        ),
    >,
}
#[test]
fn bindgen_test_layout_avc_log_callback() {
    const UNINIT: ::std::mem::MaybeUninit<avc_log_callback> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<avc_log_callback>(),
        16usize,
        concat!("Size of: ", stringify!(avc_log_callback))
    );
    assert_eq!(
        ::std::mem::align_of::<avc_log_callback>(),
        8usize,
        concat!("Alignment of ", stringify!(avc_log_callback))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_log) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_log_callback),
            "::",
            stringify!(func_log)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_audit) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_log_callback),
            "::",
            stringify!(func_audit)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct avc_thread_callback {
    pub func_create_thread: ::std::option::Option<
        unsafe extern "C" fn(
            run: ::std::option::Option<unsafe extern "C" fn()>,
        ) -> *mut ::std::os::raw::c_void,
    >,
    pub func_stop_thread:
        ::std::option::Option<unsafe extern "C" fn(thread: *mut ::std::os::raw::c_void)>,
}
#[test]
fn bindgen_test_layout_avc_thread_callback() {
    const UNINIT: ::std::mem::MaybeUninit<avc_thread_callback> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<avc_thread_callback>(),
        16usize,
        concat!("Size of: ", stringify!(avc_thread_callback))
    );
    assert_eq!(
        ::std::mem::align_of::<avc_thread_callback>(),
        8usize,
        concat!("Alignment of ", stringify!(avc_thread_callback))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_create_thread) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_thread_callback),
            "::",
            stringify!(func_create_thread)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_stop_thread) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_thread_callback),
            "::",
            stringify!(func_stop_thread)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct avc_lock_callback {
    pub func_alloc_lock:
        ::std::option::Option<unsafe extern "C" fn() -> *mut ::std::os::raw::c_void>,
    pub func_get_lock:
        ::std::option::Option<unsafe extern "C" fn(lock: *mut ::std::os::raw::c_void)>,
    pub func_release_lock:
        ::std::option::Option<unsafe extern "C" fn(lock: *mut ::std::os::raw::c_void)>,
    pub func_free_lock:
        ::std::option::Option<unsafe extern "C" fn(lock: *mut ::std::os::raw::c_void)>,
}
#[test]
fn bindgen_test_layout_avc_lock_callback() {
    const UNINIT: ::std::mem::MaybeUninit<avc_lock_callback> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<avc_lock_callback>(),
        32usize,
        concat!("Size of: ", stringify!(avc_lock_callback))
    );
    assert_eq!(
        ::std::mem::align_of::<avc_lock_callback>(),
        8usize,
        concat!("Alignment of ", stringify!(avc_lock_callback))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_alloc_lock) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_lock_callback),
            "::",
            stringify!(func_alloc_lock)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_get_lock) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_lock_callback),
            "::",
            stringify!(func_get_lock)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_release_lock) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_lock_callback),
            "::",
            stringify!(func_release_lock)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).func_free_lock) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_lock_callback),
            "::",
            stringify!(func_free_lock)
        )
    );
}
extern "C" {
    pub fn avc_open(opts: *mut selinux_opt, nopts: ::std::os::raw::c_uint)
        -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_cleanup();
}
extern "C" {
    pub fn avc_reset() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_destroy();
}
extern "C" {
    pub fn avc_has_perm_noaudit(
        ssid: security_id_t,
        tsid: security_id_t,
        tclass: security_class_t,
        requested: access_vector_t,
        aeref: *mut avc_entry_ref,
        avd: *mut av_decision,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_has_perm(
        ssid: security_id_t,
        tsid: security_id_t,
        tclass: security_class_t,
        requested: access_vector_t,
        aeref: *mut avc_entry_ref,
        auditdata: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_audit(
        ssid: security_id_t,
        tsid: security_id_t,
        tclass: security_class_t,
        requested: access_vector_t,
        avd: *mut av_decision,
        result: ::std::os::raw::c_int,
        auditdata: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    pub fn avc_compute_create(
        ssid: security_id_t,
        tsid: security_id_t,
        tclass: security_class_t,
        newsid: *mut security_id_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_compute_member(
        ssid: security_id_t,
        tsid: security_id_t,
        tclass: security_class_t,
        newsid: *mut security_id_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_add_callback(
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                event: u32,
                ssid: security_id_t,
                tsid: security_id_t,
                tclass: security_class_t,
                perms: access_vector_t,
                out_retained: *mut access_vector_t,
            ) -> ::std::os::raw::c_int,
        >,
        events: u32,
        ssid: security_id_t,
        tsid: security_id_t,
        tclass: security_class_t,
        perms: access_vector_t,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct avc_cache_stats {
    pub entry_lookups: ::std::os::raw::c_uint,
    pub entry_hits: ::std::os::raw::c_uint,
    pub entry_misses: ::std::os::raw::c_uint,
    pub entry_discards: ::std::os::raw::c_uint,
    pub cav_lookups: ::std::os::raw::c_uint,
    pub cav_hits: ::std::os::raw::c_uint,
    pub cav_probes: ::std::os::raw::c_uint,
    pub cav_misses: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_avc_cache_stats() {
    const UNINIT: ::std::mem::MaybeUninit<avc_cache_stats> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<avc_cache_stats>(),
        32usize,
        concat!("Size of: ", stringify!(avc_cache_stats))
    );
    assert_eq!(
        ::std::mem::align_of::<avc_cache_stats>(),
        4usize,
        concat!("Alignment of ", stringify!(avc_cache_stats))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).entry_lookups) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(entry_lookups)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).entry_hits) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(entry_hits)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).entry_misses) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(entry_misses)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).entry_discards) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(entry_discards)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).cav_lookups) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(cav_lookups)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).cav_hits) as usize - ptr as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(cav_hits)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).cav_probes) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(cav_probes)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).cav_misses) as usize - ptr as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(avc_cache_stats),
            "::",
            stringify!(cav_misses)
        )
    );
}
extern "C" {
    pub fn avc_cache_stats(stats: *mut avc_cache_stats);
}
extern "C" {
    pub fn avc_av_stats();
}
extern "C" {
    pub fn avc_sid_stats();
}
extern "C" {
    pub fn avc_netlink_open(blocking: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_netlink_loop();
}
extern "C" {
    pub fn avc_netlink_close();
}
extern "C" {
    pub fn avc_netlink_acquire_fd() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn avc_netlink_release_fd();
}
extern "C" {
    pub fn avc_netlink_check_nb() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_status_open(fallback: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_status_close();
}
extern "C" {
    pub fn selinux_status_updated() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_status_getenforce() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_status_policyload() -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_status_deny_unknown() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct selabel_handle {
    _unused: [u8; 0],
}
extern "C" {
    pub fn selabel_open(
        backend: ::std::os::raw::c_uint,
        opts: *const selinux_opt,
        nopts: ::std::os::raw::c_uint,
    ) -> *mut selabel_handle;
}
extern "C" {
    pub fn selabel_close(handle: *mut selabel_handle);
}
extern "C" {
    pub fn selabel_lookup(
        handle: *mut selabel_handle,
        con: *mut *mut ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        type_: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selabel_lookup_raw(
        handle: *mut selabel_handle,
        con: *mut *mut ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        type_: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selabel_partial_match(
        handle: *mut selabel_handle,
        key: *const ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    pub fn selabel_get_digests_all_partial_matches(
        rec: *mut selabel_handle,
        key: *const ::std::os::raw::c_char,
        calculated_digest: *mut *mut u8,
        xattr_digest: *mut *mut u8,
        digest_len: *mut usize,
    ) -> bool;
}
extern "C" {
    pub fn selabel_hash_all_partial_matches(
        rec: *mut selabel_handle,
        key: *const ::std::os::raw::c_char,
        digest: *mut u8,
    ) -> bool;
}
extern "C" {
    pub fn selabel_lookup_best_match(
        rec: *mut selabel_handle,
        con: *mut *mut ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        aliases: *mut *const ::std::os::raw::c_char,
        type_: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selabel_lookup_best_match_raw(
        rec: *mut selabel_handle,
        con: *mut *mut ::std::os::raw::c_char,
        key: *const ::std::os::raw::c_char,
        aliases: *mut *const ::std::os::raw::c_char,
        type_: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selabel_digest(
        rec: *mut selabel_handle,
        digest: *mut *mut ::std::os::raw::c_uchar,
        digest_len: *mut usize,
        specfiles: *mut *mut *mut ::std::os::raw::c_char,
        num_specfiles: *mut usize,
    ) -> ::std::os::raw::c_int;
}
pub mod selabel_cmp_result {
    pub type Type = ::std::os::raw::c_uint;
    pub const SELABEL_SUBSET: Type = 0;
    pub const SELABEL_EQUAL: Type = 1;
    pub const SELABEL_SUPERSET: Type = 2;
    pub const SELABEL_INCOMPARABLE: Type = 3;
}
extern "C" {
    pub fn selabel_cmp(
        h1: *mut selabel_handle,
        h2: *mut selabel_handle,
    ) -> selabel_cmp_result::Type;
}
extern "C" {
    pub fn selabel_stats(handle: *mut selabel_handle);
}
extern "C" {
    pub fn selinux_restorecon(
        pathname: *const ::std::os::raw::c_char,
        restorecon_flags: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_restorecon_set_sehandle(hndl: *mut selabel_handle);
}
extern "C" {
    pub fn selinux_restorecon_default_handle() -> *mut selabel_handle;
}
extern "C" {
    pub fn selinux_restorecon_set_exclude_list(exclude_list: *mut *const ::std::os::raw::c_char);
}
extern "C" {
    pub fn selinux_restorecon_set_alt_rootpath(
        alt_rootpath: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
pub mod digest_result {
    pub type Type = ::std::os::raw::c_uint;
    pub const MATCH: Type = 0;
    pub const NOMATCH: Type = 1;
    pub const DELETED_MATCH: Type = 2;
    pub const DELETED_NOMATCH: Type = 3;
    pub const ERROR: Type = 4;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct dir_xattr {
    pub directory: *mut ::std::os::raw::c_char,
    pub digest: *mut ::std::os::raw::c_char,
    pub result: digest_result::Type,
    pub next: *mut dir_xattr,
}
#[test]
fn bindgen_test_layout_dir_xattr() {
    const UNINIT: ::std::mem::MaybeUninit<dir_xattr> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<dir_xattr>(),
        32usize,
        concat!("Size of: ", stringify!(dir_xattr))
    );
    assert_eq!(
        ::std::mem::align_of::<dir_xattr>(),
        8usize,
        concat!("Alignment of ", stringify!(dir_xattr))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).directory) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(dir_xattr),
            "::",
            stringify!(directory)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).digest) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(dir_xattr),
            "::",
            stringify!(digest)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(dir_xattr),
            "::",
            stringify!(result)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(dir_xattr),
            "::",
            stringify!(next)
        )
    );
}
extern "C" {
    pub fn selinux_restorecon_xattr(
        pathname: *const ::std::os::raw::c_char,
        xattr_flags: ::std::os::raw::c_uint,
        xattr_list: *mut *mut *mut dir_xattr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_ordered_context_list(
        user: *const ::std::os::raw::c_char,
        fromcon: *const ::std::os::raw::c_char,
        list: *mut *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_ordered_context_list_with_level(
        user: *const ::std::os::raw::c_char,
        level: *const ::std::os::raw::c_char,
        fromcon: *const ::std::os::raw::c_char,
        list: *mut *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_default_context(
        user: *const ::std::os::raw::c_char,
        fromcon: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_default_context_with_level(
        user: *const ::std::os::raw::c_char,
        level: *const ::std::os::raw::c_char,
        fromcon: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_default_context_with_role(
        user: *const ::std::os::raw::c_char,
        role: *const ::std::os::raw::c_char,
        fromcon: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn get_default_context_with_rolelevel(
        user: *const ::std::os::raw::c_char,
        role: *const ::std::os::raw::c_char,
        level: *const ::std::os::raw::c_char,
        fromcon: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn query_user_context(
        list: *mut *mut ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn manual_user_enter_context(
        user: *const ::std::os::raw::c_char,
        newcon: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn selinux_default_type_path() -> *const ::std::os::raw::c_char;
}
extern "C" {
    pub fn get_default_type(
        role: *const ::std::os::raw::c_char,
        type_: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}