Commit graph

15 commits

Author SHA1 Message Date
Filippo Squillace
bd0e9fbbcc Replace mountpoint command by checking mounts file
`mountpoint` does not detect some directory. By checking directly
from `/proc/self/mounts` groot can be more reliable and portable.
2017-04-20 20:19:04 +01:00
Filippo Squillace
137788a98a Groot: Do not umount directories that are not mountpoint 2017-04-19 23:52:26 +01:00
Filippo Squillace
03a29590de Add -i and -r options for groot command 2017-04-19 21:04:51 +01:00
Filippo Squillace
0060658726 Issue #174: Add util-linux in JuNest image
util-linux contains `unshare` which is needed for the namespace mode.
2017-04-12 20:43:35 +01:00
Filippo Squillace
b817aa8445 Issue #174: Add -g option for Groot and integ tests for user namespace 2017-04-12 20:43:30 +01:00
Filippo Squillace
fcb4a36f30 Issue #174: Add option -n in groot and umount directories in order 2017-04-12 20:43:21 +01:00
Filippo Squillace
8e5531a27a Issue #174: Add unit test for namespace 2017-04-12 20:43:12 +01:00
Filippo Squillace
0f7fd33c53 Issue #174: Add new program GRoot and change version option for JuNest!
This replaces jchroot because GRoot can be also used in a user namespace environment.
2017-04-12 20:42:56 +01:00
Filippo Squillace
426b708d2d Issue #174: Rename common functions and define skeleton for namespace functions 2017-04-12 20:42:35 +01:00
Filippo Squillace
0ec35a4088 Issue #174: Add namespace module and check for user namespace 2017-04-12 20:42:10 +01:00
Filippo Squillace
ddc7ede70a Issue #174: 🎨 Change structure of core modules
This change separate different parts of the code into several categories:
`chroot`, `proot`, `build`, `common`, `setup`. This should simplify the
maintenance of the code and will help introducing the user namespace module
in a easier way.
2017-03-13 21:06:18 +00:00
Filippo Squillace
d07b06b39d Substitute bindings with explicit copy of files 2017-03-11 10:17:55 +00:00
Filippo Squillace
6568430add Mitigate user missing from getent enumeration
Sometimes `getent passwd` does not give the user information.
This change tries to at least get the current user via
`getent passwd $USER` since it uses
a more reliable and faster system call (getpwnam(3)).

Reference:
be748493a3
2016-11-27 12:49:09 +00:00
fsquillace
846bcc9c1f Issue #81: Use getent to build the passwd and group files 2016-06-07 22:24:28 +01:00
fsquillace
374cb2e42e Move the unit tests to a specific folder 2016-05-30 23:01:28 +01:00