crux-musl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://codeberg.org/emmett1/crux-musl
Log | Files | Refs | README | LICENSE

0034-adduser-remove-preconfigured-GECOS-full-name-field.patch (1602B)


      1 Patch-Source: https://lists.busybox.net/pipermail/busybox/2024-November/091029.html
      2 ---
      3 From 77e364c66bf1208269a257bf23bcdb07ac50b5cd Mon Sep 17 00:00:00 2001
      4 From: fossdd <fossdd@pwned.life>
      5 Date: Sat, 16 Nov 2024 22:21:12 +0100
      6 Subject: [PATCH] adduser: remove preconfigured GECOS full name field
      7 
      8 Pre-configuring "Linux User" as Full Name is confusing a lot of users
      9 downstream.[1] For example, in geary e-mails were sent out as "Linux
     10 User"[2] and I also saw a couple of git commits with this name. This name
     11 does not bring any more improvements than just leaving this field
     12 empty, and let applications most likely fallback to the username.
     13 
     14 Alternative would be to set the field to `&` (Capitalized username,
     15 according to passwd(5)) or that we just set the GECOS field downstream.
     16 
     17 [1] https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/issues/2214
     18 [2] https://gitlab.gnome.org/GNOME/geary/-/issues/1486
     19 
     20 Signed-off-by: fossdd <fossdd@pwned.life>
     21 ---
     22  loginutils/adduser.c | 2 +-
     23  1 file changed, 1 insertion(+), 1 deletion(-)
     24 
     25 diff --git a/loginutils/adduser.c b/loginutils/adduser.c
     26 index d3c795afa..bfab05203 100644
     27 --- a/loginutils/adduser.c
     28 +++ b/loginutils/adduser.c
     29 @@ -196,7 +196,7 @@ int adduser_main(int argc UNUSED_PARAM, char **argv)
     30  		bb_simple_error_msg_and_die(bb_msg_perm_denied_are_you_root);
     31  	}
     32  
     33 -	pw.pw_gecos = (char *)"Linux User,,,";
     34 +	pw.pw_gecos = (char *)"";
     35  	/* We assume that newly created users "inherit" root's shell setting */
     36  	pw.pw_shell = xstrdup(get_shell_name()); /* might come from getpwnam(), need to make a copy */
     37  	pw.pw_dir = NULL;
     38 -- 
     39 2.47.1
     40