The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/298

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From b6edc52561ec20b7a1679e83de700bdd6a2a7b2e Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.h...@canonical.com>
Date: Tue, 3 Mar 2020 21:27:25 +0100
Subject: [PATCH] chroot: Fix mode for special files in /dev

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
---
 shared/chroot.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/shared/chroot.go b/shared/chroot.go
index 2e75b69..6002426 100644
--- a/shared/chroot.go
+++ b/shared/chroot.go
@@ -363,6 +363,13 @@ func populateDev() error {
                if err != nil {
                        return errors.Wrapf(err, "Failed to create %q", d.Path)
                }
+
+               // For some odd reason, unix.Mknod will not set the mode 
correctly.
+               // This fixes that.
+               err = unix.Chmod(d.Path, d.Mode)
+               if err != nil {
+                       return errors.Wrapf(err, "Failed to chmod %q", d.Path)
+               }
        }
 
        symlinks := []struct {
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to