File libcap-dummy.patch of Package libcap-dummy
--- libcap-2.22/libcap/cap_file.c.orig 2015-01-16 17:38:33.551536889 +0100
+++ libcap-2.22/libcap/cap_file.c 2015-01-16 17:51:00.261929696 +0100
@@ -285,11 +285,18 @@ int cap_set_file(const char *filename, c
_cap_debug("removing filename capabilities");
return removexattr(filename, XATTR_NAME_CAPS);
} else if (_fcaps_save(&rawvfscap, cap_d, &sizeofcaps) != 0) {
- return -1;
+ // hack for libcap-dummy, maybe docker survives yum install with this.
+ _cap_debug("_fcaps_save() error ignored");
+ // return -1;
}
_cap_debug("setting filename capabilities");
- return setxattr(filename, XATTR_NAME_CAPS, &rawvfscap, sizeofcaps, 0);
+ int r = setxattr(filename, XATTR_NAME_CAPS, &rawvfscap, sizeofcaps, 0);
+ if (r) {
+ // hack for libcap-dummy, maybe docker survives yum install with this.
+ _cap_debug("setxattr error=%d ignored", r);
+ }
+ return 0;
}
#else /* ie. ndef VFS_CAP_U32 */