← Commit list

9c44dce30

"Vladimir N. Oleynik"
"Vladimir N. Oleynik"
2005-10-04
SOURCE BUG Duration: 7s

Subject

ps selinux logic correction, but do not tested too

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 →

procps/ps.c+3 -4
@@ -33,6 +33,7 @@ extern int ps_main(int argc, char **argv)
#if ENABLE_FEATURE_PS_WIDE
int terminal_width;
int w_count = 0;
+ bb_opt_complementally="ww";
#else
# define terminal_width 80
#endif
@@ -40,12 +41,10 @@ extern int ps_main(int argc, char **argv)
#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
/* handle arguments */
#if ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX
- bb_opt_complementally="ww";
i = bb_getopt_ulflags(argc, argv, "wc", &w_count);
#elif ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX
- bb_opt_complementally="ww";
i = bb_getopt_ulflags(argc, argv, "w", &w_count);
-#else /* !ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX */
+#else /* !ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX */
i = bb_getopt_ulflags(argc, argv, "c");
#endif
#if ENABLE_FEATURE_PS_WIDE
@@ -61,7 +60,7 @@ extern int ps_main(int argc, char **argv)
}
#endif
#if ENABLE_SELINUX
- if ((i & 2) && is_selinux_enabled())
+ if ((i & (1+ENABLE_FEATURE_PS_WIDE)) && is_selinux_enabled())
use_selinux = 1;
#endif
#endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */