Alexander Korolkov | 27 Feb 17:41 2015

[PATCH] arping: wrong interface in error messages


In arping, error message is formed before parsing argv. So arping always 
reports errors on "interface eth0", regardless of actual interface.
Attachment (arping.patch): text/x-patch, 571 bytes
busybox mailing list
busybox <at>
Jim Keniston | 27 Feb 00:10 2015

[RFC PATCH 1/1] patch: fix seg fault caused by malformed patch

busybox's patch command dies with a SIGSEGV if the "---" line that heralds
a new file to patch is missing.  GNU patch silently does what's apparently
wanted, based on the "+++" line.

Signed-off-by: Jim Keniston <jkenisto <at>>

diff -up ./editors/patch.c.orig ./editors/patch.c
--- ./editors/patch.c.orig	2015-02-25 18:28:29.231096889 -0600
+++ ./editors/patch.c	2015-02-26 16:21:23.560131205 -0600
 <at>  <at>  -345,6 +345,8  <at>  <at>  done:
 // state 1: Found +++ file indicator, look for  <at>  <at> 
 // state 2: In hunk: counting initial context lines
 // state 3: In hunk: getting body
+// Like GNU patch, we don't require a --- line before the +++, and
+// also allow the --- after the +++ line.

 int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int patch_main(int argc UNUSED_PARAM, char **argv)
 <at>  <at>  -462,6 +464,14  <at>  <at>  int patch_main(int argc UNUSED_PARAM, ch
 			TT.context = 0;
 			state = 2;

+			// If the --- line is missing or malformed, either oldname
+			// or (for -R) newname could be NULL -- but not both.  Like
+			// GNU patch, proceed based on the +++ line, and avoid SEGVs.
+			if (!oldname)
+				oldname = xstrdup(newname);
+			else if (!newname)
+				newname = xstrdup(oldname);
(Continue reading)

Lauri Kasanen | 21 Feb 11:27 2015

modinfo broken in both master and 1.23


We find that modinfo for gzipped modules is broken in both today's
master and the stable 1.23 branch (1.23.1 release is also broken).

Good output (1.22.1 for example):
$ modinfo ntfs
filename:       kernel/fs/ntfs/ntfs.ko.gz
license:        GPL
author:         Anton Altaparmakov <anton <at>>
description:    NTFS 1.2/3.x driver - Copyright (c) 2001-2011 Anton
Altaparmakov and Tuxera Inc.
version:        2.1.30
alias:          fs-ntfs
srcversion:     426164F8BB2591455E7748D
vermagic:       3.16.6-tinycore SMP mod_unload 486

Bad output:
$ modinfo ntfs
filename:       ntfs

Bisect says master broke in 7885452, 1.23 broke in the "Apply
post-1.23.0 patches" commit. Config attached.

- Lauri


-- - Access all of your messages and folders
                          wherever you are
(Continue reading)

Camil Staps | 19 Feb 00:42 2015

Java JDK installation

Dear experts,

I'm having problems installing the Java JDK in a busybox (which is in an 
LXC container on an Ubuntu Server 14.04).

In a web application I'm developing, users will be able to upload java 
code and I will need to compile and run that. For security reasons, I'd 
like to that inside an LXC container, and for footprint reasons I'd like 
that to be a busybox. So, I created a busybox container successfully with:

     lxc-create -n my-box -t busybox

It's up and running fine. Then, I downloaded jdk-8u31-linux-i586.rpm 

and ran `rpm -i jdk-8u31-linux-i586.rpm`, which returned no output but 
created `/usr/java/jdk1.8.0_31` which all looks good.

However, when I go to `/usr/java/jdk1.8.0_31/bin` and run `./javac 
-version`, I get:

     /usr/java/jdk1.8.0_31/bin # ./javac -version
     Error occurred during initialization of VM
     java/lang/NoClassDefFoundError: java/lang/Object

I figured this may be because of the classpath or java_home not being 
the right setting, so, I created a `/etc/profile`:

(Continue reading)

tito | 18 Feb 17:11 2015

[BUG] in bb's internal libpwdgrp


while experimenting with a modified version of deluser.c

I've hit a bug in libpwdgrp. The attached drop in replacement

for deluser.c triggers the bug if compiled with bb's libpwdgrp

and instead works correctly with glibc.


To reproduce:

adduser prova

addgroup test1

addgroup test2

addgroup prova test1

addgroup prova test2

grep prova /etc/passwd /etc/group






with glibc:

./busybox deluser prova


groups[2] gr->gr_name=test2


groups[1] gr->gr_name=test1

grep prova /etc/passwd /etc/group


with bb's pwdgrp


./busybox deluser prova


groups[2] gr->gr_name=test2


getgrgid failed errno=0


grep prova /etc/passwd /etc/group




seems to me that subsequent calls

to getgrgid and getgrnam fail




Attachment (deluser.c): text/x-csrc, 4418 bytes
busybox mailing list
busybox <at>
Serj Kalichev | 18 Feb 16:31 2015

[PATCH] Fix acpid daemon logging

Without this patch acpid can't log the events at all. Moreover it tries
to truncate log file every time.

Signed-off-by: Serj Kalichev <serj.kalichev <at>>
 util-linux/acpid.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 38421c2..fc8151f 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
 <at>  <at>  -121,10 +121,8  <at>  <at>  static void process_event(const char *event)
 	char *handler = xasprintf("./%s", event);
 	const char *args[] = { "run-parts", handler, NULL };

