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: 22-Aug-2007 21:09:16 Branch: HEAD Handle: 2007082220091501 Added files: rpm/rpmio tpw.c Modified files: rpm devtool.conf rpm/rpmio .cvsignore Makefile.am Log: add tpw.c program to exercise _Requestkey. Add --with-keyutils=external. Summary: Revision Changes Path 2.87 +1 -0 rpm/devtool.conf 1.16 +1 -0 rpm/rpmio/.cvsignore 1.105 +5 -2 rpm/rpmio/Makefile.am 1.1 +39 -0 rpm/rpmio/tpw.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/devtool.conf ============================================================================ $ cvs diff -u -r2.86 -r2.87 devtool.conf --- rpm/devtool.conf 9 Aug 2007 18:43:28 -0000 2.86 +++ rpm/devtool.conf 22 Aug 2007 19:09:15 -0000 2.87 @@ -76,6 +76,7 @@ --with-neon=external \ --with-bzip2=external \ --with-popt=external \ + --with-keyutils=external \ --with-libelf \ --with-selinux \ --with-python \ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/.cvsignore ============================================================================ $ cvs diff -u -r1.15 -r1.16 .cvsignore --- rpm/rpmio/.cvsignore 1 Aug 2007 19:03:01 -0000 1.15 +++ rpm/rpmio/.cvsignore 22 Aug 2007 19:09:16 -0000 1.16 @@ -18,6 +18,7 @@ tkey tmacro tmagic +tpw tput tring trpmio @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/Makefile.am ============================================================================ $ cvs diff -u -r1.104 -r1.105 Makefile.am --- rpm/rpmio/Makefile.am 1 Aug 2007 19:03:01 -0000 1.104 +++ rpm/rpmio/Makefile.am 22 Aug 2007 19:09:16 -0000 1.105 @@ -4,9 +4,9 @@ LINT = splint -EXTRA_DIST = tax.c tdir.c tfts.c tget.c thkp.c tput.c tglob.c tinv.c tkey.c trpmio.c lookup3.c librpmio.vers +EXTRA_DIST = tax.c tdir.c tfts.c tget.c thkp.c tput.c tglob.c tinv.c tkey.c trpmio.c lookup3.c tpw.c librpmio.vers -EXTRA_PROGRAMS = tax tdir tfts tget thkp tmacro tput tglob tinv tkey tmagic trpmio tsw dumpasn1 lookup3 +EXTRA_PROGRAMS = tax tdir tfts tget thkp tmacro tput tglob tinv tkey tmagic trpmio tsw dumpasn1 lookup3 tpw AM_CPPFLAGS = \ -I$(srcdir) \ @@ -134,6 +134,9 @@ trpmio_SOURCES = trpmio.c trpmio_LDADD = $(RPM_LDADD) +tpw_SOURCES = tpw.c +tpw_LDFLAGS = $(RPM_LDADD) + tsw_SOURCES = tsw.c tsw_LDFLAGS = $(RPM_LDADD) @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/tpw.c ============================================================================ $ cvs diff -u -r0 -r1.1 tpw.c --- /dev/null 2007-08-22 21:00:06 +0200 +++ tpw.c 2007-08-22 21:09:16 +0200 @@ -0,0 +1,39 @@ +/** + * \file rpmio/rpmkey.c + */ + +#include "system.h" +#include <rpmio.h> +#include <rpmcli.h> +#include "debug.h" + +static int _debug = 0; + +static struct poptOption optionsTable[] = { + { "debug", 'd', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_debug, 1, + NULL, NULL }, + + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, + N_("Common options for all rpm modes and executables:"), + NULL }, + + POPT_AUTOALIAS + POPT_AUTOHELP + POPT_TABLEEND +}; + +int +main(int argc, char *const argv[]) +{ + poptContext optCon = rpmcliInit(argc, argv, optionsTable); + const char * prompt = "Enter pass phrase: "; + int ret = 0; + + if (optCon == NULL) + exit(EXIT_FAILURE); + + fprintf(stderr, "password %s\n", _RequestPass(prompt)); + + optCon = rpmcliFini(optCon); + return ret; +} @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org