From c7ff4365e80684b2fde45e28e2ad47137efbb322 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 24 Feb 2009 16:01:00 +0000 Subject: Add patches from upstream. Package-Manager: portage-2.2_rc23/cvs/Linux x86_64 --- sys-apps/busybox/ChangeLog | 8 +- sys-apps/busybox/Manifest | 26 ++--- sys-apps/busybox/files/busybox-1.13.2-depmod.patch | 121 +++++++++++++++++++++ sys-apps/busybox/files/busybox-1.13.2-init.patch | 50 +++++++++ .../busybox/files/busybox-1.13.2-killall.patch | 17 +++ .../busybox/files/busybox-1.13.2-modprobe.patch | 99 +++++++++++++++++ sys-apps/busybox/files/busybox-1.13.2-tar.patch | 11 ++ 7 files changed, 315 insertions(+), 17 deletions(-) create mode 100644 sys-apps/busybox/files/busybox-1.13.2-depmod.patch create mode 100644 sys-apps/busybox/files/busybox-1.13.2-init.patch create mode 100644 sys-apps/busybox/files/busybox-1.13.2-killall.patch create mode 100644 sys-apps/busybox/files/busybox-1.13.2-modprobe.patch create mode 100644 sys-apps/busybox/files/busybox-1.13.2-tar.patch (limited to 'sys-apps') diff --git a/sys-apps/busybox/ChangeLog b/sys-apps/busybox/ChangeLog index fee7219779e1..c2a904abca1d 100644 --- a/sys-apps/busybox/ChangeLog +++ b/sys-apps/busybox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/busybox # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.218 2009/01/12 14:42:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/ChangeLog,v 1.219 2009/02/24 16:01:00 vapier Exp $ + + 24 Feb 2009; Mike Frysinger + +files/busybox-1.13.2-depmod.patch, +files/busybox-1.13.2-init.patch, + +files/busybox-1.13.2-killall.patch, +files/busybox-1.13.2-modprobe.patch, + +files/busybox-1.13.2-tar.patch: + Add patches from upstream. *busybox-1.13.2 (12 Jan 2009) diff --git a/sys-apps/busybox/Manifest b/sys-apps/busybox/Manifest index 75369ec2a3c2..c47ab25f2cd5 100644 --- a/sys-apps/busybox/Manifest +++ b/sys-apps/busybox/Manifest @@ -15,30 +15,24 @@ AUX busybox-1.13.1-crond.patch 788 RMD160 b7d9467b5af283ed7ec9fca69e36bf0c4f7669 AUX busybox-1.13.1-init.patch 839 RMD160 13cc740e9e3419d0a4a26f74f59e61d9ef4db1f6 SHA1 3066a766c9385505130149dcf31cbe84e15665fe SHA256 19e1c279c97f92c304585342b2af87f580dad61c0c2159584c7480f8c68b9428 AUX busybox-1.13.1-ip.patch 313 RMD160 39ccb070c04269ea9f5b721ad7e502d5482af109 SHA1 b8e551deecfae9f14e98ac39df23369187f1eae6 SHA256 54ce7c20d7fd865fe0441a21c488d470a4038c42437670b22633ada8d1931242 AUX busybox-1.13.1-printf.patch 532 RMD160 e0eb868bf4b2c0c12c431607b948f3d6565297a1 SHA1 a153af9b3e3272d15c9369e159e033676ad84980 SHA256 bb769cbc526c751d13258d567f61ec46c99654fb4b18f1822ea89814f5386f6f +AUX busybox-1.13.2-depmod.patch 3815 RMD160 905f2f805ba66cdd772fe49e76824ba0739f972a SHA1 db827cb5238407b902f424b0d8d8b0a698124400 SHA256 35e3854599a074ce1b47872ab1b97a625ed7d1ab3345b918f7f60524f5e390c5 +AUX busybox-1.13.2-init.patch 1544 RMD160 7dbc785de9a69359ef3bd3f31154457376f96d97 SHA1 d1f382dae513daf6aaea1274d44dcc6cdae49a01 SHA256 39a8efb5a50c56feb733e519365b4e188c25c0e925a1a63cc1ace9735a80100f +AUX busybox-1.13.2-killall.patch 674 RMD160 4587b61757279e70d17ef6cf974f3612517ee451 SHA1 9d11ea4ba7ef61aedf5706fc1bd334d067f95a72 SHA256 e04d0954e8fd20e2ba74d59162e121ac99a118b5e69b03b728037afabecb823c AUX busybox-1.13.2-mdev.patch 1300 RMD160 2c0615303f13456c2a66fe930eb5c6c739cc4e60 SHA1 a13b4022858f008c0654f6b1e2929e06f74d9d2a SHA256 fd4a64c6a83e07586de0360258162c5bf431f164b3980301185743e4029940df +AUX busybox-1.13.2-modprobe.patch 3054 RMD160 49c19fd31aca0e277a37fec27e67488ac79a123c SHA1 0f64601ce1f55031a10ddcb3e132c58d9ee38744 SHA256 a02007661cf2f318a66468456f8fc8ae1177e12c3c66c59ff2de4d98863a388e +AUX busybox-1.13.2-tar.patch 290 RMD160 78a4fd26051e21a404981e9526fc6cf2e69aa969 SHA1 e04663add68abdfda0d6eb2f10a1aee5c9002a29 SHA256 9427fa9b45f3c322bf4fe2463c99c972e6ae03df630899b38be4f29133708a0e AUX busybox-devmem.patch 4623 RMD160 3a9c0a4eba57b18308b3a75d05a7eb1804c8e8ee SHA1 77fe59da168f6d4b1a0508816683c2887084673f SHA256 9ef56cb12d3d566a54ccdbe225a996eae9263efcddbb68c258121f75ece2b7f8 AUX mdev-start.sh 2758 RMD160 c177aac4940b177bd857bc98ff2ac031e0489bbc SHA1 5a5b95da36c489cd12820513434a7a17ac3bffd1 SHA256 9904263c8dfe2b8c3e968a9b4245fa0c162a2413110c037cdd797ac3773587d7 -DIST busybox-1.11.1.tar.bz2 1924234 RMD160 8047748a4be0990f2bab61fdeefac1400e8cfa9d SHA1 73b041364d377125949dd8f5c191bcbb3daee6e9 SHA256 bf2fb5be14cb509af1153af15b8a14c143d61fc46fb50cfbcf3cf10764f3740f -DIST busybox-1.11.3.tar.bz2 1924832 RMD160 1f2fd6dad3199ecc7de79ff7ad5ed84bae48da44 SHA1 d90e3ff443deb9bfed09582b74bd994cc6ad6129 SHA256 6d35fda668988c06f8c22e6e20fe6951ec83108169df6b8c0bad99872577c784 -DIST busybox-1.12.0.tar.bz2 2017989 RMD160 b5e991bdbc1481a649f963b9e949777707412fd3 SHA1 0c174c69e7b7244a3936ebfdc245fa37b73ce633 SHA256 c5b5c6d89e22c975d160e9dd9bb767521f6c478b9c356cab06a9328da5e4a2e6 -DIST busybox-1.12.1.tar.bz2 2022321 RMD160 075092f73e03c4b36de7426c35b1bfb6568fc884 SHA1 e405e2d6587714626c8eb7d181f63208f3997845 SHA256 80829f38d719879dcf01db6251015c8aea2567a382dad463f65d2299447e949b DIST busybox-1.12.2.tar.bz2 2021304 RMD160 b716a8742411954845b0aed8e12754e3aed8c7c6 SHA1 49c715a4adb8f6f3d4103dfe04b050479fe43e56 SHA256 49a33023399b1378ef905f382e59581f1b139faf68247321f5abd8c591a24335 -DIST busybox-1.13.1.tar.bz2 2045965 RMD160 ddf55e1caa75dd875ce08ec59709cb8e22b5d279 SHA1 9380c7ab81013b7b242daf02696c0aa1fec74b28 SHA256 011923a661351fa862911c9729f20524c7798435e6787fbc371c92a6db2eaa1e DIST busybox-1.13.2.tar.bz2 2046961 RMD160 21c9f2802e9b29a589a9fdcf3e01502f8af7f57f SHA1 6659d92b0056971e0faab254fdcbc7fcce872e9e SHA256 927774408bd982dd246fb716bb2e646ab0708ce321b42c5e271dc98c1f5d1dc8 -EBUILD busybox-1.11.1.ebuild 7312 RMD160 b924ef0d00d2ec9b9f42cd10136834c777046e02 SHA1 4630529c82555e87228e4b643482b723cd4978da SHA256 e70a4a13f000a3f2a18f4d975d430d1dd26cd4a5e8499031a932172f101017f7 -EBUILD busybox-1.11.3.ebuild 7265 RMD160 3a07d587b7122402a97e0c4bd7ba4d9dcdd88f0f SHA1 afff8cfced7c259cf8c033c7ac6b12b982603f89 SHA256 21a12d6bb04edbb6da7c1375dcbb38c655ae1a6a62fafda9e65a30b3f6d6c774 -EBUILD busybox-1.12.0.ebuild 7270 RMD160 364726e02c3b6847e983f11a0d2205b15d02ed61 SHA1 4207919c0116ad69c0bf2f5cf786f9b3b9c065ed SHA256 a185c1386756fc5f7eff8de00ca2a02e9ad17176226a8da6cb2254d7bbdc9d73 -EBUILD busybox-1.12.1.ebuild 7315 RMD160 e079459231a544b2307e0f4b40639f8a03e945be SHA1 94b911c9e02aa37b588f2f634d5a06f92ecaccad SHA256 02d4d20a8164f58892ce38ec710241d04642a69f24ce967429f1a384b18888e0 EBUILD busybox-1.12.2-r1.ebuild 7453 RMD160 621b5e68094c19a3f22de63fe4dd418ef80d048d SHA1 a0a67feed251986110ca923b4216fece5b150dae SHA256 74107bed04894eb63060bf3c0bb06d5eca34ee995fd858639739528cf123fdad -EBUILD busybox-1.12.2.ebuild 7314 RMD160 696bc4ad6399aa222edbe27ce7e40521a5e52a09 SHA1 520a3821c8852d2aca8d8f9c375b1363e44cd464 SHA256 35d0d084d4465fa7b04c65216e83fffb0ba3d5c7fb51943e28045ae3624d9c5d -EBUILD busybox-1.13.1.ebuild 7334 RMD160 7fa9f7dc63f2a4c4615cabb8b806e2fc37d890bb SHA1 11b0e42e07aff1383b60e236b03f617c0e7913a6 SHA256 1fd5f51f5271ff3ce9abb198656c0ca2da987b50d29d19b2a31d0c391c548831 EBUILD busybox-1.13.2.ebuild 7334 RMD160 75f05dcb5e7979686bb79bcceb4733cf60b32de1 SHA1 e99fa6b1cc18deff7931fd473bc24a7b4f33ed28 SHA256 c69a03f2d61a637fecb83881e469964e6f44ab0f744c00e069b2d0db561474f8 -MISC ChangeLog 32474 RMD160 85a581919d633812325246126bdfd200964343f6 SHA1 a73e28c16f8ab402800b2e089871732f8b615a40 SHA256 8270f2b31f7535a2c3eac6fe13dae2063e21a72caa8b6a85970af90e07e86ea7 +MISC ChangeLog 32738 RMD160 643143ff41a3b655e51d8c5da6efbd19623139f6 SHA1 37c71e3d7abc49cebaa07b900f2bcea2aa35dc8b SHA256 208ed7dfa903aa42af0bf699a7ad8713f54a46c6533f7632c37ae87d031fc6f6 MISC metadata.xml 261 RMD160 3a3402cbd18d14e4f10e1bb0a4d94a0c3b29b44d SHA1 7bc1c61bf44ae90dfce0f668ea0dcfe0460afe77 SHA256 d45ec36c64c958afd2de0777e77292c4e2908e32c5417c952dd63d920f82990a -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) +Version: GnuPG v2.0.10 (GNU/Linux) -iEYEARECAAYFAklrVuwACgkQn/5bYzqsSmHscACgt20KyRvrbHR78DZnL722lYEd -xZ8AoK8aE1A5F5zImqu3oJsLeP3xrHPK -=Oc2t +iEYEARECAAYFAkmkGcEACgkQn/5bYzqsSmFBMgCePTGv9fWHq3iblVkUXVFAqB+9 +bmQAnRWe9IZF4Hsa55wdvUOUSscIJeBD +=C0EG -----END PGP SIGNATURE----- diff --git a/sys-apps/busybox/files/busybox-1.13.2-depmod.patch b/sys-apps/busybox/files/busybox-1.13.2-depmod.patch new file mode 100644 index 000000000000..32d616384371 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.13.2-depmod.patch @@ -0,0 +1,121 @@ +--- busybox-1.13.2/modutils/depmod.c Sun Nov 9 18:28:03 2008 ++++ busybox-1.13.2-depmod/modutils/depmod.c Mon Jan 12 23:12:59 2009 +@@ -33,7 +33,7 @@ + enum { + ARG_a = (1<<0), /* All modules, ignore mods in argv */ + ARG_A = (1<<1), /* Only emit .ko that are newer than modules.dep file */ +- ARG_b = (1<<2), /* not /lib/modules/$(uname -r)/ but this base-dir */ ++ ARG_b = (1<<2), /* base directory when modules are in staging area */ + ARG_e = (1<<3), /* with -F, print unresolved symbols */ + ARG_F = (1<<4), /* System.map that contains the symbols */ + ARG_n = (1<<5) /* dry-run, print to stdout only */ +@@ -57,7 +57,7 @@ + *first = info; + + info->dnext = info->dprev = info; +- info->name = xstrdup(fname); ++ info->name = xasprintf("/%s", fname); + info->modname = filename2modname(fname, NULL); + for (ptr = image; ptr < image + len - 10; ptr++) { + if (strncmp(ptr, "depends=", 8) == 0) { +@@ -123,44 +123,61 @@ + } + } + ++static void xfreopen_write(const char *file, FILE *f) ++{ ++ if (freopen(file, "w", f) == NULL) ++ bb_perror_msg_and_die("can't open '%s'", file); ++} ++ + int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; + int depmod_main(int argc UNUSED_PARAM, char **argv) + { + module_info *modules = NULL, *m, *dep; +- char *moddir_base = (char *)CONFIG_DEFAULT_MODULES_DIR; ++ const char *moddir_base = "/"; ++ char *moddir, *version; ++ struct utsname uts; + int tmp; + + getopt32(argv, "aAb:eF:n", &moddir_base, NULL); + argv += optind; + + /* goto modules location */ ++ xchdir(moddir_base); + + /* If a version is provided, then that kernel version's module directory + * is used, rather than the current kernel version (as returned by + * "uname -r"). */ +- xchdir(moddir_base); +- if (*argv && (sscanf(*argv, "%d.%d.%d", &tmp, &tmp, &tmp) == 3)) { +- xchdir(*argv++); ++ if (*argv && sscanf(*argv, "%d.%d.%d", &tmp, &tmp, &tmp) == 3) { ++ version = *argv++; + } else { +- struct utsname uts; + uname(&uts); +- xchdir(uts.release); ++ version = uts.release; + } +- /* If no modules are given on the command-line, -a is on per default. */ +- option_mask32 |= *argv == NULL; ++ moddir = concat_path_file(&CONFIG_DEFAULT_MODULES_DIR[1], version); + + /* Scan modules */ +- moddir_base = xrealloc_getcwd_or_warn(NULL); +- do { +- recursive_action((option_mask32 & ARG_a) ? moddir_base : *argv, +- ACTION_RECURSE, parse_module, NULL, &modules, 0); +- } while (!(option_mask32 & ARG_a) && *(++argv)); ++ if (*argv) { ++ char *modfile; ++ struct stat sb; ++ do { ++ modfile = concat_path_file(moddir, *argv); ++ xstat(modfile, &sb); ++ parse_module(modfile, &sb, &modules, 0); ++ free(modfile); ++ } while (*(++argv)); ++ } else { ++ recursive_action(moddir, ACTION_RECURSE, ++ parse_module, NULL, &modules, 0); ++ } ++ ++ /* Prepare for writing out the dep files */ ++ xchdir(moddir); + if (ENABLE_FEATURE_CLEAN_UP) +- free(moddir_base); ++ free(moddir); + + /* Generate dependency and alias files */ + if (!(option_mask32 & ARG_n)) +- freopen(CONFIG_DEFAULT_DEPMOD_FILE, "w", stdout); ++ xfreopen_write(CONFIG_DEFAULT_DEPMOD_FILE, stdout); + for (m = modules; m != NULL; m = m->next) { + printf("%s:", m->name); + +@@ -174,12 +191,12 @@ + dep->dprev->dnext = dep->dnext; + dep->dnext = dep->dprev = dep; + } +- puts(""); ++ bb_putchar('\n'); + } + + #if ENABLE_FEATURE_MODUTILS_ALIAS + if (!(option_mask32 & ARG_n)) +- freopen("modules.alias", "w", stdout); ++ xfreopen_write("modules.alias", stdout); + for (m = modules; m != NULL; m = m->next) { + while (m->aliases) { + printf("alias %s %s\n", +@@ -190,7 +207,7 @@ + #endif + #if ENABLE_FEATURE_MODUTILS_SYMBOLS + if (!(option_mask32 & ARG_n)) +- freopen("modules.symbols", "w", stdout); ++ xfreopen_write("modules.symbols", stdout); + for (m = modules; m != NULL; m = m->next) { + while (m->symbols) { + printf("alias symbol:%s %s\n", diff --git a/sys-apps/busybox/files/busybox-1.13.2-init.patch b/sys-apps/busybox/files/busybox-1.13.2-init.patch new file mode 100644 index 000000000000..1d98467ac646 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.13.2-init.patch @@ -0,0 +1,50 @@ +--- busybox-1.13.2/init/init.c Wed Dec 31 04:06:45 2008 ++++ busybox-1.13.2-init/init/init.c Thu Jan 29 03:02:13 2009 +@@ -671,15 +671,14 @@ + */ + static void parse_inittab(void) + { ++#if ENABLE_FEATURE_USE_INITTAB + char *token[4]; +- /* order must correspond to SYSINIT..RESTART constants */ +- static const char actions[] ALIGN1 = +- "sysinit\0""respawn\0""askfirst\0""wait\0""once\0" +- "ctrlaltdel\0""shutdown\0""restart\0"; ++ parser_t *parser = config_open2("/etc/inittab", fopen_for_read); + +- parser_t *parser = config_open2(INITTAB, fopen_for_read); +- /* No inittab file -- set up some default behavior */ +- if (parser == NULL) { ++ if (parser == NULL) ++#endif ++ { ++ /* No inittab file -- set up some default behavior */ + /* Reboot on Ctrl-Alt-Del */ + new_init_action(CTRLALTDEL, "reboot", ""); + /* Umount all filesystems on halt/reboot */ +@@ -699,11 +698,17 @@ + new_init_action(SYSINIT, INIT_SCRIPT, ""); + return; + } ++ ++#if ENABLE_FEATURE_USE_INITTAB + /* optional_tty:ignored_runlevel:action:command + * Delims are not to be collapsed and need exactly 4 tokens + */ + while (config_read(parser, token, 4, 0, "#:", + PARSE_NORMAL & ~(PARSE_TRIM | PARSE_COLLAPSE))) { ++ /* order must correspond to SYSINIT..RESTART constants */ ++ static const char actions[] ALIGN1 = ++ "sysinit\0""respawn\0""askfirst\0""wait\0""once\0" ++ "ctrlaltdel\0""shutdown\0""restart\0"; + int action; + char *tty = token[0]; + +@@ -727,6 +732,7 @@ + parser->lineno); + } + config_close(parser); ++#endif + } + + #if ENABLE_FEATURE_USE_INITTAB diff --git a/sys-apps/busybox/files/busybox-1.13.2-killall.patch b/sys-apps/busybox/files/busybox-1.13.2-killall.patch new file mode 100644 index 000000000000..9524f5281aa0 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.13.2-killall.patch @@ -0,0 +1,17 @@ +--- busybox-1.13.2/include/libbb.h Wed Dec 31 04:06:45 2008 ++++ busybox-1.13.2-killall/include/libbb.h Sat Feb 14 02:41:18 2009 +@@ -1275,7 +1275,13 @@ + PSSCAN_UTIME = 1 << 13, + PSSCAN_TTY = 1 << 14, + PSSCAN_SMAPS = (1 << 15) * ENABLE_FEATURE_TOPMEM, +- PSSCAN_ARGVN = (1 << 16) * (ENABLE_PGREP || ENABLE_PKILL || ENABLE_PIDOF), ++ /* NB: used by find_pid_by_name(). Any applet using it ++ * needs to be mentioned here. */ ++ PSSCAN_ARGVN = (1 << 16) * (ENABLE_KILLALL ++ || ENABLE_PGREP || ENABLE_PKILL ++ || ENABLE_PIDOF ++ || ENABLE_SESTATUS ++ ), + USE_SELINUX(PSSCAN_CONTEXT = 1 << 17,) + PSSCAN_START_TIME = 1 << 18, + PSSCAN_CPU = 1 << 19, diff --git a/sys-apps/busybox/files/busybox-1.13.2-modprobe.patch b/sys-apps/busybox/files/busybox-1.13.2-modprobe.patch new file mode 100644 index 000000000000..8fd7dc428bce --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.13.2-modprobe.patch @@ -0,0 +1,99 @@ +--- busybox-1.13.2/modutils/modutils-24.c Sat Nov 29 07:48:56 2008 ++++ busybox-1.13.2-modprobe/modutils/modutils-24.c Sun Feb 1 00:08:26 2009 +@@ -2150,7 +2150,7 @@ + sec->name = name; + sec->idx = newidx; + if (size) +- sec->contents = xmalloc(size); ++ sec->contents = xzalloc(size); + + obj_insert_section_load_order(f, sec); + +@@ -2165,7 +2165,7 @@ + int newidx = f->header.e_shnum++; + struct obj_section *sec; + +- f->sections = xrealloc(f->sections, (newidx + 1) * sizeof(sec)); ++ f->sections = xrealloc_vector(f->sections, 2, newidx); + f->sections[newidx] = sec = arch_new_section(); + + sec->header.sh_type = SHT_PROGBITS; +@@ -2175,7 +2175,7 @@ + sec->name = name; + sec->idx = newidx; + if (size) +- sec->contents = xmalloc(size); ++ sec->contents = xzalloc(size); + + sec->load_next = f->load_order; + f->load_order = sec; +@@ -2571,8 +2571,7 @@ + /* Collect the modules' symbols. */ + + if (nmod) { +- ext_modules = modules = xmalloc(nmod * sizeof(*modules)); +- memset(modules, 0, nmod * sizeof(*modules)); ++ ext_modules = modules = xzalloc(nmod * sizeof(*modules)); + for (i = 0, mn = module_names, m = modules; + i < nmod; ++i, ++m, mn += strlen(mn) + 1) { + struct new_module_info info; +@@ -2652,13 +2651,14 @@ + } + + +-static void new_create_this_module(struct obj_file *f, const char *m_name) ++static void new_create_this_module(struct obj_file *f, const char *m_name) + { + struct obj_section *sec; + + sec = obj_create_alloced_section_first(f, ".this", tgt_sizeof_long, + sizeof(struct new_module)); +- memset(sec->contents, 0, sizeof(struct new_module)); ++ /* done by obj_create_alloced_section_first: */ ++ /*memset(sec->contents, 0, sizeof(struct new_module));*/ + + obj_add_symbol(f, SPFX "__this_module", -1, + ELF_ST_INFO(STB_LOCAL, STT_OBJECT), sec->idx, 0, +@@ -2965,9 +2965,9 @@ + if (i == f->header.e_shnum) { + struct obj_section *sec; + ++ f->header.e_shnum++; + f->sections = xrealloc_vector(f->sections, 2, i); + f->sections[i] = sec = arch_new_section(); +- f->header.e_shnum = i + 1; + + sec->header.sh_type = SHT_PROGBITS; + sec->header.sh_flags = SHF_WRITE | SHF_ALLOC; +@@ -3006,12 +3006,9 @@ + for (i = 0; i < f->header.e_shnum; ++i) { + struct obj_section *s = f->sections[i]; + if (s->header.sh_type == SHT_NOBITS) { ++ s->contents = NULL; + if (s->header.sh_size != 0) +- s->contents = memset(xmalloc(s->header.sh_size), +- 0, s->header.sh_size); +- else +- s->contents = NULL; +- ++ s->contents = xzalloc(s->header.sh_size); + s->header.sh_type = SHT_PROGBITS; + } + } +@@ -3275,14 +3272,13 @@ + case SHT_SYMTAB: + case SHT_STRTAB: + case SHT_RELM: ++ sec->contents = NULL; + if (sec->header.sh_size > 0) { +- sec->contents = xmalloc(sec->header.sh_size); ++ sec->contents = xzalloc(sec->header.sh_size); + fseek(fp, sec->header.sh_offset, SEEK_SET); + if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) { + bb_perror_msg_and_die("error reading ELF section data"); + } +- } else { +- sec->contents = NULL; + } + break; + diff --git a/sys-apps/busybox/files/busybox-1.13.2-tar.patch b/sys-apps/busybox/files/busybox-1.13.2-tar.patch new file mode 100644 index 000000000000..3a59081c8239 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.13.2-tar.patch @@ -0,0 +1,11 @@ +--- busybox-1.13.2/archival/tar.c Sun Nov 9 18:28:02 2008 ++++ busybox-1.13.2-tar/archival/tar.c Tue Jan 20 03:52:04 2009 +@@ -591,8 +591,6 @@ + struct TarBallInfo tbInfo; + + tbInfo.hlInfoHead = NULL; +- +- fchmod(tar_fd, 0644); + tbInfo.tarFd = tar_fd; + tbInfo.verboseFlag = verboseFlag; + -- cgit v1.2.3-65-gdbad