{
EA_ATTR *ea;
u8 *buf = NULL;
+ le32 *pval;
s64 data_size;
if (attr->non_resident) {
printf("\tValue:\t\t ");
if (ea->name_length == 11 &&
!strncmp((const char*)"SETFILEBITS",
- (const char*)ea->name, 11))
- printf("0%o\n", (unsigned)le32_to_cpu(*(le32*)
- (ea->value + ea->name_length + 1)));
- else
+ (const char*)ea->name, 11)) {
+ pval = (le32*)(ea->value + ea->name_length + 1);
+ printf("0%lo\n", (unsigned long)le32_to_cpu(*pval));
+ } else
printf("'%s'\n", ea->value + ea->name_length + 1);
if (ea->next_entry_offset)
ea = (EA_ATTR*)((u8*)ea +
/*
* Display and audit security attributes in an NTFS volume
*
- * Copyright (c) 2007-2012 Jean-Pierre Andre
+ * Copyright (c) 2007-2013 Jean-Pierre Andre
*
* Options :
* -a auditing security data
*
* Aug 2012, version 1.4.0
* - added an option for user mapping proposal
+ *
+ * Sep 2013, version 1.4.1
+ * - silenced an aliasing warning by gcc >= 4.8
*/
/*
* General parameters which may have to be adapted to needs
*/
-#define AUDT_VERSION "1.4.0"
+#define AUDT_VERSION "1.4.1"
#define GET_FILE_SECURITY "ntfs_get_file_security"
#define SET_FILE_SECURITY "ntfs_set_file_security"
int mode;
unsigned int off;
int i;
+ le32 *pattr;
BOOL isdump;
BOOL done;
/* decode it into attribute */
if (isdump && (off == pos)) {
for (i=first+8; i<lth; i+=9) {
+ pattr = (le32*)&attr[pos];
v = getlsbhex(&line[i]);
- *(le32*)&attr[pos] = cpu_to_le32(v);
+ *pattr = cpu_to_le32(v);
pos += 4;
}
}
int i;
int count;
int attrib;
+ le32 *pattr;
BOOL withattr;
BOOL done;
/* decode it into attribute */
if (isdump && (off == pos)) {
for (i=first+8; i<lth; i+=9) {
+ pattr = (le32*)&attr[pos];
v = getlsbhex(&line[i]);
- *(le32*)&attr[pos] = cpu_to_le32(v);
+ *pattr = cpu_to_le32(v);
pos += 4;
}
}