[Pkg-shadow-commits] r3649 - in upstream/trunk: . libmisc
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Mon Nov 21 19:34:22 UTC 2011
Author: nekral-guest
Date: 2011-11-21 19:34:22 +0000 (Mon, 21 Nov 2011)
New Revision: 3649
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/copydir.c
Log:
* libmisc/copydir.c: Ignore errors to copy ACLs if the operation
is not supported.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2011-11-20 14:52:44 UTC (rev 3648)
+++ upstream/trunk/ChangeLog 2011-11-21 19:34:22 UTC (rev 3649)
@@ -1,3 +1,8 @@
+2011-11-21 Peter Vrabec <pvrabec at redhat.com>
+
+ * libmisc/copydir.c: Ignore errors to copy ACLs if the operation
+ is not supported.
+
2011-11-19 Nicolas François <nicolas.francois at centraliens.net>
* libmisc/root_flag.c, src/gpasswd.c, src/chsh.c: Add splint
Modified: upstream/trunk/libmisc/copydir.c
===================================================================
--- upstream/trunk/libmisc/copydir.c 2011-11-20 14:52:44 UTC (rev 3648)
+++ upstream/trunk/libmisc/copydir.c 2011-11-21 19:34:22 UTC (rev 3649)
@@ -183,6 +183,7 @@
/* ignore the case when destination does not support ACLs
* or extended attributes */
if (ENOTSUP == errno) {
+ errno = 0;
return;
}
@@ -555,7 +556,7 @@
old_uid, new_uid, old_gid, new_gid) != 0)
#ifdef WITH_ACL
|| ( (perm_copy_file (src, dst, &ctx) != 0)
- && (errno != ENOTSUP))
+ && (errno != 0))
#else /* !WITH_ACL */
|| (chmod (dst, statp->st_mode) != 0)
#endif /* !WITH_ACL */
@@ -567,7 +568,9 @@
* file systems with and without ACL support needs some
* additional logic so that no unexpected permissions result.
*/
- || (!reset_selinux && (attr_copy_file (src, dst, NULL, &ctx) != 0))
+ || ( !reset_selinux
+ && (attr_copy_file (src, dst, NULL, &ctx) != 0)
+ && (errno != 0))
#endif /* WITH_ATTR */
|| (copy_tree (src, dst, false, reset_selinux,
old_uid, new_uid, old_gid, new_gid) != 0)
@@ -754,7 +757,7 @@
old_uid, new_uid, old_gid, new_gid) != 0)
#ifdef WITH_ACL
|| ( (perm_copy_file (src, dst, &ctx) != 0)
- && (errno != ENOTSUP))
+ && (errno != 0))
#else /* !WITH_ACL */
|| (chmod (dst, statp->st_mode & 07777) != 0)
#endif /* !WITH_ACL */
@@ -766,7 +769,9 @@
* file systems with and without ACL support needs some
* additional logic so that no unexpected permissions result.
*/
- || (!reset_selinux && (attr_copy_file (src, dst, NULL, &ctx) != 0))
+ || ( !reset_selinux
+ && (attr_copy_file (src, dst, NULL, &ctx) != 0)
+ && (errno != 0))
#endif /* WITH_ATTR */
|| (utimes (dst, mt) != 0)) {
err = -1;
@@ -812,7 +817,7 @@
old_uid, new_uid, old_gid, new_gid) != 0)
#ifdef WITH_ACL
|| ( (perm_copy_fd (src, ifd, dst, ofd, &ctx) != 0)
- && (errno != ENOTSUP))
+ && (errno != 0))
#else /* !WITH_ACL */
|| (fchmod (ofd, statp->st_mode & 07777) != 0)
#endif /* !WITH_ACL */
@@ -824,7 +829,9 @@
* file systems with and without ACL support needs some
* additional logic so that no unexpected permissions result.
*/
- || (!reset_selinux && (attr_copy_fd (src, ifd, dst, ofd, NULL, &ctx) != 0))
+ || ( !reset_selinux
+ && (attr_copy_fd (src, ifd, dst, ofd, NULL, &ctx) != 0)
+ && (errno != 0))
#endif /* WITH_ATTR */
) {
(void) close (ifd);
More information about the Pkg-shadow-commits
mailing list