base-files: fix uid/gid auto-enumeration to avoid 16-bit limit
authorThomas Winkler <tewinkler86@gmail.com>
Fri, 10 Nov 2023 21:48:59 +0000 (22:48 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 10 May 2024 20:39:57 +0000 (22:39 +0200)
commit140b48a9e93909873bee777ca5bdf49fe4f01271
treefac96df6ed46a3bbb435bce8a2e7dfd12943d338
parent72cdba7b1a5a573d6b34c8fe462788ee9c951f99
base-files: fix uid/gid auto-enumeration to avoid 16-bit limit

uid/gid range should be limited to 16bit unsigned integer range to
avoid "wraparound" issues with permissions where jffs2
is employed for storage and chown 65536 (first auto-created user)
becomes equivalent to chown 0

Fixes: #13927
Signed-off-by: Thomas Winkler <tewinkler86@gmail.com>
package/base-files/files/lib/functions.sh