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

2016-03-20 Thread Mike Frysinger
On 16 Mar 2016 16:35, 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 >

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

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

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

2016-03-15 Thread Arnout Vandecappelle
On 03/15/16 12:00, Bartosz Gołaszewski wrote: 2016-03-14 21:09 GMT+01:00 Rich Felker: >On Mon, Mar 14, 2016 at 10:27:19AM -0400, Mike Frysinger wrote: >>On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: >> >+#ifndef __BB_NAMESPACE_H >> >+#define __BB_NAMESPACE_H >> >>use a naming style like ot

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

2016-03-15 Thread Mike Frysinger
On 15 Mar 2016 12:00, Bartosz Gołaszewski wrote: > 2016-03-14 21:09 GMT+01:00 Rich Felker : > > On Mon, Mar 14, 2016 at 10:27:19AM -0400, Mike Frysinger wrote: > >> On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > >> > +#ifndef __BB_NAMESPACE_H > >> > +#define __BB_NAMESPACE_H > >> > >> use a nam

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

2016-03-15 Thread Bartosz Gołaszewski
2016-03-14 21:09 GMT+01:00 Rich Felker : > On Mon, Mar 14, 2016 at 10:27:19AM -0400, Mike Frysinger wrote: >> On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: >> > +#ifndef __BB_NAMESPACE_H >> > +#define __BB_NAMESPACE_H >> >> use a naming style like other busybox headers > > And in particular, don

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

2016-03-14 Thread Mike Frysinger
On 14 Mar 2016 16:15, Rich Felker wrote: > On Mon, Mar 14, 2016 at 02:27:56PM -0400, Mike Frysinger wrote: > > On 14 Mar 2016 18:11, Bartosz Gołaszewski wrote: > > > 2016-03-14 15:27 GMT+01:00 Mike Frysinger : > > > > On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > > > >> +#ifndef __BB_NAMESPACE

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

2016-03-14 Thread Rich Felker
On Mon, Mar 14, 2016 at 02:27:56PM -0400, Mike Frysinger wrote: > On 14 Mar 2016 18:11, Bartosz Gołaszewski wrote: > > 2016-03-14 15:27 GMT+01:00 Mike Frysinger : > > > On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > > >> +#ifndef __BB_NAMESPACE_H > > >> +#define __BB_NAMESPACE_H > > > > > > use

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

2016-03-14 Thread Rich Felker
On Mon, Mar 14, 2016 at 10:27:19AM -0400, Mike Frysinger wrote: > On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > > +#ifndef __BB_NAMESPACE_H > > +#define __BB_NAMESPACE_H > > use a naming style like other busybox headers And in particular, don't use leading underscores, ever. They're not avai

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

2016-03-14 Thread Michael Conrad
On 3/14/2016 2:27 PM, Mike Frysinger wrote: the code seems to assume that the byte size scales into the number of chars required to represent the number in base 10 when it's really a log scale. here's a table to show it's wonky: The number of bytes is also a log scale. The ratio of log_256 to

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

2016-03-14 Thread Mike Frysinger
On 14 Mar 2016 14:27, Mike Frysinger wrote: > On 14 Mar 2016 18:11, Bartosz Gołaszewski wrote: > > 2016-03-14 15:27 GMT+01:00 Mike Frysinger : > > > On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > > >> +#ifndef __BB_NAMESPACE_H > > >> +#define __BB_NAMESPACE_H > > > > > > use a naming style like

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

2016-03-14 Thread Mike Frysinger
On 14 Mar 2016 18:11, Bartosz Gołaszewski wrote: > 2016-03-14 15:27 GMT+01:00 Mike Frysinger : > > On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > >> +#ifndef __BB_NAMESPACE_H > >> +#define __BB_NAMESPACE_H > > > > use a naming style like other busybox headers > > > >> +/* > >> + * Longest possi

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

2016-03-14 Thread Bartosz Gołaszewski
2016-03-14 15:27 GMT+01:00 Mike Frysinger : > On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: >> +#ifndef __BB_NAMESPACE_H >> +#define __BB_NAMESPACE_H > > use a naming style like other busybox headers > >> +/* >> + * Longest possible path to a procfs file used in namespace utils. Must be >> + * a

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

2016-03-14 Thread Mike Frysinger
On 14 Mar 2016 11:07, Bartosz Golaszewski wrote: > +#ifndef __BB_NAMESPACE_H > +#define __BB_NAMESPACE_H use a naming style like other busybox headers > +/* > + * Longest possible path to a procfs file used in namespace utils. Must be > + * able to contain the '/proc/' string, the '/ns/user' stri

[PATCH v3 3/4] nsenter: new applet

2016-03-14 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 | 362 + util-linux/unshare.c | 12 +- 3 files changed, 385 insertions(+), 9 deletions