← Commit list

62103757e

Rob Landley
Rob Landley
2006-07-16
SOURCE BUG Duration: 32s

Subject

Bugfix from Tito to make sure /etc/group gets updated.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/adduser.c+3 -3
@@ -96,6 +96,7 @@ static void passwd_wrapper(const char *login)
static int adduser(struct passwd *p, unsigned long flags)
{
FILE *file;
+ int addgroup = !p->pw_gid;
/* make sure everything is kosher and setup uid && gid */
file = bb_xfopen(bb_path_passwd_file, "a");
@@ -132,9 +133,8 @@ static int adduser(struct passwd *p, unsigned long flags)
/* add to group */
/* addgroup should be responsible for dealing w/ gshadow */
/* if using a pre-existing group, don't create one */
- if (p->pw_gid == 0) {
- addgroup_wrapper(p);
- }
+ if (addgroup) addgroup_wrapper(p);
+
/* Clear the umask for this process so it doesn't
* * screw up the permissions on the mkdir and chown. */
umask(0);