-	// debug info
-	if (option_mask32 & OPT_d) {
-		bb_error_msg("%s", event);
-	}
+	// log the event
+	bb_error_msg("%s", event);

 	// spawn handler
 	// N.B. run-parts would require scripts to have #!/bin/sh
 <at>  <at>  -256,7 +254,7  <at>  <at>  int acpid_main(int argc UNUSED_PARAM, char **argv)
 		/* No -d "Debug", we log to log file.
 		 * This includes any output from children.
-		xmove_fd(xopen(opt_logfile, O_WRONLY | O_CREAT | O_TRUNC), STDOUT_FILENO);
+		xmove_fd(xopen(opt_logfile, O_WRONLY | O_CREAT | O_APPEND), STDOUT_FILENO);
 		/* Also, acpid's messages (but not children) will go to syslog too */
 		openlog(applet_name, LOG_PID, LOG_DAEMON);

Karthikeyan M | 18 Feb 09:59 2015

DHCPv6 not working

Dear All

We are facing issues in getting DHCPv6 working with udhcpc6. We first started seeing issue with busy box v1.21.1 where the tool was issuing bootp protocol later we found out it's bug in the udhcpc6 tool and it's fixed in the next version of busy box. Hence we upgraded to busy box 1.22 and also to 1.23. Now instead of seeing bootp protocol we started seeing ICMPv6 and DHCPv6 protocol being used for getting IPv6 adds when the udhcpc6 tool is run but still the board doesn't get an IPv6 adds.

HW and Build:
iMx dual core processor, Linux kernel 3.10.17, Yocto Dora build environment

Windows Server 2008 configured as DHCP server which will issue IPv6 adds.

Cross checks:
A Windows 7 based client system connected to the same server gets an IPv6 adds through DHCPv6.
Our board works fine in an IPv4 environment gets IPv4 adds through DHCP using udhcpc.
It also gets an stateless auto configured IPv6 adds and we are able to communicate using this IPv6 address.
We are unable to get a IPv6 adds through DHCPv6.

Interface file contents
auto eth0
iface eth0 inet6 dhcp

Do we have to change anything in any configuration files apart from including the udhcpc6 tool? what are we missing, kindly help us out.
I have also uploaded a wireshark capture when we run the udhcpc6 tool to the following link

busybox mailing list
busybox <at>
Bernhard Reutner-Fischer | 17 Feb 21:47 2015

[PATCH, RFC] wget is appending instead of replacing with "--header"


wget is appending instead of replacing with "--header"

To quote current big wget docs

Send header-line along with the rest of the headers in each HTTP request. The supplied header is sent as-is,
which means it must contain name and value separated by colon, and must not contain newlines.

You may define more than one additional header by specifying ‘--header’ more than once.

wget --header='Accept-Charset: iso-8859-2' \
     --header='Accept-Language: hr'        \
Specification of an empty string as the header value will clear all previous user-defined headers.

As of Wget 1.10, this option can be used to override headers otherwise generated automatically. This
example instructs Wget to connect to localhost, but to specify ‘’ in the Host header:

wget --header="Host:" http://localhost/
In versions of Wget prior to 1.10 such use of ‘--header’ caused sending of duplicate headers.

I'm attaching 2 variants to implement the "override headers" part that was
introduced in the big wget in 1.10. As i'm just now seeing that "clear all
previous user headers" so that part is not implemented and i'm not sure how
useful it is in practise (i would not blindly add it).
Neither variant make me particularly happy and i'm not sure how to phrase
it better right now.

Better ideas?
Denys, is one of this variants good enough to apply as is for now?

TIA and cheers,
busybox mailing list
busybox <at>
Laszlo Papp | 17 Feb 17:52 2015

Bug in the deluser applet


1) busybox addgroup user
2) busybox adduser -G user testuser1
3) busybox adduser -G user testuser2
4) busybox deluser testuser1
5) grep user /etc/passwd /etc/group

/etc/passwd:testuser2:x:1010:1007:Linux User,,,:/home/testuser2:/bin/bash

This is not how the desktop util behaves and I agree with the desktop
util in this case. A non-existent user should not remain in

Do you agree or disagree?

Cheers, L.
Explorer | 17 Feb 13:52 2015

Fwd: [PATCH] ls: no longer assume a 4-digit year on file timestamp.

On Tue, Feb 17, 2015 at 8:20 PM, Denys Vlasenko
<vda.linux <at>> wrote:
> On Tue, Feb 17, 2015 at 5:16 AM, Joshua Judson Rosen
> <jrosen <at>> wrote:
> >
> > I'd actually be really interested in hearing the motivations for the
> > change
> The resulting code is _smaller_.

Hi everyone, and sorry for late reply. (I'm new in this mailing list.)
My original motivation was to avoid that annoying comment saying that
"it's buggy after year 9999", and I believe it should be written right
in the first place. Yes, it's smaller also. If fixing the problem
would add more than 10 bytes of code, I wouldn't suggest the patch
Laszlo Papp | 17 Feb 12:59 2015

Changing the primary group


I am looking for something like usermod -g on desktop. Is it possible
to achieve this feature?

There are workarounds like adding a group and then removing the
previous, etc, but it is suboptimal.

Cheers, L.