16cd6a6acSopenharmony_ci 26cd6a6acSopenharmony_ciclass testing 36cd6a6acSopenharmony_ciclass fooclass 46cd6a6acSopenharmony_ci 56cd6a6acSopenharmony_cisid test_sid 66cd6a6acSopenharmony_ci#end 76cd6a6acSopenharmony_ci 86cd6a6acSopenharmony_ci#sid decl 96cd6a6acSopenharmony_cisid security 106cd6a6acSopenharmony_ci 116cd6a6acSopenharmony_ci 126cd6a6acSopenharmony_ciclass testing 136cd6a6acSopenharmony_ci{ 146cd6a6acSopenharmony_ci read 156cd6a6acSopenharmony_ci open 166cd6a6acSopenharmony_ci close 176cd6a6acSopenharmony_ci write 186cd6a6acSopenharmony_ci exec 196cd6a6acSopenharmony_ci} 206cd6a6acSopenharmony_ciclass fooclass 216cd6a6acSopenharmony_ci{ 226cd6a6acSopenharmony_ci read 236cd6a6acSopenharmony_ci open 246cd6a6acSopenharmony_ci close 256cd6a6acSopenharmony_ci write 266cd6a6acSopenharmony_ci exec 276cd6a6acSopenharmony_ci} 286cd6a6acSopenharmony_ci#end 296cd6a6acSopenharmony_ci 306cd6a6acSopenharmony_ci#attribs 316cd6a6acSopenharmony_ci 326cd6a6acSopenharmony_ciattribute attrs; 336cd6a6acSopenharmony_ci#end 346cd6a6acSopenharmony_ci 356cd6a6acSopenharmony_ci 366cd6a6acSopenharmony_citype foo_t, attrs; 376cd6a6acSopenharmony_citype typea_t; 386cd6a6acSopenharmony_citype typeb_t; 396cd6a6acSopenharmony_citype typec_t; 406cd6a6acSopenharmony_ci#end 416cd6a6acSopenharmony_ci 426cd6a6acSopenharmony_ci 436cd6a6acSopenharmony_cibool foo_b true; 446cd6a6acSopenharmony_cibool baz_b false; 456cd6a6acSopenharmony_ci#end 466cd6a6acSopenharmony_ci 476cd6a6acSopenharmony_ci 486cd6a6acSopenharmony_cirole foo_r types foo_t; 496cd6a6acSopenharmony_cirole rolea_r; 506cd6a6acSopenharmony_cirole roleb_r; 516cd6a6acSopenharmony_ci#end 526cd6a6acSopenharmony_ci 536cd6a6acSopenharmony_ci#role decl 546cd6a6acSopenharmony_ci 556cd6a6acSopenharmony_ci 566cd6a6acSopenharmony_ciallow typea_t typeb_t : testing write; 576cd6a6acSopenharmony_ciallow typea_t typeb_t : testing {open close}; 586cd6a6acSopenharmony_citype_transition typea_t typeb_t : testing typec_t; 596cd6a6acSopenharmony_ci#end 606cd6a6acSopenharmony_ci 616cd6a6acSopenharmony_ci#audit rules 626cd6a6acSopenharmony_ci#dontaudit {kernel} unknown : dir search; 636cd6a6acSopenharmony_ci 646cd6a6acSopenharmony_ci 656cd6a6acSopenharmony_ciallow rolea_r roleb_r; 666cd6a6acSopenharmony_ci#end 676cd6a6acSopenharmony_ci 686cd6a6acSopenharmony_ci#rbac stuff 696cd6a6acSopenharmony_ci#allow system {guest local_user}; 706cd6a6acSopenharmony_ci#allow local_user guest; 716cd6a6acSopenharmony_ci 726cd6a6acSopenharmony_ci 736cd6a6acSopenharmony_ciuser foo_u roles foo_r; 746cd6a6acSopenharmony_ci#end 756cd6a6acSopenharmony_ci 766cd6a6acSopenharmony_cisid test_sid foo_u:foo_r:foo_t 77