From 5af7615ceb20dd62ee9a7534539355a79d7d9dc4 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 23 Jul 1996 02:42:20 +0000 Subject: [PATCH] do some checking on the timecheck value CVS patchset: 915 CVS date: 1996/07/23 02:42:20 --- lib/rpmrc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 4aeeaca..7c76d8b 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -608,6 +608,8 @@ static int readConfigFilesAux(char *file, int readWhat) int rpmReadConfigFiles(char * file, char * arch, char * os, int building) { int rc = 0; + int tc; + char *tcs, *tcse; setDefaults(); @@ -632,6 +634,16 @@ int rpmReadConfigFiles(char * file, char * arch, char * os, int building) archosFindEquivs(&archCache, &archEquivTable, getArchName()); archosFindEquivs(&osCache, &osEquivTable, getOsName()); + /* Do some checking */ + if ((tcs = getVar(RPMVAR_TIMECHECK))) { + tcse = NULL; + tc = strtoul(tcs, &tcse, 10); + if ((*tcse) || (tcse == tcs) || (tc == ULONG_MAX)) { + error(RPMERR_RPMRC, "Bad arg to timecheck: %s", tcs); + return(RPMERR_RPMRC); + } + } + return 0; } -- 2.7.4