← Commit list

df798b7f5

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2006-06-14
SOURCE BUG Duration: 34s

Subject

- minor size tweak text data bss dec hex filename 613 0 0 613 265 loginutils/su.o.orig 605 0 0 605 25d loginutils/su.o

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/su.c+7 -8
@@ -65,8 +65,6 @@ static void log_su (const char *successful, const char *old_user,
int su_main ( int argc, char **argv )
{
unsigned long flags;
- int opt_preserve;
- int opt_loginshell;
char *opt_shell = 0;
char *opt_command = 0;
char *opt_username = DEFAULT_USER;
@@ -81,11 +79,12 @@ int su_main ( int argc, char **argv )
flags = bb_getopt_ulflags(argc, argv, "mplc:s:",
&opt_command, &opt_shell);
- opt_preserve = flags & 3;
- opt_loginshell = (flags & 4 ? 1 : 0);
+#define SU_OPT_m (3)
+#define SU_OPT_p (3)
+#define SU_OPT_l (4)
if (optind < argc && argv[optind][0] == '-' && argv[optind][1] == 0) {
- opt_loginshell = 1;
+ flags |= SU_OPT_l;
++optind;
}
@@ -137,7 +136,7 @@ int su_main ( int argc, char **argv )
closelog();
#endif
- if ( !opt_shell && opt_preserve )
+ if ( !opt_shell && (flags & SU_OPT_p))
opt_shell = getenv ( "SHELL" );
if ( opt_shell && cur_uid && restricted_shell ( pw->pw_shell )) {
@@ -153,11 +152,11 @@ int su_main ( int argc, char **argv )
opt_shell = pw->pw_shell;
change_identity ( pw );
- setup_environment ( opt_shell, opt_loginshell, !opt_preserve, pw );
+ setup_environment(opt_shell, flags & SU_OPT_l, !(flags & SU_OPT_p), pw);
#if ENABLE_SELINUX
set_current_security_context(NULL);
#endif
- run_shell ( opt_shell, opt_loginshell, opt_command, (const char**)opt_args);
+ run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)opt_args);
return EXIT_FAILURE;
}