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
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
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
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
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
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
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
2016-03-14 15:11 GMT+01:00 Mike Frysinger :
> On 14 Mar 2016 11:08, Bartosz Gołaszewski wrote:
>> 2016-03-11 18:24 GMT+01:00 Mike Frysinger :
>> > On 11 Mar 2016 18:10, Bartosz Golaszewski wrote:
>> >> +int unshare_main(int argc UNUSED_PARAM, char **argv)
>> >> +{
>> >> + static struct namespac
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
This series adds two namespaces-related applets reimplementing most
arguments supported by their upstream util-linux counterparts.
The fourth patch is an optional code shrink.
v4:
- split the namespace structure into the read-only and modifiable
parts
- made the read-only definition const and m
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
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
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 d05ac29..fcad060 100644
--- a/include/libbb.h
+++
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
On 14 Mar 2016 11:08, Bartosz Gołaszewski wrote:
> 2016-03-11 18:24 GMT+01:00 Mike Frysinger :
> > On 11 Mar 2016 18:10, Bartosz Golaszewski wrote:
> >> +int unshare_main(int argc UNUSED_PARAM, char **argv)
> >> +{
> >> + static struct namespace ns_list[] = {
> >
> > const ?
> >
>
> Nope, we'r
2016-03-11 18:24 GMT+01:00 Mike Frysinger :
> On 11 Mar 2016 18:10, Bartosz Golaszewski wrote:
>> +int unshare_main(int argc UNUSED_PARAM, char **argv)
>> +{
>> + static struct namespace ns_list[] = {
>
> const ?
>
Nope, we're using char *path to store the mount points.
>> + {
>>
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
This series adds two namespaces-related applets reimplementing most
arguments supported by their upstream util-linux counterparts.
The fourth patch is an optional code shrink.
v3:
- moved the namespace positions into an enum for better readability
v2:
- v1 was badly rebased and patch 3/4 didn't
Add a fully featured unshare implementation implementing all arguments
supported in the upstream version.
Signed-off-by: Bartosz Golaszewski
---
util-linux/unshare.c | 453 +++
1 file changed, 453 insertions(+)
create mode 100644 util-linux/unshar
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 d05ac29..fcad060 100644
--- a/include/libbb.h
+++
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
21 matches
Mail list logo