From a431f42e9e20e3bb89b65bf5c861129868bb6c50 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 12 Sep 2011 11:36:27 +0300 Subject: [PATCH] Sanity check trigger scriptlet arguments on build - Trigger scriptlets differ from other types in that additional arguments to scriptlet interpreter are not supported due to the way trigger data is stored in the header. Until now any extra arguments have just been quietly discarded, make it an hard error to avoid surprises. --- build/parseScript.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/parseScript.c b/build/parseScript.c index 0a70ccd..45250a1 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -316,6 +316,12 @@ int parseScript(rpmSpec spec, int parsePart) /* Trigger script insertion is always delayed in order to */ /* get the index right. */ if (tag == RPMTAG_TRIGGERSCRIPTS) { + if (progArgc > 1) { + rpmlog(RPMLOG_ERR, + _("line %d: interpreter arguments not allowed in triggers: %s\n"), + spec->lineNum, prog); + goto exit; + } /* Add file/index/prog triple to the trigger file list */ index = addTriggerIndex(pkg, file, p, progArgv[0], scriptFlags); -- 2.7.4