summaryrefslogtreecommitdiff
path: root/system.h
AgeCommit message (Collapse)AuthorFilesLines
2013-01-29Acommodate to glibc 2.17 __secure_getenv() renamingPanu Matilainen1-1/+3
- glibc 2.17 renames __secure_getenv() to secure_getenv() so now we need to test for both. Meh. (cherry picked from commit 49519f2564777fdcfb801088fb3025b3d6f5783a)
2012-05-31Bury our glob() implementation entirely inside rpmglob.c (RhBug:819680)Panu Matilainen1-11/+0
- Lump glob.h and glob.c into rpmglob.c in all their g(l)ory libc decorations and make everything static to stop overriding system library symbols with our own glob().
2012-01-12selinux: reopen label between transactions if necessary (RhBug: 746073)Ales Kozumplik1-0/+1
2010-09-01Use selabel interfaces instead of matchpathconSteve Lawrence1-0/+5
This replaces the old matchpathcon interfaces with the new selabel interfaces for relabeling files, storing an selabel handle in the transaction set. With this change, also comes an added distinction between --nocontexts being specified and a failure to read the load file contexts. Previously, there was no distinction, and both cases used the RPMTRANS_FLAG_NOCONTEXTS flag. However, with the new policy plugin, it is necessary to make such a distinction. This is because matchpathcon_init (now selabel interfaces) can fail at the beginning of the transaction, but succeed later after new policy is installed. Because of this, we may need to enable/disable RPMTRANS_FLAG_NOCONTEXTS multiple times. However, because this flag could also mean --nocontexts, we cannot do that. By storing the selabel handle in the rpmts, we can easily keep track if the handle has been successfully created, rather than overloading RPMTRANS_FLAG_NOCONTEXTS with two meanings.
2010-06-22Add plugin calling supportSteve Lawrence1-0/+2
This patch adds a simple plugin system that makes simple problems easy to solve, and difficult problems, such as SELinux, possible. When the transaction gets to the point where a collection action should occur, it expands a macro of the form %__collection_<collection name> to get the path to a plugin and any additional options. The plugin is dlopen'ed, and the appropriate function is called in the plugin, with the additional arguments passed in. This also adds a --nocollections option to disable performing Collection actions.
2010-01-05Move <stdio.h> includes out of system.h to the places that need itPanu Matilainen1-2/+0
2010-01-05Lose <sys/types.h> and <sys/stat.h> includes from system.hPanu Matilainen1-3/+0
- these seem to be already included where needed through rpm's public header needs
2010-01-05Move <ctype.h> include out of system.h to the places that need itPanu Matilainen1-2/+0
2010-01-05Move <errno.h> include out of system.h to the places that need itPanu Matilainen1-5/+0
2010-01-05Remove <string.h> include from system.h into the few places that still needPanu Matilainen1-4/+0
- most of the places get it through <rpm/rpmstring.h> already
2010-01-05Loose string header compatibility gooPanu Matilainen1-9/+0
- <string.h> is required by C standard, we dont support ancient non-conformant compilers anyway
2010-01-05Include <stdlib.h> as necessary instead of system.hPanu Matilainen1-14/+0
- also loose the related ancient compatibility goo
2010-01-05Shove the mount entry include voodoo where sun doesn't ... <cough> fs.cPanu Matilainen1-51/+0
2010-01-05Remove unnecessary NLS definitions from system.hPanu Matilainen1-14/+1
- all uses of dgettext() and friends are already protected by appropriate ifdef's, no need to provide dummy defines here - setlocale() and <locale.h> are required by C89, C99 and POSIX .. assume its there and if not, one can disable the whole thing with --disable-nls
2010-01-05Remove libcap stuff out of system.hPanu Matilainen1-6/+0
- just a few places need, avoid polluting everything with it - make fsm->fcaps void * to avoid having to deal with fcap_t not defined
2010-01-05Remove unused selinux dummy definesPanu Matilainen1-7/+0
2010-01-05Move <mcheck.h> include out of system.h to the couple of places that carePanu Matilainen1-4/+0
- only two real users inside rpm - remove mcheck foo from rpminject and rpmsort, we're not interested...
2010-01-05Unconditionally include <sys/wait.h> where neededPanu Matilainen1-4/+0
- no point conditionalizing what we cant live without
2010-01-05Move sys/mman.h include out of system.h to the places that carePanu Matilainen1-4/+0
- just two places where needed, dont pollute system.h needlessly - include depending on HAVE_MMAP instead of separately checking for sys/mman.h, if sys/mman.h doesn't exist or is broken HAVE_MMAP wont be set
2010-01-05Move libacl.h include out of system.h to the only place that caresPanu Matilainen1-4/+0
2010-01-05Eliminate SEEK_FOO and [RWXF]_OK definitions from system.hPanu Matilainen1-12/+0
- systems not defining these constants are broken beyond our caring
2010-01-05Remove unnecessary and broken time.h related configure + system.h checksPanu Matilainen1-11/+0
- the AC_HEADER_TIME check is unnecessary for any remotely recent systems, and the HAVE_SYS_TIME_H conditional in system.h is just broken as we dont even check for <sys/time.h> header in configure - dont include from system.h, the time.h and sys/time.h get already included through our public headers where necessary
2010-01-05Unconditionally include <netdb.h> where needed instead of system.hPanu Matilainen1-4/+0
- there's no fallback for missing netdb.h so there's little point conditionalizing it - avoid yet more system.h pollution
2010-01-04Clean up poll() vs select() testsPanu Matilainen1-8/+0
- move the includes out of system.h, not commonly needed - <poll.h> is conditional as we actually provide a fallback through select(), but for <sys/select.h> missing there's no fallback so doesn't make much sense to test for (and both poll.h and sys/select.h are posix anyway...)
2010-01-04Remove S_IFSOCK and S_IFLNK kludgery for ancient unixesPanu Matilainen1-12/+0
- these are specified by POSIX 2001, it's not really rpm's job to provide them if the system doesn't
2010-01-04Require lchown() and remove ancient broken chown kludgeryPanu Matilainen1-4/+0
- lchown() is POSIX 2001, we dont care about older / nonconformant stuff
2010-01-04Remove further replacement functions for POSIX 2001 required bitsPanu Matilainen1-3/+0
- getwd(), getcwd(), basename() and realpath() are all POSIX 2001 defined, we dont care about older stuff
2010-01-04Remove unnecessary setenv() replacement functionPanu Matilainen1-5/+0
- setenv() and unsetenv() are required by POSIX 2001, we dont care about older systems
2009-12-23Include <utime.h> where needed instead of system.hPanu Matilainen1-4/+0
- include unconditionally as we dont try to deal with utime() missing
2009-12-23Move major, minor + makedev portability stuff out of system.h, simplifyPanu Matilainen1-20/+0
- only cpio.c needs, move it there - if none of the standard headers define these, its not our headache anymore
2009-12-23Move getopt() portability fiddles out of system.hPanu Matilainen1-4/+0
- only macro.c needs, no point polluting includes everywhere
2009-12-23Dont include <pwd.h> from system.h, dont bother checking for it eitherPanu Matilainen1-4/+0
- no much point conditionalizing something we can't live without - just three places need, no point polluting include space everywhere
2009-12-23Dont bother including <sys/socket.h>, we dont use anything from therePanu Matilainen1-5/+0
2009-12-23Dont bother including <err.h>, we dont use anything from therePanu Matilainen1-4/+0
2009-12-23Only rpmrc.c cares about utsname.h, move out of system.hPanu Matilainen1-4/+0
2009-12-23Dont include grp.h from system.h, dont bother checking in configure eitherPanu Matilainen1-4/+0
- no much point conditionalizing something we can't live without - just two places need, no point polluting include space everywhere
2009-12-23Dont bother checking and including a header we dont use or needPanu Matilainen1-4/+0
2009-12-23Move malloc portability tweaks out of system.hPanu Matilainen1-9/+0
- only rpmmalloc.c needs, no need to pollute system.h
2009-12-23We dont use memchr() anywherePanu Matilainen1-1/+0
2009-12-23Move getpass() portability tweaks out of system.hPanu Matilainen1-5/+0
- only signature.c needs, no need to pollute system.h
2009-12-23Dont bother checking for a header we dont usePanu Matilainen1-5/+0
2009-12-23Dont bother checking for functions we dont usePanu Matilainen1-1/+1
- some of this stuff was used in 4.4.x but not anymore - additionally we dont even use getdomainnname(), check for gethostname() instead
2009-12-22Kill off last remaining uses of _constfree()Panu Matilainen1-1/+0
- practially all the data in rpmfi needs to be treated as const, these are just a funky special case which point to header memory for the couple of cases where KEEPHEADER is still used
2009-09-17Always use build + use our own allocator functionsPanu Matilainen1-56/+9
- Consistent across platforms and will allow some things macros dont and memory checkers these days are smart enough to get decent output anyway - Minimal namespacing with r-prefix, add compatibility macros to system.h for now so we dont have to change the entire codebase for this - Also make rpmutil.h where the declarations and gcc __attribute__ macros are available everywhere
2008-11-03Ensure PATH_MAX is defined (ticket #3) Adam TkacPanu Matilainen1-0/+10
- POSIX doesn't require PATH_MAX to be defined as constant, and Hurd doesn't define it... - deal with it just once in system.h for now, the proper fix is to get rid of needing it at all (ie add a mallocing realpath() clone to librpmio) - patch from Adam Tkac
2008-10-29Add fsm and rpmfi machinery for file capabilitiesPanu Matilainen1-0/+2
- new rpmfiFCaps() API to retrieve the info from rpmfi set - fsm internals quite similar to selinux handling - plenty of #ifdef's, another possibility would be adding cap_foo dummies to system.h like for selinux
2008-10-26Beginnings of acl (POSIX.1e draft 17) verification supportPanu Matilainen1-0/+4
- if built with --with-acl, check that files and directories don't have any extra acl's set - for now, any acl beyond the regular unix permission set is reported as file mode difference as the acl's cannot have been set by rpm itself - patch from Andreas Gruenbacher, modified to use libacl instead of raw xattrs for portability, BUT atm this uses non-portable acl_equiv_mode() Linux libacl extension, the posix draft doesn't seem to have much in the way of comparing entries :-/
2008-10-26Beginnings of file capability (POSIX.1e draft 15) verification supportPanu Matilainen1-0/+4
- add minimal bits and pieces to check for capabilities in files on verify - for now, any capability set is a verification failure as the capability cannot have been set by rpm itself - patch from Andreas Gruenbacher, modified to use libcap instead of raw xattrs for portability
2008-10-24Remove timezone autoconf checks and system.h referenceJindrich Novy1-4/+0
- timezone is no more used so it's no more needed
2008-05-08is_selinux_enabled() returns 0 if not enabled, not -1Panu Matilainen1-1/+1