confd: create admin user without -S flag to adduser

After the upgrade to Buildroot 2024.02 a new system user was added to
/etc/passwd, sshd.  Used for drop-privs sshd.  This caused files that
were previously owned by the 'admin' user to now be owned by 'sshd'.

This patch drops the `-S` flag from adduser for the adin user, ensuring
no future clashes with system system users and instead mapping the uid
to a range starting from uid 1000 (default for BusyBox adduser).

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-04-30 15:51:17 +02:00
committed by Tobias Waldekranz
parent 969ec1dd11
commit e395c90958
+1 -1
View File
@@ -675,7 +675,7 @@ static int sys_add_new_user(sr_session_ctx_t *sess, char *name)
{
char *shell = sys_find_usable_shell(sess, name);
char *sargs[] = {
"adduser", "-d", "-s", shell, "-S", "-G", "wheel", name, NULL
"adduser", "-d", "-s", shell, "-G", "wheel", name, NULL
};
char *uargs[] = {
"adduser", "-d", "-s", shell, name, NULL