[Pkg-shadow-commits] r3626 - in upstream/trunk: . libmisc
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Wed Nov 16 21:00:43 UTC 2011
Author: nekral-guest
Date: 2011-11-16 21:00:43 +0000 (Wed, 16 Nov 2011)
New Revision: 3626
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/copydir.c
Log:
2011-11-16 Peter Vrabec <pvrabec at redhat.com>
* libmisc/copydir.c: Ignore perm_copy_file() errors with errno set
to ENOTSUP.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2011-11-16 19:34:39 UTC (rev 3625)
+++ upstream/trunk/ChangeLog 2011-11-16 21:00:43 UTC (rev 3626)
@@ -1,3 +1,8 @@
+2011-11-16 Peter Vrabec <pvrabec at redhat.com>
+
+ * libmisc/copydir.c: Ignore perm_copy_file() errors with errno set
+ to ENOTSUP.
+
2011-11-16 Nicolas François <nicolas.francois at centraliens.net>
* src/useradd.c: Compilation fix when SHADOWGRP is not enabled.
Modified: upstream/trunk/libmisc/copydir.c
===================================================================
--- upstream/trunk/libmisc/copydir.c 2011-11-16 19:34:39 UTC (rev 3625)
+++ upstream/trunk/libmisc/copydir.c 2011-11-16 21:00:43 UTC (rev 3626)
@@ -180,6 +180,12 @@
{
va_list ap;
+ /* ignore the case when destination does not support ACLs
+ * or extended attributes */
+ if (ENOTSUP == errno) {
+ return;
+ }
+
va_start (ap, fmt);
(void) fprintf (stderr, _("%s: "), Prog);
if (vfprintf (stderr, fmt, ap) != 0) {
@@ -548,7 +554,8 @@
|| (chown_if_needed (dst, statp,
old_uid, new_uid, old_gid, new_gid) != 0)
#ifdef WITH_ACL
- || (perm_copy_file (src, dst, &ctx) != 0)
+ || ( (perm_copy_file (src, dst, &ctx) != 0)
+ && (errno != ENOTSUP))
#else /* !WITH_ACL */
|| (chmod (dst, statp->st_mode) != 0)
#endif /* !WITH_ACL */
@@ -746,7 +753,8 @@
|| (chown_if_needed (dst, statp,
old_uid, new_uid, old_gid, new_gid) != 0)
#ifdef WITH_ACL
- || (perm_copy_file (src, dst, &ctx) != 0)
+ || ( (perm_copy_file (src, dst, &ctx) != 0)
+ && (errno != ENOTSUP))
#else /* !WITH_ACL */
|| (chmod (dst, statp->st_mode & 07777) != 0)
#endif /* !WITH_ACL */
@@ -803,7 +811,8 @@
|| (fchown_if_needed (ofd, statp,
old_uid, new_uid, old_gid, new_gid) != 0)
#ifdef WITH_ACL
- || (perm_copy_fd (src, ifd, dst, ofd, &ctx) != 0)
+ || ( (perm_copy_fd (src, ifd, dst, ofd, &ctx) != 0)
+ && (errno != ENOTSUP))
#else /* !WITH_ACL */
|| (fchmod (ofd, statp->st_mode & 07777) != 0)
#endif /* !WITH_ACL */
More information about the Pkg-shadow-commits
mailing list