aboutsummaryrefslogtreecommitdiffstats
path: root/ports/linux/portdefs.h
AgeCommit message (Collapse)Author
2021-02-05linux/portdefs.h: Fix pseudo to work with glibc 2.33Richard Purdie
In glibc 2.33, they've removed the _STAT_VER and _MKNOD_VER definitions from public headers. They have no plans to add these back so pseudo needs to attempt its own definitions. There is some protection as if they were wrong and there was a mismatch, we'd get an error art runtime. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-26Pseudo changes the syscall access patterns which makes it incompatible withRichard Purdie
seccomp. Therefore intercept the seccomp syscall and alter it, pretending that seccomp was setup when in fact we do nothing. If we error as unsupported, utilities like file will exit with errors so we can't just disable it. Also, it fails to compile pseudo-native on centos 7: | ports/linux/pseudo_wrappers.c: In function ‘prctl’: | ports/linux/pseudo_wrappers.c:129:14: error: ‘SECCOMP_SET_MODE_FILTER’ undeclared (first use in this function) | if (cmd == SECCOMP_SET_MODE_FILTER) { | ^ Add macro guard for seccomp to avoid the failure. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-15Add SPDX-License-Identifier: LGPL-2.1-only to filesRichard Purdie
This adds SPDX license headers to all source files in pseudo so license identification models current best practise. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-29Experimental syscall(2) wrapper.Seebs
This wrapper should allow us to reject renameat2 attempts by coreutils, letting us regain functionality on FC27 and related systems. This is not safe/portable/etc even by pseudo's standards, and arguably it should be a separate and optional port. [Amended commit: Don't include the dodgy renameat2 wrapper which it turns out we'd never hit anyway.] Signed-off-by: Seebs <seebs@seebs.net>
2016-12-12The setcap utility supplied by libcap is used to set capabilities on aSeebs
file. Before setting a file's capabilities with cap_set_file() (which uses setxattr()) it calls cap_set_flag(mycaps, CAP_EFFECTIVE, 1, &capflag, CAP_SET). cap_set_flag() uses the capset syscall to raise the process' effective capability. In most cases if the process isn't running as root this will fail and setcap will exit with an error. Because setxattr is intercepted by pseudo it's unnecessary for setcap to call capset(). Override capset with a pseudo function that does nothing and always returns 0. Signed-off-by: George McCollister <george.mccollister at gmail.com> Signed-off-by: Seebs <seebs@seebs.net>
2016-10-29Experimentally try to make x32 workSeebs
x32 compilation fails because x32 defines __amd64__ and thus pseudo tries to grab a version of memcpy that's useful for amd64, and this isn't available. Try disabling that, see what happens. Signed-off-by: Seebs <seebs@seebs.net>
2014-07-17linux/portdefs.h: fix non-x86 buildPeter Seebach
The assumption that a host is either x86_64 or x86_32 does not hold well on target systems.
2014-07-11symbol version tweakspseudo-1.6.0PSEUDO_1_6_0Peter Seebach
We don't want to pick up newer memcpy because pseudo sometimes has to run host binaries even when built against a newer libc.
2012-12-12add linkat() implementationPeter Seebach
We never had an implementation for linkat() because no one used it; now someone uses it. link() is now implemented on top of linkat(). Note the abnormal AT_SYMLINK_FOLLOW (as opposed to _NOFOLLOW) flag.
2011-03-25Merge in ports workPeter Seebach
This is a spiffied-up rebase of a bunch of intermediate changes, presented as a whole because it is, surprisingly, less confusing that way. The basic idea is to separate the guts code into categories ranging from generic stuff that can be the same everywhere and specific variants. The big scary one is the Darwin support, which actually seems to run okay on 64-bit OS X 10.6. (No other variants were tested.) The other example given is support for the old clone() syscall on RHEL 4, which affects some wrlinux use cases. There's a few minor cleanup bits here, such as a function with inconsistent calling conventions, but nothing really exciting.