++##
++## Allow logrotate to manage nfs files
++##
++##
++gen_tunable(logrotate_use_nfs, false)
++
+
type logrotate_t;
-type logrotate_exec_t;
domain_type(logrotate_t)
@@ -38344,7 +38552,7 @@ index be0ab84..e4d6e6f 100644
type logrotate_lock_t;
files_lock_file(logrotate_lock_t)
-@@ -25,21 +23,27 @@ files_tmp_file(logrotate_tmp_t)
+@@ -25,21 +31,27 @@ files_tmp_file(logrotate_tmp_t)
type logrotate_var_lib_t;
files_type(logrotate_var_lib_t)
@@ -38378,7 +38586,7 @@ index be0ab84..e4d6e6f 100644
allow logrotate_t self:shm create_shm_perms;
allow logrotate_t self:sem create_sem_perms;
allow logrotate_t self:msgq create_msgq_perms;
-@@ -48,36 +52,52 @@ allow logrotate_t self:msg { send receive };
+@@ -48,36 +60,52 @@ allow logrotate_t self:msg { send receive };
allow logrotate_t logrotate_lock_t:file manage_file_perms;
files_lock_filetrans(logrotate_t, logrotate_lock_t, file)
@@ -38436,7 +38644,7 @@ index be0ab84..e4d6e6f 100644
files_manage_generic_spool(logrotate_t)
files_manage_generic_spool_dirs(logrotate_t)
files_getattr_generic_locks(logrotate_t)
-@@ -103,24 +123,34 @@ init_all_labeled_script_domtrans(logrotate_t)
+@@ -103,24 +131,39 @@ init_all_labeled_script_domtrans(logrotate_t)
logging_manage_all_logs(logrotate_t)
logging_send_syslog_msg(logrotate_t)
logging_send_audit_msgs(logrotate_t)
@@ -38462,7 +38670,11 @@ index be0ab84..e4d6e6f 100644
+userdom_dontaudit_getattr_user_home_content(logrotate_t)
-mta_sendmail_domtrans(logrotate_t, logrotate_mail_t)
--
++tunable_policy(`logrotate_use_nfs',`
++ fs_read_nfs_files(logrotate_t)
++ fs_read_nfs_symlinks(logrotate_t)
++')
+
-ifdef(`distro_debian',`
+ifdef(`distro_debian', `
allow logrotate_t logrotate_tmp_t:file relabel_file_perms;
@@ -38478,7 +38690,7 @@ index be0ab84..e4d6e6f 100644
')
optional_policy(`
-@@ -135,16 +165,17 @@ optional_policy(`
+@@ -135,16 +178,17 @@ optional_policy(`
optional_policy(`
apache_read_config(logrotate_t)
@@ -38498,7 +38710,7 @@ index be0ab84..e4d6e6f 100644
')
optional_policy(`
-@@ -170,6 +201,10 @@ optional_policy(`
+@@ -170,6 +214,10 @@ optional_policy(`
')
optional_policy(`
@@ -38509,7 +38721,7 @@ index be0ab84..e4d6e6f 100644
fail2ban_stream_connect(logrotate_t)
')
-@@ -178,7 +213,7 @@ optional_policy(`
+@@ -178,7 +226,7 @@ optional_policy(`
')
optional_policy(`
@@ -38518,7 +38730,7 @@ index be0ab84..e4d6e6f 100644
')
optional_policy(`
-@@ -198,21 +233,26 @@ optional_policy(`
+@@ -198,21 +246,26 @@ optional_policy(`
')
optional_policy(`
@@ -38549,7 +38761,7 @@ index be0ab84..e4d6e6f 100644
')
optional_policy(`
-@@ -228,10 +268,21 @@ optional_policy(`
+@@ -228,10 +281,21 @@ optional_policy(`
')
optional_policy(`
@@ -38571,7 +38783,7 @@ index be0ab84..e4d6e6f 100644
su_exec(logrotate_t)
')
-@@ -241,13 +292,11 @@ optional_policy(`
+@@ -241,13 +305,11 @@ optional_policy(`
#######################################
#
@@ -57379,6 +57591,234 @@ index 0000000..0493b99
+optional_policy(`
+ modutils_domtrans_insmod(oracleasm_t)
+')
+diff --git a/osad.fc b/osad.fc
+new file mode 100644
+index 0000000..1e1eceb
+--- /dev/null
++++ b/osad.fc
+@@ -0,0 +1,7 @@
++/etc/rc\.d/init\.d/osad -- gen_context(system_u:object_r:osad_initrc_exec_t,s0)
++
++/usr/sbin/osad -- gen_context(system_u:object_r:osad_exec_t,s0)
++
++/var/log/osad -- gen_context(system_u:object_r:osad_log_t,s0)
++
++/var/run/osad.* -- gen_context(system_u:object_r:osad_var_run_t,s0)
+diff --git a/osad.if b/osad.if
+new file mode 100644
+index 0000000..05648bd
+--- /dev/null
++++ b/osad.if
+@@ -0,0 +1,165 @@
++
++##