[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH v7 0/7] util-linux: namespace utils
From: Bartosz Golaszewski <bartekgola () gmail ! com>
Date: 2016-03-18 11:37:43
Message-ID: 1458301070-25452-1-git-send-email-bartekgola () gmail ! com
[Download RAW message or body]
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.
v7:
- added a comment explaing the rationale behind INT_BUF_MAX()
- moved the code doing the procfs mount in new pid namespaces to the
main function and shrunk it a bit as suggested by Mike Frysinger
- added a comment explaing the procfs mount
v6:
- added a patch implementing xfchdir()
- shrunk the nsenter code a bit by using libbb xfuncs instead of
manual return code checking for chdir(), fchdir() and chroot()
v5:
- fixed the include guard in namespace.h to make it consistent with the
rest of the codebase
- added a separate patch implementing a macro for calculating the
string buffer size needed to store an integer type and used it in
the new applets
v4:
- split the namespace structure into the read-only and modifiable
parts
- made the read-only definition const and moved it out of the main
function in both applets
- moved the position indicators to an enum and replaced all the
ARRAY_SIZE() macros with NS_COUNT constant defined there
- fixed some whitespace errors
v3:
- moved the namespace positions into an enum for better readability
v2:
- v1 was badly rebased and patch 3/4 didn't compile - fixed it
- added some parenthesis for better readability in patch 3/4
v1: http://lists.busybox.net/pipermail/busybox/2016-March/083957.html
Bartosz Golaszewski (7):
libbb: add BIT() macro
libbb: INT_BUF_MAX(): new macro
unshare: new applet
libbb: xfchdir(): new function
nsenter: new applet
namespace utils: code shrink
runit: use xfchdir()
include/libbb.h | 20 +++
libbb/xfuncs_printf.c | 6 +
runit/chpst.c | 3 +-
util-linux/namespace.c | 34 ++++
util-linux/namespace.h | 27 +++
util-linux/nsenter.c | 335 +++++++++++++++++++++++++++++++++++++
util-linux/unshare.c | 444 +++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 867 insertions(+), 2 deletions(-)
create mode 100644 util-linux/namespace.c
create mode 100644 util-linux/namespace.h
create mode 100644 util-linux/nsenter.c
create mode 100644 util-linux/unshare.c
--
2.1.4
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic