diff options
author | Elena Reshetova <elena.reshetova@intel.com> | 2013-07-05 14:48:42 +0300 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-05 12:52:44 -0400 |
commit | 891fa8079b446e51e1f86583c6972249bbea053d (patch) | |
tree | 73fda47b039462ee6652f8c7739e8e5a5f078496 /plugins/msm-plugin.c | |
parent | e9728a2f2ab9dc8e1aa1d3526f966e35b578f43c (diff) | |
download | rpm-891fa8079b446e51e1f86583c6972249bbea053d.tar.gz rpm-891fa8079b446e51e1f86583c6972249bbea053d.tar.bz2 rpm-891fa8079b446e51e1f86583c6972249bbea053d.zip |
Security plugin: allowing multiple domains definition
- allowing multiple domains definition per manifest
- fixing indirect include of config.h
- restricting adding new sw source with the same key info
Diffstat (limited to 'plugins/msm-plugin.c')
-rw-r--r-- | plugins/msm-plugin.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/plugins/msm-plugin.c b/plugins/msm-plugin.c index cc79bd00e..f9213293b 100644 --- a/plugins/msm-plugin.c +++ b/plugins/msm-plugin.c @@ -25,9 +25,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ - -#include "plugin.h" -#include "debug.h" #include <errno.h> #include <sys/types.h> @@ -585,16 +582,16 @@ rpmRC PLUGINHOOK_PSM_PRE_FUNC(rpmte te) goto fail; } } - if (ctx->mfx->define) { - if (ctx->mfx->define->name) - smackLabel = 1; - ret = msmSetupDefine(ctx->smack_accesses, ctx->mfx); + if (ctx->mfx->defines) { + ret = msmSetupDefines(ctx->smack_accesses, ctx->mfx); if (ret) { rpmlog(RPMLOG_ERR, "AC domain setup failed for %s\n", rpmteN(ctx->te)); msmCancelPackage(ctx->mfx->name); goto fail; - } + } else { + smackLabel = 1; + } } if (ctx->mfx->request) { if (ctx->mfx->request->ac_domain) @@ -776,7 +773,7 @@ rpmRC PLUGINHOOK_PSM_POST_FUNC(rpmte te, int rpmrc) } else { rpmlog(RPMLOG_DEBUG, "removing %s manifest data\n", rpmteN(ctx->te)); - if (ctx->mfx->define || ctx->mfx->provides || ctx->mfx->sw_sources) { + if (ctx->mfx->defines || ctx->mfx->provides || ctx->mfx->sw_sources) { msmRemoveRules(ctx->smack_accesses, ctx->mfx, SmackEnabled); } msmRemoveConfig(ctx->mfx); |