]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
test/libsubid: update 01_list_ranges
authorPat Riehecky <riehecky@fnal.gov>
Fri, 13 Mar 2026 21:04:46 +0000 (16:04 -0500)
committerSerge Hallyn <serge@hallyn.com>
Mon, 30 Mar 2026 02:49:28 +0000 (21:49 -0500)
Now that user resolution is required, ensure a resolvable user is used.

Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
tests/libsubid/01_list_ranges/config/etc/subgid
tests/libsubid/01_list_ranges/config/etc/subuid
tests/libsubid/01_list_ranges/list_ranges.test

index b9495cfc2943825571b54e3a66e1553ae93f14c2..b2edf8aa96d3d6a8e6b6c64b643a950056dd837a 100644 (file)
@@ -1,2 +1,5 @@
-foo:200000:10000
+bin:190000:10000
+nobody:200000:10000
+65534:210000:10000
 root:500000:1000
+0:510000:1000
index e5c537be593a6ac937342cfc9e67e405889270fb..86e6b72f2df1d3deae02fd0ddca3ee0b5abc6e11 100644 (file)
@@ -1,3 +1,7 @@
-foo:300000:10000
-foo:400000:10000
+1000:100000:10000
+bin:190000:10000
+65534:200000:10000
+nobody:300000:10000
+nobody:400000:10000
 root:500000:1000
+0:510000:1000
index 37af12565aae6b06cd460c94e2d8c9af53d7675c..e0d9f09cd244d8cd420ac6638e0e924601776907 100755 (executable)
@@ -17,19 +17,21 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
 change_config
 
 echo -n "list foo's ranges..."
-${build_path}/src/getsubids foo > /tmp/subuidlistout
-${build_path}/src/getsubids -g foo > /tmp/subgidlistout
+${build_path}/src/getsubids nobody > /tmp/subuidlistout
+${build_path}/src/getsubids -g nobody > /tmp/subgidlistout
 echo "OK"
 
 echo -n "Check the subuid ranges..."
-[ $(wc -l /tmp/subuidlistout | awk '{ print $1 }') -eq 2 ]
-grep "0: foo 300000 10000" /tmp/subuidlistout
-grep "1: foo 400000 10000" /tmp/subuidlistout
+[ $(wc -l /tmp/subuidlistout | awk '{ print $1 }') -eq 3 ]
+grep "0: nobody 200000 10000" /tmp/subuidlistout
+grep "1: nobody 300000 10000" /tmp/subuidlistout
+grep "2: nobody 400000 10000" /tmp/subuidlistout
 echo "OK"
 
 echo -n "Check the subgid ranges..."
-[ $(wc -l /tmp/subgidlistout | awk '{ print $1 }') -eq 1 ]
-grep "0: foo 200000 10000" /tmp/subgidlistout
+[ $(wc -l /tmp/subgidlistout | awk '{ print $1 }') -eq 2 ]
+grep "0: nobody 200000 10000" /tmp/subgidlistout
+grep "1: nobody 210000 10000" /tmp/subgidlistout
 echo "OK"
 
 log_status "$0" "SUCCESS"