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 C777213877A for ; Mon, 30 Jun 2014 19:03:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8EDD7E0B1E; Mon, 30 Jun 2014 19:03:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 001D1E0B0F for ; Mon, 30 Jun 2014 19:03:25 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DEBA2340225 for ; Mon, 30 Jun 2014 19:03:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 26BFA193E5 for ; Mon, 30 Jun 2014 19:03:23 +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: <1404154683.21342c022f09080d201c8661aa2ac8af893b4346.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/init.if policy/modules/system/init.te X-VCS-Directories: policy/modules/system/ X-VCS-Committer: swift X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 21342c022f09080d201c8661aa2ac8af893b4346 X-VCS-Branch: master Date: Mon, 30 Jun 2014 19:03:23 +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: e4cf8bd2-0356-4b58-8d4b-05e79e9b762c X-Archives-Hash: 29cb27388e10c20d8dc6018c4448263f commit: 21342c022f09080d201c8661aa2ac8af893b4346 Author: Sven Vermeulen siphos be> AuthorDate: Wed Jun 25 19:53:01 2014 +0000 Commit: Sven Vermeulen gentoo org> CommitDate: Mon Jun 30 18:58:03 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=21342c02 Deprecate init_daemon_run_dir interface With init_daemon_pid_file supporting class parameters, all calls to init_daemon_run_dir can now be transformed into init_daemon_pid_file calls. Update the init_daemon_run_dir interface so it gives a warning when used, and use the init_daemon_pid_file interface underlyingly. Signed-off-by: Sven Vermeulen siphos.be> --- policy/modules/system/init.if | 5 ++--- policy/modules/system/init.te | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index e60d55e..6a01568 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -464,9 +464,8 @@ interface(`init_daemon_run_dir',` type initrc_t; ') - typeattribute $1 daemonrundir; - - files_pid_filetrans(initrc_t, $1, dir, $2) + refpolicywarn(`$0($*) has been deprecated, use init_daemon_pid_file() instead.') + init_daemon_pid_file($1, dir, $2) ') ######################################## diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te index a243be6..4bee18e 100644 --- a/policy/modules/system/init.te +++ b/policy/modules/system/init.te @@ -26,6 +26,7 @@ attribute daemon; # Mark file type as a daemon pid file attribute daemonpidfile; # Mark file type as a daemon run directory +# TODO - this attribute is deprecated and kept for a short while for compatibility attribute daemonrundir; # @@ -257,6 +258,7 @@ create_dirs_pattern(initrc_t, daemonpidfile, daemonpidfile) manage_files_pattern(initrc_t, daemonpidfile, daemonpidfile) setattr_dirs_pattern(initrc_t, daemonpidfile, daemonpidfile) +# TODO - this is deprecated supported for a short while for backwards compatibility create_dirs_pattern(initrc_t, daemonrundir, daemonrundir) setattr_dirs_pattern(initrc_t, daemonrundir, daemonrundir)