[PATCH v6 4/7] libbb: xfchdir(): new function

2016-03-19 Thread Bartosz Golaszewski
Add a new xfunction that prints an error message and exits if the underlying fchdir() fails. Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 1 + libbb/xfuncs_printf.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/libbb.h b/include/libbb.h index 0713917..34775

[PATCH v7 1/7] libbb: add BIT() macro

2016-03-19 Thread Bartosz Golaszewski
This macro - taken from the linux kernel source - improves readability of single bit definitions. Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/libbb.h b/include/libbb.h index 8b226c0..64e8490 100644 --- a/include/libbb.h +++

[PATCH v7 3/7] unshare: new applet

2016-03-19 Thread Bartosz Golaszewski
Add a fully featured unshare implementation implementing all arguments supported in the upstream version. Signed-off-by: Bartosz Golaszewski --- util-linux/unshare.c | 465 +++ 1 file changed, 465 insertions(+) create mode 100644 util-linux/unshar

[PATCH v7 4/7] libbb: xfchdir(): new function

2016-03-19 Thread Bartosz Golaszewski
Add a new xfunction that prints an error message and exits if the underlying fchdir() fails. Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 1 + libbb/xfuncs_printf.c | 6 ++ 2 files changed, 7 insertions(+) diff --git a/include/libbb.h b/include/libbb.h index 826804a..46983

Re: [PATCH v5 0/5] util-linux: namespace utils

2016-03-19 Thread Bartosz Gołaszewski
2016-03-17 12:42 GMT+01:00 Bartosz Golaszewski : > This series adds two namespaces-related applets reimplementing most > arguments supported by their upstream util-linux counterparts. > > The fifth patch is an optional code shrink. Superseded by v6. > v5: > - fixed the define guard in namespace.h

[PATCH 1/2 1.24] ash: fix error during recursive processing of here document

2016-03-19 Thread Ron Yorston
Save the value of the checkkwd flag to prevent it being clobbered during recursion. Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. Signed-off-by: Ron Yorston --- shell/ash.c | 5 +++-- shell/ash_test/ash-heredoc/heredoc

