-$Id: CHANGES,v 1.276 2005/06/08 09:34:33 stelian Exp $
+$Id: CHANGES,v 1.277 2005/06/08 13:24:08 stelian Exp $
Changes between versions 0.4b40 and 0.4b41 (released ???????????)
=================================================================
code for EA works fine, but ACLs needed conversion from the
ext2/3 disk format to posix_acl format before restoring.
+2. Fix some issues with restoration of EA on big endian
+ platforms.
+
Changes between versions 0.4b39 and 0.4b40 (released May 2, 2005)
=================================================================
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.89 2005/05/02 15:10:46 stelian Exp $";
+ "$Id: tape.c,v 1.90 2005/06/08 13:24:11 stelian Exp $";
#endif /* not lint */
#include <config.h>
#endif
FLUSHTAPEBUF();
findtapeblksize();
+ cvtflag = 0;
if (gethead(&spcl) == FAIL) {
blkcnt--; /* push back this block */
blksread--;
errx(1, "Tape read error on first record");
memcpy(&spclpt, tapebuf, TP_BSIZE);
+ cvtflag = 0;
if (converthead(&spclpt) == FAIL) {
cvtflag++;
if (converthead(&spclpt) == FAIL) {
if (checksum((int *)buf) == FAIL)
return (FAIL);
if (Bcvt)
- swabst((u_char *)"8i4s31i528bi192b3i", (u_char *)buf);
+ swabst((u_char *)"8i4s1l29i528bi192b4i", (u_char *)buf);
goto good;
}
memcpy(&u_ospcl.s_ospcl, buf, TP_BSIZE);
#ifndef lint
static const char rcsid[] =
- "$Id: xattr.c,v 1.2 2005/06/08 09:34:40 stelian Exp $";
+ "$Id: xattr.c,v 1.3 2005/06/08 13:24:12 stelian Exp $";
#endif /* not lint */
#include <config.h>
}
ext_acl->a_version = POSIX_ACL_XATTR_VERSION;
- if (Bcvt)
- swabst("1i", (u_char *)ext_acl);
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("1i", (u_char *)ext_acl);
+#endif
for (n=0; n < acl->a_count; n++, ext_entry++) {
ext_entry->e_tag = acl->a_entries[n].e_tag;
ext_entry->e_perm = acl->a_entries[n].e_perm;
ext_entry->e_id = acl->a_entries[n].e_id;
- if (Bcvt)
- swabst("2s1i", (u_char *)ext_entry);
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("2s1i", (u_char *)ext_entry);
+#endif
}
return real_size;
}
fprintf(stderr, "ACL size too little\n");
return NULL;
}
- if (Bcvt)
- swabst("1i", (u_char *)value);
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("1i", (u_char *)value);
+#endif
if (((ext3_acl_header *)value)->a_version != EXT3_ACL_VERSION) {
fprintf(stderr, "ACL version unknown\n");
return NULL;
acl->a_count = count;
for (n=0; n < count; n++) {
- if (Bcvt)
- swabst("2s1i", (u_char *)value);
ext3_acl_entry *entry = (ext3_acl_entry *)value;
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("2s", (u_char *)entry);
+#endif
if ((char *)value + sizeof(ext3_acl_entry_short) > end)
goto fail;
acl->a_entries[n].e_tag = entry->e_tag;
case ACL_USER:
case ACL_GROUP:
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("4b1i", (u_char *)entry);
+#endif
value = (char *)value + sizeof(ext3_acl_entry);
if ((char *)value > end)
goto fail;
end = buffer + XATTR_MAXSIZE;
- if (Bcvt)
- swabst("4i", (u_char *)buffer);
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("4i", (u_char *)buffer);
+#endif
if (HDR(buffer)->h_magic != EXT2_XATTR_MAGIC &&
HDR(buffer)->h_magic != EXT2_XATTR_MAGIC2) {
/* check the on-disk data structure */
entry = FIRST_ENTRY(buffer);
- if (Bcvt)
- swabst("2b1s3i", (u_char *)entry);
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("2b1s3i", (u_char *)entry);
+#endif
while (!IS_LAST_ENTRY(entry)) {
struct ext2_xattr_entry *next = EXT2_XATTR_NEXT(entry);
return FAIL;
}
entry = next;
- if (Bcvt)
- swabst("2b1s3i", (u_char *)entry);
+#if BYTE_ORDER == BIG_ENDIAN
+ swabst("2b1s3i", (u_char *)entry);
+#endif
}
return GOOD;
}