From e395c909587f48af0b087efe578bc4cf7365c7cf Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sun, 28 Apr 2024 08:53:36 +0200 Subject: [PATCH] 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 --- src/confd/src/ietf-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/confd/src/ietf-system.c b/src/confd/src/ietf-system.c index e7beef5c..fc03799c 100644 --- a/src/confd/src/ietf-system.c +++ b/src/confd/src/ietf-system.c @@ -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