summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-09-12 11:36:27 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-09-12 11:40:49 +0300
commita431f42e9e20e3bb89b65bf5c861129868bb6c50 (patch)
tree06ba3d333966cb4dca2fa61a337c35c3cf267eae
parent547badd6ce70d6acb1cd299f881922b68316cd70 (diff)
downloadlibrpm-tizen-a431f42e9e20e3bb89b65bf5c861129868bb6c50.tar.gz
librpm-tizen-a431f42e9e20e3bb89b65bf5c861129868bb6c50.tar.bz2
librpm-tizen-a431f42e9e20e3bb89b65bf5c861129868bb6c50.zip
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.
-rw-r--r--build/parseScript.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/parseScript.c b/build/parseScript.c
index 0a70ccde5..45250a192 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);