From: <ssm...@us...> - 2006-09-29 14:59:20
|
Revision: 2041 http://svn.sourceforge.net/selinux/?rev=2041&view=rev Author: ssmalley Date: 2006-09-29 07:59:14 -0700 (Fri, 29 Sep 2006) Log Message: ----------- Author: "James Athey" Email: ja...@tr... Subject: libsemanage: add genhomedircon path to semanage.conf parsing Date: Thu, 28 Sep 2006 17:31:46 -0400 This patch adds the ability to specify a path to genhomedircon in semanage.conf, similar to specifying a path to setfiles or load_policy. For example: [genhomedircon] path = /usr/local/sbin/genhomedircon_modified args = -t $@ [end] Modified Paths: -------------- trunk/libsemanage/ChangeLog trunk/libsemanage/src/conf-parse.y trunk/libsemanage/src/conf-scan.l Modified: trunk/libsemanage/ChangeLog =================================================================== --- trunk/libsemanage/ChangeLog 2006-09-29 14:54:01 UTC (rev 2040) +++ trunk/libsemanage/ChangeLog 2006-09-29 14:59:14 UTC (rev 2041) @@ -1,3 +1,6 @@ + * Merged patch to add genhomedircon path to semanage.conf from + James Athey. + 1.6.16 2006-08-14 * Make most copy errors fatal, but allow exceptions for file_contexts.local, seusers, and netfilter_contexts if Modified: trunk/libsemanage/src/conf-parse.y =================================================================== --- trunk/libsemanage/src/conf-parse.y 2006-09-29 14:54:01 UTC (rev 2040) +++ trunk/libsemanage/src/conf-parse.y 2006-09-29 14:59:14 UTC (rev 2041) @@ -1,6 +1,7 @@ -/* Author: Jason Tang <jt...@tr...> +/* Authors: Jason Tang <jt...@tr...> + * James Athey <ja...@tr...> * - * Copyright (C) 2004-2005 Tresys Technology, LLC + * Copyright (C) 2004-2006 Tresys Technology, LLC * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -56,7 +57,7 @@ } %token MODULE_STORE VERSION EXPAND_CHECK FILE_MODE -%token LOAD_POLICY_START SETFILES_START +%token LOAD_POLICY_START SETFILES_START GENHOMEDIRCON_START %token VERIFY_MOD_START VERIFY_LINKED_START VERIFY_KERNEL_START BLOCK_END %token PROG_PATH PROG_ARGS %token <s> ARG @@ -137,6 +138,14 @@ YYABORT; } } + | GENHOMEDIRCON_START { + semanage_conf_external_prog_destroy(current_conf->genhomedircon); + current_conf->genhomedircon = NULL; + if (new_external_prog(¤t_conf->genhomedircon) == -1) { + parse_errors++; + YYABORT; + } + } ; verify_block: verify_start external_opts BLOCK_END { Modified: trunk/libsemanage/src/conf-scan.l =================================================================== --- trunk/libsemanage/src/conf-scan.l 2006-09-29 14:54:01 UTC (rev 2040) +++ trunk/libsemanage/src/conf-scan.l 2006-09-29 14:59:14 UTC (rev 2041) @@ -1,6 +1,7 @@ -/* Author: Jason Tang <jt...@tr...> +/* Authors: Jason Tang <jt...@tr...> + * James Athey <ja...@tr...> * - * Copyright (C) 2004-2005 Tresys Technology, LLC + * Copyright (C) 2004-2006 Tresys Technology, LLC * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -43,6 +44,7 @@ file-mode return FILE_MODE; "[load_policy]" return LOAD_POLICY_START; "[setfiles]" return SETFILES_START; +"[genhomedircon]" return GENHOMEDIRCON_START; "[verify module]" return VERIFY_MOD_START; "[verify linked]" return VERIFY_LINKED_START; "[verify kernel]" return VERIFY_KERNEL_START; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |