Changeset 2681

Show
Ignore:
Timestamp:
05/12/08 15:05:32 (6 months ago)
Author:
pebenito
Message:

trunk: Patch to allow gpg agent --write-env-file option from Vaclav Ovsik.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Changelog

    r2674 r2681  
     1- Patch to allow gpg agent --write-env-file option from Vaclav Ovsik. 
    12- X application data class from Eamon Walsh and Ted Toth. 
    23- Move user roles into individual modules. 
  • trunk/policy/modules/apps/gpg.if

    r2372 r2681  
    208208        allow $1_gpg_agent_t self:fifo_file rw_fifo_file_perms; 
    209209 
     210        # Allow the gpg-agent to manage its tmp files (socket) 
     211        manage_dirs_pattern($1_gpg_agent_t,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t) 
     212        manage_files_pattern($1_gpg_agent_t,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t) 
     213        manage_sock_files_pattern($1_gpg_agent_t,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t) 
     214        files_tmp_filetrans($1_gpg_agent_t, $1_gpg_agent_tmp_t, { file sock_file dir }) 
     215 
    210216        # read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d ) 
    211217        manage_dirs_pattern($1_gpg_agent_t,$1_gpg_secret_t,$1_gpg_secret_t) 
     
    220226 
    221227        # Allow the user shell to signal the gpg-agent program. 
    222         allow $2 $1_gpg_agent_t:process { signal sigkill }; 
    223  
     228        allow $2 $1_gpg_agent_t:process { signal sigkill signull }; 
     229 
     230        # Allow the user to manage gpg-agent tmp files (socket) 
    224231        manage_dirs_pattern($2,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t) 
    225232        manage_files_pattern($2,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t) 
    226233        manage_sock_files_pattern($2,$1_gpg_agent_tmp_t,$1_gpg_agent_tmp_t) 
    227         files_tmp_filetrans($1_gpg_agent_t, $1_gpg_agent_tmp_t, { file sock_file dir }) 
    228234 
    229235        # Transition from the user domain to the derived domain. 
     
    243249        # read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d ) 
    244250        userdom_search_user_home_dirs($1,$1_gpg_agent_t) 
     251 
     252        tunable_policy(`gpg_agent_env_file',` 
     253                # write ~/.gpg-agent-info or a similar to the users home dir 
     254                # or subdir (gpg-agent --write-env-file option) 
     255                # 
     256                userdom_user_home_dir_filetrans_user_home_content($1,$1_gpg_agent_t,file) 
     257                userdom_manage_user_home_content_dirs($1,$1_gpg_agent_t) 
     258                userdom_manage_user_home_content_files($1,$1_gpg_agent_t) 
     259        ') 
    245260 
    246261        tunable_policy(`use_nfs_home_dirs',` 
  • trunk/policy/modules/apps/gpg.te

    r2553 r2681  
    11 
    2 policy_module(gpg, 1.5.0
     2policy_module(gpg, 1.5.1
    33 
    44######################################## 
     
    66# Declarations 
    77# 
     8 
     9## <desc> 
     10## <p> 
     11## Allow usage of the gpg-agent --write-env-file option. 
     12## This also allows gpg-agent to manage user files. 
     13## </p> 
     14## </desc> 
     15gen_tunable(gpg_agent_env_file, false) 
    816 
    917# Type for gpg or pgp executables.