summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-09-24 18:02:57 +0000
committerjbj <devnull@localhost>1998-09-24 18:02:57 +0000
commit4a3682fdc756a9d06117886d502139c163a4891a (patch)
treee1e5939a0a4c19e0bb37f75daeb03eb91af4f428
parent5428fb90f4432052eb08f9b7e3072e1af97bff4c (diff)
downloadrpm-4a3682fdc756a9d06117886d502139c163a4891a.tar.gz
rpm-4a3682fdc756a9d06117886d502139c163a4891a.tar.bz2
rpm-4a3682fdc756a9d06117886d502139c163a4891a.zip
provides/obsoletes requires tokens that begin with alnum or _.
CVS patchset: 2347 CVS date: 1998/09/24 18:02:57
-rw-r--r--CHANGES1
-rw-r--r--build/parseReqs.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 705eb0795..8429b8ce5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@
- add new fully recursive macro.c
2.5.3 -> 2.5.4:
+ - provides/obsoletes requires tokens that begin with alnum or _.
- non-zero exit status for verify failures.
- hpux does setreuid differently (Hermann Lauer).
- check for setreuid portably (Eugene Kanter).
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 67cf01a71..05938b43a 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -125,6 +125,14 @@ int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag)
spec->line);
return RPMERR_BADSPEC;
}
+ if (!(isalnum(prov[0]) || prov[0] == '_')) {
+ rpmError(RPMERR_BADSPEC,
+ "line %d: %s: tokens must begin with alpha-numeric: %s",
+ spec->lineNum,
+ (tag == RPMTAG_PROVIDES) ? "Provides" : "Obsoletes",
+ spec->line);
+ return RPMERR_BADSPEC;
+ }
addReqProv(spec, pkg, flags, prov, NULL, 0);
line = NULL;
}