diff --git a/man/Makefile.am b/man/Makefile.am
index f0f5c44b..e9cab28a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -62,6 +62,7 @@ man_MANS += $(man_nopam)
endif
man_subids = \
+ man1/getsubids.1 \
man1/newgidmap.1 \
man1/newuidmap.1 \
man5/subgid.5 \
@@ -80,6 +81,7 @@ man_XMANS = \
expiry.1.xml \
faillog.5.xml \
faillog.8.xml \
+ getsubids.1.xml \
gpasswd.1.xml \
groupadd.8.xml \
groupdel.8.xml \
diff --git a/man/getsubids.1.xml b/man/getsubids.1.xml
new file mode 100644
index 00000000..200ed35f
--- /dev/null
+++ b/man/getsubids.1.xml
@@ -0,0 +1,141 @@
+
+
+
+]>
+
+
+
+
+ Iker
+ Pedrosa
+ Creation, 2021
+
+
+
+ getsubids
+ 1
+ User Commands
+ shadow-utils
+ &SHADOW_UTILS_VERSION;
+
+
+ getsubids
+ get the subordinate id ranges for a user
+
+
+
+
+ getsubids
+
+ options
+
+
+ USER
+
+
+
+
+
+ DESCRIPTION
+
+ The getsubids command lists the subordinate user ID
+ ranges for a given user. The subordinate group IDs can be listed using
+ the option.
+
+
+
+
+ OPTIONS
+
+ The options which apply to the getsubids command are:
+
+
+
+
+
+
+
+
+ List the subordinate group ID ranges.
+
+
+
+
+
+
+
+ EXAMPLE
+
+ For example, to obtain the subordinate UIDs of the testuser:
+
+
+
+$ getsubids testuser
+0: testuser 100000 65536
+
+
+
+ This command output provides (in order from left to right) the list
+ index, username, UID range start, and number of UIDs in range.
+
+
+
+
+ SEE ALSO
+
+
+ login.defs5
+ ,
+
+ newgidmap1
+ ,
+
+ newuidmap1
+ ,
+
+ subgid5
+ ,
+
+ subuid5
+ ,
+
+ useradd8
+ ,
+
+ userdel8
+ .
+
+ usermod8
+ ,
+
+
+
diff --git a/src/.gitignore b/src/.gitignore
index 24d832bc..5fffda77 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -34,7 +34,7 @@
/usermod
/vipw
/get_subid_owners
-/list_subid_ranges
+/getsubids
/new_subid_range
/free_subid_range
/check_subid_range
diff --git a/src/Makefile.am b/src/Makefile.am
index 6cc873be..a1a2e4e3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -158,8 +158,8 @@ if FCAPS
setcap cap_setgid+ep $(DESTDIR)$(ubindir)/newgidmap
endif
-noinst_PROGRAMS += list_subid_ranges \
- get_subid_owners \
+bin_PROGRAMS += getsubids
+noinst_PROGRAMS += get_subid_owners \
new_subid_range \
free_subid_range \
check_subid_range
@@ -175,13 +175,13 @@ MISCLIBS = \
$(LIBCRYPT) \
$(LIBTCB)
-list_subid_ranges_LDADD = \
+getsubids_LDADD = \
$(top_builddir)/lib/libshadow.la \
$(top_builddir)/libmisc/libmisc.la \
$(top_builddir)/libsubid/libsubid.la \
$(MISCLIBS) -ldl
-list_subid_ranges_CPPFLAGS = \
+getsubids_CPPFLAGS = \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/libmisc \
-I$(top_srcdir) \
diff --git a/src/list_subid_ranges.c b/src/getsubids.c
similarity index 95%
rename from src/list_subid_ranges.c
rename to src/getsubids.c
index f649a002..109b22bc 100644
--- a/src/list_subid_ranges.c
+++ b/src/getsubids.c
@@ -1,6 +1,7 @@
#include
+#include
+#include
#include "subid.h"
-#include "stdlib.h"
#include "prototypes.h"
const char *Prog;
diff --git a/tests/libsubid/01_list_ranges/list_ranges.test b/tests/libsubid/01_list_ranges/list_ranges.test
index b131303b..37af1256 100755
--- a/tests/libsubid/01_list_ranges/list_ranges.test
+++ b/tests/libsubid/01_list_ranges/list_ranges.test
@@ -17,8 +17,8 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
change_config
echo -n "list foo's ranges..."
-${build_path}/src/list_subid_ranges foo > /tmp/subuidlistout
-${build_path}/src/list_subid_ranges -g foo > /tmp/subgidlistout
+${build_path}/src/getsubids foo > /tmp/subuidlistout
+${build_path}/src/getsubids -g foo > /tmp/subgidlistout
echo "OK"
echo -n "Check the subuid ranges..."