- fix: add -r to useradd to prevent /etc/skel glop (#46215).
- fix: disambiguate typedef and struct name(s) for kpackage.
CVS patchset: 4908
CVS date: 2001/06/28 22:19:08
stabilizes.
- fix: permit partially enumerated hardlink file sets during build.
- fix: resurrect rpm signature modes.
+ - fix: sanity checks on #tags (<65K) and offset (<16Mb) in header.
+ - fix: add -r to useradd to prevent /etc/skel glop (#46215).
+ - fix: disambiguate typedef and struct name(s) for kpackage.
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
-dnl aclocal.m4 generated automatically by aclocal 1.4-p2
+dnl aclocal.m4 generated automatically by aclocal 1.4-p4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
CFLAGS="$save_CFLAGS"
])
compiler_o_lo=$lt_cv_compiler_o_lo
- AC_MSG_RESULT([$compiler_c_lo])
+ AC_MSG_RESULT([$compiler_o_lo])
else
compiler_o_lo=no
fi
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
# Warning - without using the other run time loading flags, -berok will
# link without error, but may produce a broken library.
- allow_undefined_flag='${wl}-berok"
+ allow_undefined_flag='${wl}-berok'
# This is a bit strange, but is similar to how AIX traditionally builds
# it's shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
LTV="libtoolize (GNU libtool) 1.4"
ACV="Autoconf version 2.13"
-AMV="automake (GNU automake) 1.4-p2"
+AMV="automake (GNU automake) 1.4-p4"
USAGE="
-You need to install:
+This script documents the versions of the tools I'm using to build rpm:
libtool-1.4
autoconf-2.13
- automake-1.4-p2
-Or edit this script to change the libtool/autoconf/automake versions checked ...
+ automake-1.4-p4
+Simply edit this script to change the libtool/autoconf/automake versions
+checked if you need to, as rpm should build (and has built) with all
+recent versions of libtool/autoconf/automake.
"
[ "`libtoolize --version`" != "$LTV" ] && echo "$USAGE" && exit 1
@echo '#include "system.h"' > tagtable.c
@echo '#include "rpmlib.h"' >> tagtable.c
@echo '' >> tagtable.c
- @echo 'const struct headerTagTableEntry rpmTagTable[] = {' >> tagtable.c
+ @echo 'const struct headerTagTableEntry_s rpmTagTable[] = {' >> tagtable.c
$(AWK) '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ { if ($$2 == "=") { printf("\t{ \"%s\", %s },\n", $$1, $$3); } else { printf("\t{ \"%s\", %s },\n", $$2, $$3); } }' < $(srcdir)/rpmlib.h >> tagtable.c
@echo ' { NULL, 0 }' >> tagtable.c
@echo '};' >> tagtable.c
@echo '' >> tagtable.c
- @echo 'const int rpmTagTableSize = sizeof(rpmTagTable) / sizeof(struct headerTagTableEntry) - 1;' >> tagtable.c
+ @echo 'const int rpmTagTableSize = sizeof(rpmTagTable) / sizeof(rpmTagTable[0]) - 1;' >> tagtable.c
getdate.c: getdate.y
@echo expect 10 shift/reduce conflicts
return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData);
}
-const struct headerSprintfExtension rpmHeaderFormats[] = {
+const struct headerSprintfExtension_s rpmHeaderFormats[] = {
{ HEADER_EXT_TAG, "RPMTAG_GROUP", { groupTag } },
{ HEADER_EXT_TAG, "RPMTAG_DESCRIPTION", { descriptionTag } },
{ HEADER_EXT_TAG, "RPMTAG_SUMMARY", { summaryTag } },
*/
/*@unused@*/ static inline
/*@only@*/ char * headerSprintf(Header h, const char * fmt,
- const struct headerTagTableEntry * tags,
- const struct headerSprintfExtension * extensions,
+ const struct headerTagTableEntry_s * tags,
+ const struct headerSprintfExtension_s * extensions,
/*@null@*/ /*@out@*/ errmsg_t * errmsg)
/*@modifies *errmsg @*/
{
* @return formatted output string (malloc'ed)
*/
/*@only@*/ char * headerSprintf(Header h, const char * fmt,
- const struct headerTagTableEntry * tags,
- const struct headerSprintfExtension * extensions,
+ const struct headerTagTableEntry_s * tags,
+ const struct headerSprintfExtension_s * extensions,
/*@null@*/ /*@out@*/ errmsg_t * errmsg)
/*@modifies *errmsg @*/;
goto errxit;
entry->info.count = htonl(pe->count);
+ /* XXX imposes limit of 65K tags, more than enough. */
+ if (entry->info.count & 0xffff0000)
+ goto errxit;
+
{ int off = ntohl(pe->offset);
+
+ /* XXX imposes limit of 16Mb on metadata, more than enough. */
+ if (off & 0xff000000)
+ goto errxit;
if (off) {
int_32 * stei = memcpy(alloca(nb), dataStart + off, nb);
rdl = -ntohl(stei[2]); /* negative offset */
}
char * headerSprintf(Header h, const char * fmt,
- const struct headerTagTableEntry * tabletags,
- const struct headerSprintfExtension * extensions,
+ const struct headerTagTableEntry_s * tabletags,
+ const struct headerSprintfExtension_s * extensions,
errmsg_t * errmsg)
{
/*@-castexpose@*/ /* FIX: legacy API shouldn't change. */
return result;
}
-const struct headerSprintfExtension headerDefaultFormats[] = {
+const struct headerSprintfExtension_s headerDefaultFormats[] = {
{ HEADER_EXT_FORMAT, "octal", { octalFormat } },
{ HEADER_EXT_FORMAT, "hex", { hexFormat } },
{ HEADER_EXT_FORMAT, "date", { dateFormat } },
/** \ingroup header
* Associate tag names with numeric values.
*/
-typedef /*@abstract@*/ struct headerTagTableEntry * headerTagTableEntry;
-struct headerTagTableEntry {
+typedef /*@abstract@*/ struct headerTagTableEntry_s * headerTagTableEntry;
+struct headerTagTableEntry_s {
/*@observer@*/ /*@null@*/ const char * name; /*!< Tag name. */
int val; /*!< Tag numeric value. */
};
/** \ingroup header
* Define header tag output formats.
*/
-typedef /*@abstract@*/ struct headerSprintfExtension * headerSprintfExtension;
-struct headerSprintfExtension {
+typedef /*@abstract@*/ struct headerSprintfExtension_s * headerSprintfExtension;
+struct headerSprintfExtension_s {
enum headerSprintfExtenstionType type; /*!< Type of extension. */
/*@observer@*/ /*@null@*/ const char * name; /*!< Name of extension. */
union {
/*@unused@*/ void * generic; /*!< Private extension. */
headerTagFormatFunction formatFunction; /*!< HEADER_EXT_TAG extension. */
headerTagTagFunction tagFunction; /*!< HEADER_EXT_FORMAT extension. */
- struct headerSprintfExtension * more; /*!< Chained table extension. */
+ struct headerSprintfExtension_s * more; /*!< Chained table extension. */
} u;
};
* Supported default header tag output formats.
*/
/*@-redecl@*/
-extern const struct headerSprintfExtension headerDefaultFormats[];
+extern const struct headerSprintfExtension_s headerDefaultFormats[];
/*@=redecl@*/
/** \ingroup header
*/
typedef
/*@only@*/ char * (*HDRhdrsprintf) (Header h, const char * fmt,
- const struct headerTagTableEntry * tags,
- const struct headerSprintfExtension * extensions,
+ const struct headerTagTableEntry_s * tags,
+ const struct headerSprintfExtension_s * extensions,
/*@null@*/ /*@out@*/ errmsg_t * errmsg)
/*@modifies *errmsg @*/;
}
void headerDump(Header h, FILE *f, int flags,
- const struct headerTagTableEntry * tags)
+ const struct headerTagTableEntry_s * tags)
{
int i;
indexEntry p;
- const struct headerTagTableEntry * tage;
+ const struct headerTagTableEntry_s * tage;
const char * tag;
char * type;
*/
/*@unused@*/
void headerDump(Header h, FILE *f, int flags,
- const struct headerTagTableEntry * tags)
+ const struct headerTagTableEntry_s * tags)
/*@modifies f, fileSystem @*/;
#define HEADER_DUMP_INLINE 1
mode_t fperms; /*!< File perms (0644) if not mapped. */
/*@only@*/ /*@null@*/ const char ** apath;
int mapflags;
-/*@owned@*/ int * fmapflags;
+/*@owned@*/ /*@null@*/ int * fmapflags;
uid_t uid;
/*@owned@*/ /*@null@*/ uid_t * fuids; /*!< File uid(s) */
gid_t gid;
void rpmDisplayQueryTags(FILE * fp)
{
- const struct headerTagTableEntry * t;
+ const struct headerTagTableEntry_s * t;
int i;
- const struct headerSprintfExtension * ext = rpmHeaderFormats;
+ const struct headerSprintfExtension_s * ext = rpmHeaderFormats;
for (i = 0, t = rpmTagTable; i < rpmTagTableSize; i++, t++)
if (t->name) fprintf(fp, "%s\n", t->name + 7);
* Automatically generated table of tag name/value pairs.
*/
/*@-redecl@*/
-extern const struct headerTagTableEntry rpmTagTable[];
+extern const struct headerTagTableEntry_s rpmTagTable[];
/*@=redecl@*/
/**
* @note Chains to headerDefaultFormats[].
*/
/*@-redecl@*/
-extern const struct headerSprintfExtension rpmHeaderFormats[];
+extern const struct headerSprintfExtension_s rpmHeaderFormats[];
/*@=redecl@*/
/**
/**
* Dependency problems found by rpmdepCheck().
- * @todo Rename, but rpmfind prevents "struct rpmDependencyConflict_s".
*/
-typedef /*@abstract@*/ struct rpmDependencyConflict {
+typedef /*@abstract@*/ struct rpmDependencyConflict_s {
const char * byName; /*!< package name */
const char * byVersion; /*!< package version */
const char * byRelease; /*!< package release */
int tagValue(const char * tagstr)
{
- const struct headerTagTableEntry *t;
+ const struct headerTagTableEntry_s *t;
if (!strcmp(tagstr, "Packages"))
return RPMDBI_PACKAGES;
'CCFLAGS' => '-g -O2 -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts',
'OPTIMIZE'=> '-g',
'DEFINE' => '-Dbool=char -DHAS_BOOL',
- 'INC' => ' -I../build -I../lib -I../popt -I/usr/include/rpm',
+ 'INC' => ' -I/usr/local/include -I../build -I../lib -I../popt -I/usr/include/rpm',
'depend' => { 'rpm.c' => 'transaction.xs header.xs db.xs' },
);
-# Makefile.in generated automatically by automake 1.4-p2 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
-# Makefile.in generated automatically by automake 1.4-p2 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
int forceArray = 0;
int freeData = 0;
char * str;
- struct headerSprintfExtension * ext = NULL;
- const struct headerSprintfExtension * extensions = rpmHeaderFormats;
+ struct headerSprintfExtension_s * ext = NULL;
+ const struct headerSprintfExtension_s * extensions = rpmHeaderFormats;
if (PyCObject_Check (item))
ext = PyCObject_AsVoidPtr(item);
void initrpm(void) {
PyObject * m, * d, *o, * tag = NULL, * dict;
int i;
- const struct headerSprintfExtension * extensions = rpmHeaderFormats;
- struct headerSprintfExtension * ext;
+ const struct headerSprintfExtension_s * extensions = rpmHeaderFormats;
+ struct headerSprintfExtension_s * ext;
/* _rpmio_debug = -1; */
rpmReadConfigFiles(NULL, NULL);
exit 1
fi
/usr/sbin/groupadd -g 37 @RPMGROUP@ > /dev/null 2>&1
-/usr/sbin/useradd -d /var/lib/rpm -u 37 -g 37 @RPMUSER@ > /dev/null 2>&1
+/usr/sbin/useradd -r -d /var/lib/rpm -u 37 -g 37 @RPMUSER@ > /dev/null 2>&1
%endif
exit 0