|
Chris PeBenito |
17de1b |
## <summary>Fast incremental file transfer for synchronization</summary>
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Make rsync an entry point for
|
|
Chris PeBenito |
17de1b |
## the specified domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## The domain for which init scripts are an entrypoint.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
# cjp: added for portage
|
|
Chris PeBenito |
17de1b |
interface(`rsync_entry_type',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type rsync_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
domain_entry_file($1, rsync_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute a rsync in a specified domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <desc>
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
17de1b |
## Execute a rsync in a specified domain.
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
ff8f0a |
## No interprocess communication (signals, pipes,
|
|
Chris PeBenito |
ff8f0a |
## etc.) is provided by this interface since
|
|
Chris PeBenito |
ff8f0a |
## the domains are not owned by this module.
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
17de1b |
## </desc>
|
|
Chris PeBenito |
17de1b |
## <param name="source_domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="target_domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to transition to.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
# cjp: added for portage
|
|
Chris PeBenito |
17de1b |
interface(`rsync_entry_spec_domtrans',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type rsync_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
domain_trans($1, rsync_exec_t, $2)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute a rsync in a specified domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <desc>
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
17de1b |
## Execute a rsync in a specified domain.
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
ff8f0a |
## No interprocess communication (signals, pipes,
|
|
Chris PeBenito |
ff8f0a |
## etc.) is provided by this interface since
|
|
Chris PeBenito |
ff8f0a |
## the domains are not owned by this module.
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
17de1b |
## </desc>
|
|
Chris PeBenito |
17de1b |
## <param name="source_domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
## <param name="target_domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain to transition to.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
# cjp: added for portage
|
|
Chris PeBenito |
17de1b |
interface(`rsync_entry_domtrans',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type rsync_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
domain_auto_trans($1, rsync_exec_t, $2)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Execute rsync in the caller domain domain.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
17de1b |
## Domain allowed access.
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
interface(`rsync_exec',`
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
type rsync_exec_t;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
can_exec($1, rsync_exec_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Dominick Grift |
1031ee |
|
|
Dominick Grift |
1031ee |
########################################
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
1031ee |
## Read rsync config files.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## <param name="domain">
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed access.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## </param>
|
|
Dominick Grift |
1031ee |
#
|
|
Dominick Grift |
1031ee |
interface(`rsync_read_config',`
|
|
Dominick Grift |
1031ee |
gen_require(`
|
|
Dominick Grift |
1031ee |
type rsync_etc_t;
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Chris PeBenito |
27eab8 |
allow $1 rsync_etc_t:file read_file_perms;
|
|
Dominick Grift |
1031ee |
files_search_etc($1)
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Dominick Grift |
1031ee |
########################################
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
1031ee |
## Write to rsync config files.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## <param name="domain">
|
|
Dominick Grift |
1031ee |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed access.
|
|
Dominick Grift |
1031ee |
## </summary>
|
|
Dominick Grift |
1031ee |
## </param>
|
|
Dominick Grift |
1031ee |
#
|
|
Dominick Grift |
1031ee |
interface(`rsync_write_config',`
|
|
Dominick Grift |
1031ee |
gen_require(`
|
|
Dominick Grift |
1031ee |
type rsync_etc_t;
|
|
Dominick Grift |
1031ee |
')
|
|
Dominick Grift |
1031ee |
|
|
Chris PeBenito |
27eab8 |
allow $1 rsync_etc_t:file read_file_perms;
|
|
Dominick Grift |
1031ee |
files_search_etc($1)
|
|
Dominick Grift |
1031ee |
')
|