summaryrefslogtreecommitdiff
path: root/rpmkeys.c
Commit message (Collapse)AuthorAgeFilesLines
* Create transaction set only after initializing rpm itself, oopsPanu Matilainen2018-06-191-1/+2
| | | | | | | rpmkeys has been creating the transaction set prior to initializing rpm itself, meaning macros initialized in rpmtsCreate() get wrong values. With surprisingly little effect it seems... for current usages that is.
* Remove bunch of redundant environ declarationsPanu Matilainen2017-06-091-4/+0
| | | | | | | | | | | | | rpmsign.c used to actually use "environ" to pass to execve(), but that call moved to librpmsign a long, long time ago. rpmdb.c and rpmkeys.c never used it at all but guess it was copy-paste inherited from rpmsign.c back in the day (dfbaa77152ccf98524c4f27afe85d32e6f690522) rpmgensig.c actually refers to environ, but this is a POSIX required variable and while Apple has managed to screw it up, it's handled in system.h and that must be sufficient for all relevant systems as we also refer to environ in rpmfileutil.c open_dso() and there's no fake environ definition there. So drop the one in rpmgensig.c too.
* Reimplement setprogname() and getprogname() to be generic and portableKamil Rytarowski2016-02-111-1/+5
| | | | | | | | | | | | | | | | | The RPM code contains setprogname()/getprogname() support implemented through compatiblity layer with very old GLIBC (internals supported back to '95 and earlier), before stabilization of the GNU C library. This compatiblity layer (__progname, __assert_progname, setprogname()) is supposed to support well archaic GLIBC, but on the other hand it pollutes the library namespace and introduces unpredicable compillation errors on BSD systems. The functions setprogname() and getprogname() are natively supported in NetBSD and work the same way as __progname from the GNU C library (they are even implemented in the same way - but with a slightly changed logic). The support for very old (20 years and older) GNU C Library is obfuscating the code, because it uses defines over defines without a word of explaination why to do so. It's important to note that the setprogname()/getprogname() was inconstiently implemented in the codebase, duplicating the code and/or functionality. Add new generic functions getprogname() and setprogname() and bind it to: - the current and for two decades stable GNU LIB C implementation, - the current NetBSD implementation (introduces to NetBSD in 2002), - fallback reimplementation functions of the setprogname() and getprogname() functionality for other systems. Don't support anymore old GNU Lib C internals and don't support older NetBSD systems, as they aren't supported for many years. Add to the codebase comments explaining the relevant codeparts.
* Add --test option to rpmkeysPanu Matilainen2012-02-031-0/+5
| | | | | - Allows, well, testing whether a key could be imported before actually doing it
* Honor --root in rpmkeys tooPanu Matilainen2011-01-071-0/+2
|
* Rearrange new cli utilities' popt tables for nicer outputPanu Matilainen2010-11-151-3/+9
| | | | | - Use a separate table for the tool-specific options, include that from the "master" option table to get option group summary in --help.
* Add a brand new rpmkeys utility for keyring operationsPanu Matilainen2010-09-031-0/+76
- Keyring operations (adding/viewing/removing keys and verifying packages against a given keyring) are different from main rpm operations in that they only need access to the rpm keyring, and no write access anywhere else in the system. At the moment the rpm keyring happens to be the rpmdb but that's just an implementation detail that is likely to change sooner or later. Besides paving way to separating the rpm keyring from the rpmdb, splitting this to a small, separate utility allows limiting its required access from SELinux POV etc. - For now, this only implements what's already in rpm: --import and --checksig, remaining operations like listing and manipulating keyring contents is left as an exercise for another day...