mmdebstrap-no-user-ns.patch 882 B

12345678910111213141516171819202122232425262728293031
  1. diff --git a/mmdebstrap b/mmdebstrap
  2. index 9b7d892..5d85a74 100755
  3. --- a/mmdebstrap
  4. +++ b/mmdebstrap
  5. @@ -204,6 +204,7 @@ sub get_tar_compressor {
  6. }
  7. sub test_unshare {
  8. + return 1;
  9. my $verbose = shift;
  10. if ($EFFECTIVE_USER_ID == 0) {
  11. my $msg = "cannot use unshare mode when executing as root";
  12. @@ -382,7 +383,7 @@ sub get_unshare_cmd {
  13. my $idmap = shift;
  14. my $unshare_flags
  15. - = $CLONE_NEWUSER | $CLONE_NEWNS | $CLONE_NEWPID | $CLONE_NEWUTS
  16. + = $CLONE_NEWNS | $CLONE_NEWPID | $CLONE_NEWUTS
  17. | $CLONE_NEWIPC;
  18. if (0) {
  19. @@ -457,6 +458,8 @@ sub get_unshare_cmd {
  20. $gidmapcmd .= " $hostid $nsid $range";
  21. }
  22. }
  23. + $uidmapcmd = "";
  24. + $gidmapcmd = "";
  25. my $idmapcmd = '';
  26. if ($uidmapcmd ne "") {
  27. 0 == system "newuidmap $ppid $uidmapcmd"