summaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2012-10-11Eliminate now unnecessary WITH_SELINUX conditionals in sepolicy pluginPanu Matilainen1-22/+3
2012-10-11Only try compiling sepolicy plugin if selinux is enabledPanu Matilainen1-1/+4
2012-01-12remove the 'path' parameter of rpmtsSELabelInit()Ales Kozumplik1-1/+1
- It is always selinux_file_context_path() anyway.
2012-01-12selinux: reopen label between transactions if necessary (RhBug: 746073)Ales Kozumplik1-1/+1
2011-11-09Make base64 encoding/decoding part of rpmio public APIPanu Matilainen1-2/+2
- Base64 is present in headers and all, it's only reasonable that our API users have access to this functionality without having to link to other libraries. Even if we didn't want to carry the implementation forever in our codebase, we should provide a wrapping for this (much like the other crypto stuff) for the reason stated above. - A bigger issue is that our dirty little (badly hidden) secret was using non-namespaced function names, clashing with at least beecrypt. And we couldn't have made these internal-only symbols even on platforms that support it, because they are used all over the place outside rpmio. So... rename the b64 functions to rpmLikeNamingStyle and make 'em public. No functional changes, just trivial renaming despite touching numerous places.
2011-09-01Fix up one strict-prototype warning that has crept in meantimePanu Matilainen1-1/+1
2011-05-30Remove trailing dead NULL-assignments from sepoltransFree()Panu Matilainen1-2/+3
- Replace assignments with a memset() to blast away the contents instead, taking care of other members too
2011-05-30Minor cleanups to sepolLoadPolicies() in sepolicy pluginPanu Matilainen1-14/+7
- Having an err label which we fall through on success too seems a bit funny, rename the label to exit - Initialize the sepoltrans at declaration already - Remove redundant RPMRC_FAIL assignment on sepoltransNew() fail case, this already assumes failure - Remove redundant jump to exit from sepoltransCommit() error - Eliminate trailing dead NULL assignment of the local pt variable
2011-05-30Return explicit NULL on sepoltransNew() failurePanu Matilainen1-2/+2
2010-12-22Only sepolicy-plugin needs linking to libsemanagePanu Matilainen1-1/+1
2010-12-21Move rpmtsSELabelFoo() functions to an internal-only headerPanu Matilainen1-0/+1
- The sepolicy plugin needs them so the symbols can't be hidden, but these are not something external API-users should be messing with. - Ultimately we'll want to push the actual labeling from FSM to the plugin, insulating rpm from all SELinux specifics, this is just a band-aid temporary "solution" to keep this out of the API.
2010-10-12Move plugins out of rpm config directoryPanu Matilainen1-1/+1
- Plugins are by their very nature arch specific, while /usr/lib/rpm is a hodgepodge of all sorts of ... stuff, most of which is arch-independent and all. Use %{_libdir}/rpm-plugins to cleanly differentiate 32 vs 64bit plugin paths
2010-09-21Fix up bunch of silly int vs rpmRC return code mismatchesPanu Matilainen2-3/+3
2010-09-01Add SELinux policy pluginSteve Lawrence2-1/+684
This adds a new plugin specifically for a collection to load SELinux policy. This implements the post_add and pre_remove plugin hooks. The only time anything happens during the pre_remove hook is if post_add was not called (i.e. if the transaction only removes policies). This plugin extracts all the policy information from packages in the sepolicy collection during the open te hook. It then determines which policies should be installed/removed based on if the package is being installed/removed and the type of the policy and the system policy. It then executes semodule (or uses libsemanage if semodule cannot be executed or installing in a chroot) to remove and install the necessary policies. It then reloads the selinux state, reloads the file contexts, and if necessary, relabels the file system.
2010-09-01Update the plugin architecture to allow for remembering stateSteve Lawrence4-18/+40
This moves most of the plugin logic to a new rpmplugins file with a struct and functions for managing plugins, allowing for plugins to carry state. This also adds init and cleanup hooks for plugins to initialize and cleanup their state, and a new 'open te' hook allowing plugins to read and save information from transaction elements. This also generalizes the plugin architecture a bit so it isn't so specific to collections.
2010-06-23Make rpmChrootIn/Out() accessible to pluginsPanu Matilainen1-1/+1
- the exec plugin was using a private copy of rpmchroot.c to avoid RPM_GNUC_INTERNAL on the API, better let the plugins use librpm state instead - the chroot API really belongs to librpmio but for now...
2010-06-22Add a generic plugin for use by simple CollectionsSteve Lawrence3-0/+63
This patch adds a generic plugin, exec.so, that should be sufficient for the majority of Collection actions. After all packages in a Collection have been installed/removed, this plugin executes the arguments by calling system(3), allowing for a very generic and powerful method to perform many actions. This also adds two sample macros as examples of the format, using the exec.so plugin.