or append-only flag set.
-$Id: CHANGES,v 1.40 2000/02/04 20:57:31 stelian Exp $
+$Id: CHANGES,v 1.41 2000/02/08 12:22:42 stelian Exp $
Changes between versions 0.4b13 and 0.4b14 (released ????????????????)
======================================================================
5. Added a REPORTING-BUGS file in order to provide a guide
on how to correctly report a bug in dump/restore.
+6. Fixed a restore problem when restoring a hard link to an inode
+ having the immutable or append-only attribute set. Thanks to
+ Ambrose Li <acli@mingpaoxpress.com> for submitting the patch.
+
Changes between versions 0.4b12 and 0.4b13 (released January 21, 2000)
======================================================================
* Remy Card <card@Linux.EU.Org>, 1994-1997
* Stelian Pop <pop@cybercable.fr>, 1999-2000
*
- * $Id: extern.h,v 1.7 2000/01/21 10:17:41 stelian Exp $
+ * $Id: extern.h,v 1.8 2000/02/08 12:22:43 stelian Exp $
*/
/*-
/* From e2fsprogs */
int fsetflags __P((const char *, unsigned long));
+int fgetflags __P((const char *, unsigned long *));
int setflags __P((int, unsigned long));
#ifndef lint
static const char rcsid[] =
- "$Id: utilities.c,v 1.7 2000/01/21 10:17:41 stelian Exp $";
+ "$Id: utilities.c,v 1.8 2000/02/08 12:22:43 stelian Exp $";
#endif /* not lint */
#include <sys/param.h>
ret = link(existing, new);
chflags(existing, s.st_flags);
}
+#else
+ unsigned long s;
+
+ /*
+ * Most likely, the immutable or append-only attribute
+ * is set. Clear the attributes and try again.
+ */
+ if (fgetflags (existing, &s) != -1 &&
+ fsetflags (existing, 0) != -1) {
+ ret = link(existing, new);
+ fsetflags(existing, s);
+ }
#endif
if (ret < 0) {
warn("warning: cannot create hard link %s->%s",