Changes by: yura
Update of /cvs/linux-ntfs/ntfsprogs/ntfsprogs
In directory delta357.server4you.de:/tmp/cvs-serv5080/ntfsprogs
Modified Files:
ntfsinfo.c
Log Message:
support missing owner and group in sd
Index: ntfsinfo.c
===================================================================
RCS file: /cvs/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -p -r1.127 -r1.128
--- ntfsinfo.c 1 Jul 2006 11:14:08 -0000 1.127
+++ ntfsinfo.c 13 Jul 2006 02:35:32 -0000 1.128
@@ -849,15 +849,21 @@ static void ntfs_dump_security_descripto
/* TODO: parse the flags */
printf("%s\tFlags:\t\t\t 0x%0x\n", indent, sec_desc->control);
- sid = ntfs_sid_to_mbs((SID *)((char *)sec_desc +
- le32_to_cpu(sec_desc->owner)), NULL, 0);
- printf("%s\tOwner SID:\t\t %s\n", indent, sid);
- free(sid);
-
- sid = ntfs_sid_to_mbs((SID *)((char *)sec_desc +
- le32_to_cpu(sec_desc->group)), NULL, 0);
- printf("%s\tGroup SID:\t\t %s\n", indent, sid);
- free(sid);
+ if (sec_desc->owner) {
+ sid = ntfs_sid_to_mbs((SID *)((char *)sec_desc +
+ le32_to_cpu(sec_desc->owner)), NULL, 0);
+ printf("%s\tOwner SID:\t\t %s\n", indent, sid);
+ free(sid);
+ } else
+ printf("%s\tOwner SID:\t\t missing\n", indent);
+
+ if (sec_desc->group) {
+ sid = ntfs_sid_to_mbs((SID *)((char *)sec_desc +
+ le32_to_cpu(sec_desc->group)), NULL, 0);
+ printf("%s\tGroup SID:\t\t %s\n", indent, sid);
+ free(sid);
+ } else
+ printf("%s\tGroup SID:\t\t missing\n", indent);
printf("%s\tSystem ACL:\t\t ", indent);
if (sec_desc->control & SE_SACL_PRESENT) {
|