[PATCH] ash: fix corruption of ${#var} if $var contains UTF-8 characters

2016-03-19 Thread Ron Yorston
As reported in bug 8506: $ X=abcdÉfghÍjklmnÓpqrstÚvwcyz $ echo ${#X} abcd26 The result should be 26. This regression was introduced by: 2015-05-18 [Ron Yorston] ash: code shrink around varvalue The length in characters was being used to discard the contents of the variable instea

Re: problem ftpd server autentication busybox

2016-03-19 Thread Davide Urbani
My version is busybox 1.24.1 (Stericson) installed on Android device. I also looked on busybox site but do not understand where to find FEATURE_FTP_AUTHENTICATION. Can you explain the process? From: Isaac Dunham Sent: Thursday, March 17, 2016 2:40 AM To: Davide Urbani ; busybox@busybox.net Sub

Re: problem ftpd server autentication busybox

2016-03-19 Thread Isaac Dunham
Side note: Please don't use TOFU (text on top/full quote underneath). It messes up the reading order when a response doesn't follow the question it answers. On Thu, Mar 17, 2016 at 11:24:29AM +0100, Davide Urbani wrote: > Isaac wrote: >> On Wed, Mar 16, 2016 at 09:14:11AM +0100, Davide Urbani wrot

Re: [PATCH v6 2/7] libbb: INT_BUF_MAX(): new macro

2016-03-19 Thread Mike Frysinger
On 17 Mar 2016 15:52, Bartosz Golaszewski wrote: > Add a simple macro calculating the size needed to store the string > representation of an integer type (both signed and unsigned) together > with the terminating NUL-character. > > Suggested-by: Michael Conrad > Signed-off-by: Bartosz Golaszewski

[PATCH v5 3/5] unshare: new applet

2016-03-19 Thread Bartosz Golaszewski
Add a fully featured unshare implementation implementing all arguments supported in the upstream version. Signed-off-by: Bartosz Golaszewski --- util-linux/unshare.c | 464 +++ 1 file changed, 464 insertions(+) create mode 100644 util-linux/unshar

Re: [PATCH v3 3/4] nsenter: new applet

2016-03-19 Thread Bartosz Gołaszewski
2016-03-15 21:45 GMT+01:00 Mike Frysinger : > On 15 Mar 2016 12:00, Bartosz Gołaszewski wrote: >> >> Actually some time ago I sent a series extending the readahead applet. >> It was rejected eventually but one of the patches was actually adding >> a useful macro taken from systemd that seems to be

[PATCH v7 6/7] namespace utils: code shrink

2016-03-19 Thread Bartosz Golaszewski
Both unshare and nsenter use similar code to fork and have the parent wait for child's completion. Move it to a common library function. function old new delta continue_as_child - 105+105 unshare_main

Re: [PATCH v6 3/7] unshare: new applet

2016-03-19 Thread Mike Frysinger
On 17 Mar 2016 15:52, Bartosz Golaszewski wrote: > +static void mount_procfs(const char *target) > +{ > + int status; > + > + status = mount("none", target, NULL, MS_PRIVATE | MS_REC, NULL); > + if (status < 0) > + goto mount_err; > + > + status = mount("proc", target, "

[PATCH 2/2 1.24] ash: backport fix for here document issues

2016-03-19 Thread Ron Yorston
Backport the following from master: <9121510> ash: add test for issue with here document <6bd2fab> Revert "ash: fix a SEGV case in an invalid heredoc" ash: simplify EOF/newline handling in list parser Reported-by: Natanael Copa Signed-off-by: Ron Yorston --- shell/ash.c

[PATCH v6 2/7] libbb: INT_BUF_MAX(): new macro

2016-03-19 Thread Bartosz Golaszewski
Add a simple macro calculating the size needed to store the string representation of an integer type (both signed and unsigned) together with the terminating NUL-character. Suggested-by: Michael Conrad Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 1 + 1 file changed, 1 insertion(+)

[PATCH v7 7/7] runit: use xfchdir()

2016-03-19 Thread Bartosz Golaszewski
Replace a call to fchdir() and the subsequent bail-out in case of an error with a call to xfchdir(). Signed-off-by: Bartosz Golaszewski --- runit/chpst.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runit/chpst.c b/runit/chpst.c index 301cdd0..7fe5151 100644 --- a/runit/

[PATCH v6 6/7] namespace utils: code shrink

2016-03-19 Thread Bartosz Golaszewski
Both unshare and nsenter use similar code to fork and have the parent wait for child's completion. Move it to a common library function. function old new delta continue_as_child - 105+105 unshare_main

cherry picking + 1.24.3 release

2016-03-19 Thread Mike Frysinger
since these changes have CVE's, any problem with cherry picking them into the 1.24 branch and doing another release ? https://git.busybox.net/busybox/commit/?id=d474ffc68290e0a83651c4432eeabfa62cd51e87 https://git.busybox.net/busybox/commit/?id=352f79acbd759c14399e39baef21fc4ffe180ac2 -mike signa

[PATCH v7 0/7] util-linux: namespace utils

2016-03-19 Thread Bartosz Golaszewski
This series adds two namespaces-related applets reimplementing most arguments supported by their upstream util-linux counterparts. The sixth patch is an optional code shrink. The last patch isn't connected to the namespace utils, but makes use of the xfchdir() function introduced by patch 4/7. v

[PATCH v5 0/5] util-linux: namespace utils

2016-03-19 Thread Bartosz Golaszewski
This series adds two namespaces-related applets reimplementing most arguments supported by their upstream util-linux counterparts. The fifth patch is an optional code shrink. v5: - fixed the define guard in namespace.h to make it consistent with the rest of the codebase - added a separate patch

Re: [PATCH v3 3/4] nsenter: new applet

2016-03-19 Thread Michael Conrad
On 3/16/2016 11:35 AM, Bartosz Gołaszewski wrote: 2016-03-15 21:45 GMT+01:00 Mike Frysinger : On 15 Mar 2016 12:00, Bartosz Gołaszewski wrote: Actually some time ago I sent a series extending the readahead applet. It was rejected eventually but one of the patches was actually adding a useful ma

[PATCH v6 5/7] nsenter: new applet

2016-03-19 Thread Bartosz Golaszewski
Implement a fully featured (sans selinux part) nsenter applet. Signed-off-by: Bartosz Golaszewski --- util-linux/namespace.h | 20 +++ util-linux/nsenter.c | 351 + util-linux/unshare.c | 12 +- 3 files changed, 374 insertions(+), 9 deletions

[PATCH v5 4/5] nsenter: new applet

2016-03-19 Thread Bartosz Golaszewski
Implement a fully featured (sans selinux part) nsenter applet. Signed-off-by: Bartosz Golaszewski --- util-linux/namespace.h | 20 +++ util-linux/nsenter.c | 367 + util-linux/unshare.c | 12 +- 3 files changed, 390 insertions(+), 9 deletions

[PATCH v6 3/7] unshare: new applet

2016-03-19 Thread Bartosz Golaszewski
Add a fully featured unshare implementation implementing all arguments supported in the upstream version. Signed-off-by: Bartosz Golaszewski --- util-linux/unshare.c | 464 +++ 1 file changed, 464 insertions(+) create mode 100644 util-linux/unshar

[PATCH v5 1/5] libbb: add BIT() macro

2016-03-19 Thread Bartosz Golaszewski
This macro - taken from the linux kernel source - improves readability of single bit definitions. Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/libbb.h b/include/libbb.h index 8b226c0..64e8490 100644 --- a/include/libbb.h +++

[PATCH v5 2/5] libbb: INT_BUF_MAX(): new macro

2016-03-19 Thread Bartosz Golaszewski
Add a simple macro calculating the size needed to store the string representation of an integer type (both signed and unsigned) together with the terminating NUL-character. Suggested-by: Michael Conrad Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 1 + 1 file changed, 1 insertion(+)

[PATCH v7 2/7] libbb: INT_BUF_MAX(): new macro

2016-03-19 Thread Bartosz Golaszewski
Add a simple macro calculating the size needed to store the string representation of an integer type (both signed and unsigned) together with the terminating NUL-character. Suggested-by: Michael Conrad Signed-off-by: Bartosz Golaszewski --- include/libbb.h | 17 + 1 file changed

[BISECTED] busybox modprobe regression

2016-03-19 Thread Aaro Koskinen
Hi, modprobes are failing for me (with some kernel modules reporting -2) with current busybox, and I bisected this to: commit 3a5cc989025eefe03fda0552b253a4a8f015a761 Author: Mike Frysinger Date: Fri Feb 12 23:26:51 2016 -0500 modprobe: only parse files that end in .conf This mat

[PATCH v6 0/7] util-linux: namespace utils

2016-03-19 Thread Bartosz Golaszewski
This series adds two namespaces-related applets reimplementing most arguments supported by their upstream util-linux counterparts. The sixth patch is an optional code shrink. The last patch isn't connected to the namespace utils, but makes use of the xfchdir() function introduced by patch 4/7. v

[PATCH v5 5/5] namespace utils: code shrink

2016-03-19 Thread Bartosz Golaszewski
Both unshare and nsenter use similar code to fork and have the parent wait for child's completion. Move it to a common library function. function old new delta continue_as_child - 105+105 unshare_main