mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00
Add support for libsubid
This will enable remote access to /etc/subuid and /etc/subgid information from ldap services, if shadow-utils ships with a libsubid. [NO TESTS NEEDED] Since we have no way to test this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
1
Makefile
1
Makefile
@ -50,6 +50,7 @@ BUILDTAGS ?= \
|
|||||||
$(shell hack/btrfs_tag.sh) \
|
$(shell hack/btrfs_tag.sh) \
|
||||||
$(shell hack/selinux_tag.sh) \
|
$(shell hack/selinux_tag.sh) \
|
||||||
$(shell hack/systemd_tag.sh) \
|
$(shell hack/systemd_tag.sh) \
|
||||||
|
$(shell hack/libsubid_tag.sh) \
|
||||||
exclude_graphdriver_devicemapper \
|
exclude_graphdriver_devicemapper \
|
||||||
seccomp
|
seccomp
|
||||||
PYTHON ?= $(shell command -v python3 python|head -n1)
|
PYTHON ?= $(shell command -v python3 python|head -n1)
|
||||||
|
19
hack/libsubid_tag.sh
Executable file
19
hack/libsubid_tag.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
if test $(${GO:-go} env GOOS) != "linux" ; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
tmpdir="$PWD/tmp.$RANDOM"
|
||||||
|
mkdir -p "$tmpdir"
|
||||||
|
trap 'rm -fr "$tmpdir"' EXIT
|
||||||
|
cc -o "$tmpdir"/libsubid_tag -l subid -x c - > /dev/null 2> /dev/null << EOF
|
||||||
|
#include <shadow/subid.h>
|
||||||
|
int main() {
|
||||||
|
struct subid_range *ranges = NULL;
|
||||||
|
get_subuid_ranges("root", &ranges);
|
||||||
|
free(ranges);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
if test $? -eq 0 ; then
|
||||||
|
echo libsubid
|
||||||
|
fi
|
Reference in New Issue
Block a user