]> git.ipfire.org Git - thirdparty/shadow.git/commit
Create a new libsubid 250/head
authorSerge Hallyn <serge@hallyn.com>
Sat, 18 Apr 2020 23:03:54 +0000 (18:03 -0500)
committerSerge Hallyn <serge@hallyn.com>
Sun, 7 Jun 2020 17:11:58 +0000 (12:11 -0500)
commit0a7888b1fad613a052b988b01a71933b67296e68
tree3aac859601d010e9d5a700f7bb1d8d91d7c74f48
parent43a917cce54019799a8de037fd63780a2b640afc
Create a new libsubid

Closes #154

Currently this has three functions: one which returns the
list of subuid ranges for a user, one returning the subgids,
and one which frees the ranges lists.

I might be mistaken about what -disable-man means;  some of
the code suggests it means just don't re-generate them, but
not totally ignore them.  But that doesn't seem to really work,
so let's just ignore man/ when -disable-man.

Remove --disable-shared.  I'm not sure why it was there, but it stems
from long, long ago, and I suspect it comes from some ancient
toolchain bug.

Create a tests/run_some, a shorter version of run_all.  I'll
slowly add tests to this as I verify they work, then I can
work on fixing the once which don't.

Also, don't touch man/ if not -enable-man.

Changelog:
Apr 22: change the subid list api as recomended by Dan Walsh.
Apr 23: implement get_subid_owner
Apr 24: implement range add/release
Apr 25: finish tests and rebase
May 10: make @owner const

Signed-off-by: Serge Hallyn <serge@hallyn.com>
31 files changed:
.travis.yml
Makefile.am
autogen.sh
configure.ac
lib/subordinateio.c
lib/subordinateio.h
libsubid/Makefile.am [new file with mode: 0644]
libsubid/api.c [new file with mode: 0644]
libsubid/api.h [new file with mode: 0644]
libsubid/subid.h [new file with mode: 0644]
src/.gitignore
src/Makefile.am
src/free_subid_range.c [new file with mode: 0644]
src/get_subid_owners.c [new file with mode: 0644]
src/list_subid_ranges.c [new file with mode: 0644]
src/new_subid_range.c [new file with mode: 0644]
tests/libsubid/01_list_ranges/config.txt [new file with mode: 0644]
tests/libsubid/01_list_ranges/config/etc/subgid [new file with mode: 0644]
tests/libsubid/01_list_ranges/config/etc/subuid [new file with mode: 0644]
tests/libsubid/01_list_ranges/list_ranges.test [new file with mode: 0755]
tests/libsubid/02_get_subid_owners/config.txt [new file with mode: 0644]
tests/libsubid/02_get_subid_owners/config/etc/passwd [new file with mode: 0644]
tests/libsubid/02_get_subid_owners/config/etc/subgid [new file with mode: 0644]
tests/libsubid/02_get_subid_owners/config/etc/subuid [new file with mode: 0644]
tests/libsubid/02_get_subid_owners/get_subid_owners.test [new file with mode: 0755]
tests/libsubid/03_add_remove/add_remove_subids.test [new file with mode: 0755]
tests/libsubid/03_add_remove/config.txt [new file with mode: 0644]
tests/libsubid/03_add_remove/config/etc/passwd [new file with mode: 0644]
tests/libsubid/03_add_remove/config/etc/subgid [new file with mode: 0644]
tests/libsubid/03_add_remove/config/etc/subuid [new file with mode: 0644]
tests/run_some [new file with mode: 0755]