stgraber on Github
2018-12-06 00:28:20 UTC
From c5e21d2850600bc054085ff923c866ab523c39b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <***@ubuntu.com>
Date: Wed, 5 Dec 2018 19:03:24 -0500
Subject: [PATCH] shared/idmap: Workaround Go tip change
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <***@ubuntu.com>
---
shared/idmap/shift_linux.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/shared/idmap/shift_linux.go b/shared/idmap/shift_linux.go
index 79c97d23f3..4d49e0474a 100644
--- a/shared/idmap/shift_linux.go
+++ b/shared/idmap/shift_linux.go
@@ -218,13 +218,13 @@ func ShiftACL(path string, shiftIds func(uid int64, gid int64) (int64, int64)) e
return nil
}
-func shiftAclType(path string, aclType _Ctype_acl_type_t, shiftIds func(uid int64, gid int64) (int64, int64)) error {
+func shiftAclType(path string, aclType int, shiftIds func(uid int64, gid int64) (int64, int64)) error {
// Convert the path to something usable with cgo
cpath := C.CString(path)
defer C.free(unsafe.Pointer(cpath))
// Read the current ACL set for the requested type
- acl := C.acl_get_file(cpath, aclType)
+ acl := C.acl_get_file(cpath, _Ctype_uint(aclType))
if acl == nil {
return nil
}
@@ -290,7 +290,7 @@ func shiftAclType(path string, aclType _Ctype_acl_type_t, shiftIds func(uid int6
// Update the on-disk ACLs to match
if update {
- ret := C.acl_set_file(cpath, aclType, newAcl)
+ ret := C.acl_set_file(cpath, _Ctype_uint(aclType), newAcl)
if ret == -1 {
return fmt.Errorf("Failed to change ACLs on %s", path)
}
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <***@ubuntu.com>
Date: Wed, 5 Dec 2018 19:03:24 -0500
Subject: [PATCH] shared/idmap: Workaround Go tip change
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <***@ubuntu.com>
---
shared/idmap/shift_linux.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/shared/idmap/shift_linux.go b/shared/idmap/shift_linux.go
index 79c97d23f3..4d49e0474a 100644
--- a/shared/idmap/shift_linux.go
+++ b/shared/idmap/shift_linux.go
@@ -218,13 +218,13 @@ func ShiftACL(path string, shiftIds func(uid int64, gid int64) (int64, int64)) e
return nil
}
-func shiftAclType(path string, aclType _Ctype_acl_type_t, shiftIds func(uid int64, gid int64) (int64, int64)) error {
+func shiftAclType(path string, aclType int, shiftIds func(uid int64, gid int64) (int64, int64)) error {
// Convert the path to something usable with cgo
cpath := C.CString(path)
defer C.free(unsafe.Pointer(cpath))
// Read the current ACL set for the requested type
- acl := C.acl_get_file(cpath, aclType)
+ acl := C.acl_get_file(cpath, _Ctype_uint(aclType))
if acl == nil {
return nil
}
@@ -290,7 +290,7 @@ func shiftAclType(path string, aclType _Ctype_acl_type_t, shiftIds func(uid int6
// Update the on-disk ACLs to match
if update {
- ret := C.acl_set_file(cpath, aclType, newAcl)
+ ret := C.acl_set_file(cpath, _Ctype_uint(aclType), newAcl)
if ret == -1 {
return fmt.Errorf("Failed to change ACLs on %s", path)
}