From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4E6DE138010 for ; Sun, 28 Oct 2012 13:48:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 048BAE049A; Sun, 28 Oct 2012 13:48:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7A8D5E049A for ; Sun, 28 Oct 2012 13:48:12 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CA2AE33D8E3 for ; Sun, 28 Oct 2012 13:48:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 4056DE5436 for ; Sun, 28 Oct 2012 13:48:09 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1351430435.c7f78a00a39415e2cf32e27bc33907b8a23e2ded.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: policy/modules/system/miscfiles.fc X-VCS-Directories: policy/modules/system/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: c7f78a00a39415e2cf32e27bc33907b8a23e2ded X-VCS-Branch: master Date: Sun, 28 Oct 2012 13:48:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f9af73ba-13a6-463c-a31c-a963130036af X-Archives-Hash: f14c86da74c9bbaa5d4b068370fecf77 commit: c7f78a00a39415e2cf32e27bc33907b8a23e2ded Author: Sven Vermeulen siphos be> AuthorDate: Sun Oct 28 13:20:35 2012 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Sun Oct 28 13:20:35 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=c7f78a00 Keep openssl.cnf as etc_t A previous commit marked the /etc/ssl location (and all files therein) with cert_t instead of etc_t. As this location contains /etc/ssl/openssl.cnf, applications linked with openssl's libcrypto fail to function properly. The ssh client is one of those applications, which - if not granted - fails with: $ ssh giskard.alunduil.com Auto configuration failed 118260437468864:error:0200100D:system library:fopen:Permission denied:bss_file.c:169:fopen('/etc/ssl/openssl.cnf','rb') 118260437468864:error:2006D002:BIO routines:BIO_new_file:system lib:bss_file.c:174: 118260437468864:error:0E078002:configuration file routines:DEF_LOAD:system lib:conf_def.c:199: Mark all files inside /etc/ssl/certs, /etc/ssl/private, /etc/pki/certs and /etc/pki/private as cert_t as those locations usually contain certificates and key-related files (like revocation lists & keys). This leaves the /etc/ssl location, and the openssl.cnf file inside of it, as etc_t. --- policy/modules/system/miscfiles.fc | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/policy/modules/system/miscfiles.fc b/policy/modules/system/miscfiles.fc index aa62e6a..a0b8232 100644 --- a/policy/modules/system/miscfiles.fc +++ b/policy/modules/system/miscfiles.fc @@ -11,8 +11,10 @@ ifdef(`distro_gentoo',` /etc/avahi/etc/localtime -- gen_context(system_u:object_r:locale_t,s0) /etc/httpd/alias/[^/]*\.db(\.[^/]*)* -- gen_context(system_u:object_r:cert_t,s0) /etc/localtime -- gen_context(system_u:object_r:locale_t,s0) -/etc/pki(/.*)? gen_context(system_u:object_r:cert_t,s0) -/etc/ssl(/.*)? gen_context(system_u:object_r:cert_t,s0) +/etc/pki/certs/(.*)? -- gen_context(system_u:object_r:cert_t,s0) +/etc/pki/private/(.*)? -- gen_context(system_u:object_r:cert_t,s0) +/etc/ssl/certs/(.*)? -- gen_context(system_u:object_r:cert_t,s0) +/etc/ssl/private/(.*)? -- gen_context(system_u:object_r:cert_t,s0) /etc/timezone -- gen_context(system_u:object_r:locale_t,s0) ifdef(`distro_redhat',`