[lxc-devel] [lxd/master] forkproxy: use correct types for {g, u}ids

brauner on Github lxc-bot at linuxcontainers.org
Mon Jul 30 08:41:33 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 415 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180730/258cb766/attachment.bin>
-------------- next part --------------
From c58e6cc91aab5a4b87de6da30dc0786a6e0b1d70 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Mon, 30 Jul 2018 10:37:26 +0200
Subject: [PATCH] forkproxy: use correct types for {g,u}ids

__{g,u}id_t are internal types

Closes #4848.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 lxd/main_forkproxy.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/main_forkproxy.go b/lxd/main_forkproxy.go
index 90a60bc10..ca9d91cf4 100644
--- a/lxd/main_forkproxy.go
+++ b/lxd/main_forkproxy.go
@@ -590,7 +590,7 @@ func (c *cmdForkproxy) Run(cmd *cobra.Command, args []string) error {
 			return err
 		}
 
-		errno := C.setgid(C.__gid_t(gid))
+		errno := C.setgid(C.gid_t(gid))
 		if errno < 0 {
 			return fmt.Errorf("setgid: %v", errno)
 		}
@@ -602,7 +602,7 @@ func (c *cmdForkproxy) Run(cmd *cobra.Command, args []string) error {
 			return err
 		}
 
-		errno := C.setuid(C.__uid_t(uid))
+		errno := C.setuid(C.uid_t(uid))
 		if errno < 0 {
 			return fmt.Errorf("setuid: %v", errno)
 		}


More information about the lxc-devel mailing list