RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 29-Sep-2007 19:06:26 Branch: HEAD Handle: 2007092918062500 Modified files: rpm CHANGES rpm/lib rpmts.c rpm/rpmdb librpmdb.vers pkgio.c rpmdb.h sqlite.c Log: - move rpmtsFindPubkey() and rpmtsOp() to rpmdb for forward linkage. Summary: Revision Changes Path 1.1647 +1 -0 rpm/CHANGES 2.101 +0 -259 rpm/lib/rpmts.c 1.18 +2 -0 rpm/rpmdb/librpmdb.vers 1.7 +237 -21 rpm/rpmdb/pkgio.c 1.65 +8 -6 rpm/rpmdb/rpmdb.h 1.14 +1 -1 rpm/rpmdb/sqlite.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.1646 -r1.1647 CHANGES --- rpm/CHANGES 29 Sep 2007 16:23:39 -0000 1.1646 +++ rpm/CHANGES 29 Sep 2007 17:06:25 -0000 1.1647 @@ -1,4 +1,5 @@ 4.5 -> 5.0: + - jbj: move rpmtsFindPubkey() and rpmtsOp() to rpmdb for forward linkage. - jbj: add _RPMTS_PRINT to keep rpmrollback.c happy. - jbj: rearrange package.c internals to new locations. - jbj: start eliminating rpmtsSetSig by inlining. @@ . patch -p0 <<'@@ .' Index: rpm/lib/rpmts.c ============================================================================ $ cvs diff -u -r2.100 -r2.101 rpmts.c --- rpm/lib/rpmts.c 29 Sep 2007 16:23:39 -0000 2.100 +++ rpm/lib/rpmts.c 29 Sep 2007 17:06:25 -0000 2.101 @@ -3,9 +3,6 @@ * Routine(s) to handle a "rpmts" transaction sets. */ #include "system.h" -#if defined(HAVE_KEYUTILS_H) -#include <keyutils.h> -#endif #include "rpmio_internal.h" /* XXX for pgp and beecrypt */ #include <rpmlib.h> @@ -240,204 +237,6 @@ } /[EMAIL PROTECTED]@*/ -rpmRC rpmtsFindPubkey(rpmts ts, void * _dig) -{ - pgpDig dig = (_dig ? _dig : rpmtsDig(ts)); - const void * sig = pgpGetSig(dig); - pgpDigParams sigp = pgpGetSignature(dig); - pgpDigParams pubp = pgpGetPubkey(dig); - rpmRC res = RPMRC_NOKEY; - const char * pubkeysource = NULL; -#if defined(HAVE_KEYUTILS_H) - int krcache = 1; /* XXX assume pubkeys are cached in keyutils keyring. */ -#endif - int xx; - - if (sig == NULL || dig == NULL || sigp == NULL || pubp == NULL) - goto exit; - -#if 0 -fprintf(stderr, "==> find sig id %08x %08x ts pubkey id %08x %08x\n", -pgpGrab(sigp->signid, 4), pgpGrab(sigp->signid+4, 4), -pgpGrab(ts->pksignid, 4), pgpGrab(ts->pksignid+4, 4)); -#endif - - /* Lazy free of previous pubkey if pubkey does not match this signature. */ - if (memcmp(sigp->signid, ts->pksignid, sizeof(ts->pksignid))) { -#if 0 -fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, pgpGrab(ts->pksignid, 4), pgpGrab(ts->pksignid+4, 4)); -#endif - ts->pkpkt = _free(ts->pkpkt); - ts->pkpktlen = 0; - memset(ts->pksignid, 0, sizeof(ts->pksignid)); - } - -#if defined(HAVE_KEYUTILS_H) - /* Try keyutils keyring lookup. */ - if (krcache && ts->pkpkt == NULL) { - key_serial_t keyring = KEY_SPEC_PROCESS_KEYRING; - const char * krprefix = "rpm:gpg:pubkey:"; - char krfp[32]; - char * krn = alloca(strlen(krprefix) + sizeof("12345678")); - long key; - - snprintf(krfp, sizeof(krfp), "%08X", pgpGrab(sigp->signid+4, 4)); - krfp[sizeof(krfp)-1] = '\0'; - *krn = '\0'; - (void) stpcpy( stpcpy(krn, krprefix), krfp); - - key = keyctl_search(keyring, "user", krn, 0); - xx = keyctl_read(key, NULL, 0); - if (xx > 0) { - ts->pkpktlen = xx; - ts->pkpkt = NULL; - xx = keyctl_read_alloc(key, (void **)&ts->pkpkt); - if (xx > 0) { - pubkeysource = xstrdup(krn); - krcache = 0; /* XXX don't bother caching. */ - } else { - ts->pkpkt = _free(ts->pkpkt); - ts->pkpktlen = 0; - } - } - } -#endif - - /* Try rpmdb keyring lookup. */ - if (ts->pkpkt == NULL) { - int hx = -1; - int ix = -1; - rpmdbMatchIterator mi; - Header h; - - /* Retrieve the pubkey that matches the signature. */ - mi = rpmtsInitIterator(ts, RPMTAG_PUBKEYS, sigp->signid, sizeof(sigp->signid)); - while ((h = rpmdbNextIterator(mi)) != NULL) { - const char ** pubkeys; - int_32 pt, pc; - - if (!headerGetEntry(h, RPMTAG_PUBKEYS, &pt, &pubkeys, &pc)) - continue; - hx = rpmdbGetIteratorOffset(mi); - ix = rpmdbGetIteratorFileNum(mi); -/[EMAIL PROTECTED]@*/ - if (ix >= pc - || b64decode(pubkeys[ix], (void **) &ts->pkpkt, &ts->pkpktlen)) - ix = -1; -/[EMAIL PROTECTED]@*/ - pubkeys = headerFreeData(pubkeys, pt); - break; - } - mi = rpmdbFreeIterator(mi); - -/[EMAIL PROTECTED]@*/ - if (ix >= 0) { - char hnum[32]; - sprintf(hnum, "h#%d", hx); - pubkeysource = xstrdup(hnum); - } else { - ts->pkpkt = _free(ts->pkpkt); - ts->pkpktlen = 0; - } -/[EMAIL PROTECTED]@*/ - } - - /* Try keyserver lookup. */ - if (ts->pkpkt == NULL) { - const char * fn = rpmExpand("%{_hkp_keyserver_query}", - pgpHexStr(sigp->signid, sizeof(sigp->signid)), NULL); - - xx = 0; - if (fn && *fn != '%') { - xx = (pgpReadPkts(fn,&ts->pkpkt,&ts->pkpktlen) != PGPARMOR_PUBKEY); - } - fn = _free(fn); -/[EMAIL PROTECTED]@*/ - if (xx) { - ts->pkpkt = _free(ts->pkpkt); - ts->pkpktlen = 0; - } else { - /* Save new pubkey in local ts keyring for delayed import. */ - pubkeysource = xstrdup("keyserver"); - } -/[EMAIL PROTECTED]@*/ - } - -#ifdef NOTNOW - /* Try filename from macro lookup. */ - if (ts->pkpkt == NULL) { - const char * fn = rpmExpand("%{_gpg_pubkey}", NULL); - - xx = 0; - if (fn && *fn != '%') - xx = (pgpReadPkts(fn,&ts->pkpkt,&ts->pkpktlen) != PGPARMOR_PUBKEY); - fn = _free(fn); - if (xx) { - ts->pkpkt = _free(ts->pkpkt); - ts->pkpktlen = 0; - } else { - pubkeysource = xstrdup("macro"); - } - } -#endif - - /* Was a matching pubkey found? */ - if (ts->pkpkt == NULL || ts->pkpktlen == 0) - goto exit; - - /* Retrieve parameters from pubkey packet(s). */ - xx = pgpPrtPkts(ts->pkpkt, ts->pkpktlen, dig, 0); - - /* Do the parameters match the signature? */ - if (sigp->pubkey_algo == pubp->pubkey_algo -#ifdef NOTYET - && sigp->hash_algo == pubp->hash_algo -#endif - && !memcmp(sigp->signid, pubp->signid, sizeof(sigp->signid)) ) - { - - /* XXX Verify any pubkey signatures. */ - -#if defined(HAVE_KEYUTILS_H) - /* Save the pubkey in the keyutils keyring. */ - if (krcache) { - key_serial_t keyring = KEY_SPEC_PROCESS_KEYRING; - const char * krprefix = "rpm:gpg:pubkey:"; - char krfp[32]; - char * krn = alloca(strlen(krprefix) + sizeof("12345678")); - - snprintf(krfp, sizeof(krfp), "%08X", pgpGrab(sigp->signid+4, 4)); - krfp[sizeof(krfp)-1] = '\0'; - *krn = '\0'; - (void) stpcpy( stpcpy(krn, krprefix), krfp); - (void) add_key("user", krn, ts->pkpkt, ts->pkpktlen, keyring); - } -#endif - - /* Pubkey packet looks good, save the signer id. */ -/[EMAIL PROTECTED]@*/ - memcpy(ts->pksignid, pubp->signid, sizeof(ts->pksignid)); -/[EMAIL PROTECTED]@*/ - - if (pubkeysource) - rpmMessage(RPMMESS_DEBUG, "========== %s pubkey id %08x %08x (%s)\n", - (sigp->pubkey_algo == PGPPUBKEYALGO_DSA ? "DSA" : - (sigp->pubkey_algo == PGPPUBKEYALGO_RSA ? "RSA" : "???")), - pgpGrab(sigp->signid, 4), pgpGrab(sigp->signid+4, 4), - pubkeysource); - - res = RPMRC_OK; - } - -exit: - pubkeysource = _free(pubkeysource); - if (res != RPMRC_OK) { - ts->pkpkt = _free(ts->pkpkt); - ts->pkpktlen = 0; - } - return res; -} - int rpmtsCloseSDB(rpmts ts) { int rc = 0; @@ -715,21 +514,6 @@ return ps; } -#ifdef DYING -void rpmtsCleanDig(rpmts ts) -{ - if (ts && ts->dig) { - int opx; - opx = RPMTS_OP_DIGEST; - (void) rpmswAdd(rpmtsOp(ts, opx), pgpStatsAccumulator(ts->dig, opx)); - opx = RPMTS_OP_SIGNATURE; - (void) rpmswAdd(rpmtsOp(ts, opx), pgpStatsAccumulator(ts->dig, opx)); - (void) rpmtsSetSig(ts, 0, 0, NULL, 0); /* XXX headerFreeData */ - ts->dig = pgpFreeDig(ts->dig); - } -} -#endif - void rpmtsClean(rpmts ts) { rpmtsi pi; rpmte p; @@ -1103,38 +887,6 @@ return otid; } -#ifdef DYING -int rpmtsSetSig(rpmts ts, - int_32 sigtag, int_32 sigtype, const void * sig, int_32 siglen) -{ - int ret = 0; - if (ts != NULL) { - const void * osig = pgpGetSig(rpmtsDig(ts)); - int_32 osigtype = pgpGetSigtype(rpmtsDig(ts)); - if (osig && osigtype) - osig = headerFreeData(osig, osigtype); - ret = pgpSetSig(rpmtsDig(ts), sigtag, sigtype, sig, siglen); - } - return ret; -} - -pgpDig rpmtsDig(rpmts ts) -{ -/[EMAIL PROTECTED]@*/ /* FIX: hide lazy malloc for now */ - if (ts->dig == NULL) { - ts->dig = pgpNewDig(0); - (void) pgpSetFindPubkey(ts->dig, (int (*)(void *, void *))rpmtsFindPubkey, ts); - } -/[EMAIL PROTECTED]@*/ - return ts->dig; -} - -pgpDigParams rpmtsPubkey(const rpmts ts) -{ - return pgpGetPubkey(rpmtsDig(ts)); -} -#endif - rpmdb rpmtsGetRdb(rpmts ts) { rpmdb rdb = NULL; @@ -1511,17 +1263,6 @@ return (ts != NULL ? ts->prefcolor : 0); } -rpmop rpmtsOp(rpmts ts, rpmtsOpX opx) -{ - rpmop op = NULL; - - if (ts != NULL && opx >= 0 && opx < RPMTS_OP_MAX) - op = ts->ops + opx; -/[EMAIL PROTECTED] -compdef @*/ - return op; -/[EMAIL PROTECTED] =compdef @*/ -} - int rpmtsSetNotifyCallback(rpmts ts, rpmCallbackFunction notify, rpmCallbackData notifyData) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/librpmdb.vers ============================================================================ $ cvs diff -u -r1.17 -r1.18 librpmdb.vers --- rpm/rpmdb/librpmdb.vers 29 Sep 2007 16:23:40 -0000 1.17 +++ rpm/rpmdb/librpmdb.vers 29 Sep 2007 17:06:25 -0000 1.18 @@ -87,6 +87,8 @@ rpmTags; rpmtsCleanDig; rpmtsDig; + rpmtsFindPubkey; + rpmtsOp; rpmtsPubkey; rpmtsSetSig; sqlitevec; @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/pkgio.c ============================================================================ $ cvs diff -u -r1.6 -r1.7 pkgio.c --- rpm/rpmdb/pkgio.c 29 Sep 2007 16:23:40 -0000 1.6 +++ rpm/rpmdb/pkgio.c 29 Sep 2007 17:06:25 -0000 1.7 @@ -11,9 +11,16 @@ #include <netinet/in.h> +#if defined(HAVE_KEYUTILS_H) +#include <keyutils.h> +#endif + #include <rpmio_internal.h> #include <rpmlib.h> +#include <rpmdb.h> /* XXX rpmtsFindPubkey */ +#include <rpmmacro.h> + #define _RPMTS_INTERNAL #include "rpmts.h" @@ -29,17 +36,229 @@ /*===============================================*/ -void rpmtsCleanDig(rpmts ts) +rpmop rpmtsOp(rpmts ts, rpmtsOpX opx) { - if (ts && ts->dig) { - int opx; - opx = RPMTS_OP_DIGEST; - (void) rpmswAdd(rpmtsOp(ts, opx), pgpStatsAccumulator(ts->dig, opx)); - opx = RPMTS_OP_SIGNATURE; - (void) rpmswAdd(rpmtsOp(ts, opx), pgpStatsAccumulator(ts->dig, opx)); - (void) rpmtsSetSig(ts, 0, 0, NULL, 0); /* XXX headerFreeData */ - ts->dig = pgpFreeDig(ts->dig); + rpmop op = NULL; + + if (ts != NULL && opx >= 0 && opx < RPMTS_OP_MAX) + op = ts->ops + opx; +/[EMAIL PROTECTED] -compdef @*/ + return op; +/[EMAIL PROTECTED] =compdef @*/ +} + +pgpDigParams rpmtsPubkey(const rpmts ts) +{ + return pgpGetPubkey(rpmtsDig(ts)); +} + +rpmRC rpmtsFindPubkey(rpmts ts, void * _dig) +{ + pgpDig dig = (_dig ? _dig : rpmtsDig(ts)); + const void * sig = pgpGetSig(dig); + pgpDigParams sigp = pgpGetSignature(dig); + pgpDigParams pubp = pgpGetPubkey(dig); + rpmRC res = RPMRC_NOKEY; + const char * pubkeysource = NULL; +#if defined(HAVE_KEYUTILS_H) + int krcache = 1; /* XXX assume pubkeys are cached in keyutils keyring. */ +#endif + int xx; + + if (sig == NULL || dig == NULL || sigp == NULL || pubp == NULL) + goto exit; + +#if 0 +fprintf(stderr, "==> find sig id %08x %08x ts pubkey id %08x %08x\n", +pgpGrab(sigp->signid, 4), pgpGrab(sigp->signid+4, 4), +pgpGrab(ts->pksignid, 4), pgpGrab(ts->pksignid+4, 4)); +#endif + + /* Lazy free of previous pubkey if pubkey does not match this signature. */ + if (memcmp(sigp->signid, ts->pksignid, sizeof(ts->pksignid))) { +#if 0 +fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, pgpGrab(ts->pksignid, 4), pgpGrab(ts->pksignid+4, 4)); +#endif + ts->pkpkt = _free(ts->pkpkt); + ts->pkpktlen = 0; + memset(ts->pksignid, 0, sizeof(ts->pksignid)); + } + +#if defined(HAVE_KEYUTILS_H) + /* Try keyutils keyring lookup. */ + if (krcache && ts->pkpkt == NULL) { + key_serial_t keyring = KEY_SPEC_PROCESS_KEYRING; + const char * krprefix = "rpm:gpg:pubkey:"; + char krfp[32]; + char * krn = alloca(strlen(krprefix) + sizeof("12345678")); + long key; + + snprintf(krfp, sizeof(krfp), "%08X", pgpGrab(sigp->signid+4, 4)); + krfp[sizeof(krfp)-1] = '\0'; + *krn = '\0'; + (void) stpcpy( stpcpy(krn, krprefix), krfp); + + key = keyctl_search(keyring, "user", krn, 0); + xx = keyctl_read(key, NULL, 0); + if (xx > 0) { + ts->pkpktlen = xx; + ts->pkpkt = NULL; + xx = keyctl_read_alloc(key, (void **)&ts->pkpkt); + if (xx > 0) { + pubkeysource = xstrdup(krn); + krcache = 0; /* XXX don't bother caching. */ + } else { + ts->pkpkt = _free(ts->pkpkt); + ts->pkpktlen = 0; + } + } + } +#endif + + /* Try rpmdb keyring lookup. */ + if (ts->pkpkt == NULL) { + int hx = -1; + int ix = -1; + rpmdbMatchIterator mi; + Header h; + + /* Retrieve the pubkey that matches the signature. */ + mi = rpmtsInitIterator(ts, RPMTAG_PUBKEYS, sigp->signid, sizeof(sigp->signid)); + while ((h = rpmdbNextIterator(mi)) != NULL) { + const char ** pubkeys; + int_32 pt, pc; + + if (!headerGetEntry(h, RPMTAG_PUBKEYS, &pt, &pubkeys, &pc)) + continue; + hx = rpmdbGetIteratorOffset(mi); + ix = rpmdbGetIteratorFileNum(mi); +/[EMAIL PROTECTED]@*/ + if (ix >= pc + || b64decode(pubkeys[ix], (void **) &ts->pkpkt, &ts->pkpktlen)) + ix = -1; +/[EMAIL PROTECTED]@*/ + pubkeys = headerFreeData(pubkeys, pt); + break; + } + mi = rpmdbFreeIterator(mi); + +/[EMAIL PROTECTED]@*/ + if (ix >= 0) { + char hnum[32]; + sprintf(hnum, "h#%d", hx); + pubkeysource = xstrdup(hnum); + } else { + ts->pkpkt = _free(ts->pkpkt); + ts->pkpktlen = 0; + } +/[EMAIL PROTECTED]@*/ + } + + /* Try keyserver lookup. */ + if (ts->pkpkt == NULL) { + const char * fn = rpmExpand("%{_hkp_keyserver_query}", + pgpHexStr(sigp->signid, sizeof(sigp->signid)), NULL); + + xx = 0; + if (fn && *fn != '%') { + xx = (pgpReadPkts(fn,&ts->pkpkt,&ts->pkpktlen) != PGPARMOR_PUBKEY); + } + fn = _free(fn); +/[EMAIL PROTECTED]@*/ + if (xx) { + ts->pkpkt = _free(ts->pkpkt); + ts->pkpktlen = 0; + } else { + /* Save new pubkey in local ts keyring for delayed import. */ + pubkeysource = xstrdup("keyserver"); + } +/[EMAIL PROTECTED]@*/ + } + +#ifdef NOTNOW + /* Try filename from macro lookup. */ + if (ts->pkpkt == NULL) { + const char * fn = rpmExpand("%{_gpg_pubkey}", NULL); + + xx = 0; + if (fn && *fn != '%') + xx = (pgpReadPkts(fn,&ts->pkpkt,&ts->pkpktlen) != PGPARMOR_PUBKEY); + fn = _free(fn); + if (xx) { + ts->pkpkt = _free(ts->pkpkt); + ts->pkpktlen = 0; + } else { + pubkeysource = xstrdup("macro"); + } + } +#endif + + /* Was a matching pubkey found? */ + if (ts->pkpkt == NULL || ts->pkpktlen == 0) + goto exit; + + /* Retrieve parameters from pubkey packet(s). */ + xx = pgpPrtPkts(ts->pkpkt, ts->pkpktlen, dig, 0); + + /* Do the parameters match the signature? */ + if (sigp->pubkey_algo == pubp->pubkey_algo +#ifdef NOTYET + && sigp->hash_algo == pubp->hash_algo +#endif + && !memcmp(sigp->signid, pubp->signid, sizeof(sigp->signid)) ) + { + + /* XXX Verify any pubkey signatures. */ + +#if defined(HAVE_KEYUTILS_H) + /* Save the pubkey in the keyutils keyring. */ + if (krcache) { + key_serial_t keyring = KEY_SPEC_PROCESS_KEYRING; + const char * krprefix = "rpm:gpg:pubkey:"; + char krfp[32]; + char * krn = alloca(strlen(krprefix) + sizeof("12345678")); + + snprintf(krfp, sizeof(krfp), "%08X", pgpGrab(sigp->signid+4, 4)); + krfp[sizeof(krfp)-1] = '\0'; + *krn = '\0'; + (void) stpcpy( stpcpy(krn, krprefix), krfp); + (void) add_key("user", krn, ts->pkpkt, ts->pkpktlen, keyring); + } +#endif + + /* Pubkey packet looks good, save the signer id. */ +/[EMAIL PROTECTED]@*/ + memcpy(ts->pksignid, pubp->signid, sizeof(ts->pksignid)); +/[EMAIL PROTECTED]@*/ + + if (pubkeysource) + rpmMessage(RPMMESS_DEBUG, "========== %s pubkey id %08x %08x (%s)\n", + (sigp->pubkey_algo == PGPPUBKEYALGO_DSA ? "DSA" : + (sigp->pubkey_algo == PGPPUBKEYALGO_RSA ? "RSA" : "???")), + pgpGrab(sigp->signid, 4), pgpGrab(sigp->signid+4, 4), + pubkeysource); + + res = RPMRC_OK; } + +exit: + pubkeysource = _free(pubkeysource); + if (res != RPMRC_OK) { + ts->pkpkt = _free(ts->pkpkt); + ts->pkpktlen = 0; + } + return res; +} + +pgpDig rpmtsDig(rpmts ts) +{ +/[EMAIL PROTECTED]@*/ /* FIX: hide lazy malloc for now */ + if (ts->dig == NULL) { + ts->dig = pgpNewDig(0); + (void) pgpSetFindPubkey(ts->dig, (int (*)(void *, void *))rpmtsFindPubkey, ts); + } +/[EMAIL PROTECTED]@*/ + return ts->dig; } int rpmtsSetSig(rpmts ts, @@ -56,20 +275,17 @@ return ret; } -pgpDig rpmtsDig(rpmts ts) +void rpmtsCleanDig(rpmts ts) { -/[EMAIL PROTECTED]@*/ /* FIX: hide lazy malloc for now */ - if (ts->dig == NULL) { - ts->dig = pgpNewDig(0); - (void) pgpSetFindPubkey(ts->dig, (int (*)(void *, void *))rpmtsFindPubkey, ts); + if (ts && ts->dig) { + int opx; + opx = RPMTS_OP_DIGEST; + (void) rpmswAdd(rpmtsOp(ts, opx), pgpStatsAccumulator(ts->dig, opx)); + opx = RPMTS_OP_SIGNATURE; + (void) rpmswAdd(rpmtsOp(ts, opx), pgpStatsAccumulator(ts->dig, opx)); + (void) rpmtsSetSig(ts, 0, 0, NULL, 0); /* XXX headerFreeData */ + ts->dig = pgpFreeDig(ts->dig); } -/[EMAIL PROTECTED]@*/ - return ts->dig; -} - -pgpDigParams rpmtsPubkey(const rpmts ts) -{ - return pgpGetPubkey(rpmtsDig(ts)); } /*===============================================*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmdb.h ============================================================================ $ cvs diff -u -r1.64 -r1.65 rpmdb.h --- rpm/rpmdb/rpmdb.h 19 Aug 2007 21:12:23 -0000 1.64 +++ rpm/rpmdb/rpmdb.h 29 Sep 2007 17:06:25 -0000 1.65 @@ -839,11 +839,6 @@ /[EMAIL PROTECTED]@*/ -/** \ingroup rpmdb - */ -unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi) - /[EMAIL PROTECTED]/; - /** \ingroup dbi * Destroy set of index database items. * @param set set of index database items @@ -1030,7 +1025,7 @@ /[EMAIL PROTECTED] db, rpmGlobalMacroContext, fileSystem, internalState @*/; /** \ingroup rpmdb - * Return header join key for current position of rpm database iterator. + * Return header instance join key for current position of rpmdb iterator. * @param mi rpm database iterator * @return current header join key */ @@ -1038,6 +1033,13 @@ /[EMAIL PROTECTED]/; /** \ingroup rpmdb + * Return header tag index join key for current position of rpmdb iterator. + * @param mi rpm database iterator + */ +unsigned int rpmdbGetIteratorFileNum(rpmdbMatchIterator mi) + /[EMAIL PROTECTED]/; + +/** \ingroup rpmdb * Return number of elements in rpm database iterator. * @param mi rpm database iterator * @return number of elements @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/sqlite.c ============================================================================ $ cvs diff -u -r1.13 -r1.14 sqlite.c --- rpm/rpmdb/sqlite.c 1 Aug 2007 17:58:37 -0000 1.13 +++ rpm/rpmdb/sqlite.c 29 Sep 2007 17:06:25 -0000 1.14 @@ -988,7 +988,7 @@ if (dbi->dbi_perms) { if ((0644 /* = SQLite hard-coded default */ & dbi->dbi_perms) != dbi->dbi_perms) { /* add requested permission bits which are still missing (semantic) */ - chmod(dbfname, dbi->dbi_perms); + Chmod(dbfname, dbi->dbi_perms); } umask(umask_safed); } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org