PATCH: audit format mismatch for inode number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i_ino is unsigned.  We recently saw an audit message with a negative
inode number in procfs due to this.

 - todd

Signed-off-by: Todd C. Miller <tmiller@xxxxxxxxxx>

---

diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index e4396a8..e233a3d 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -586,7 +586,7 @@ void avc_audit(u32 ssid, u32 tsid,
 				}
 			}
 			if (inode)
-				audit_log_format(ab, " dev=%s ino=%ld",
+				audit_log_format(ab, " dev=%s ino=%lu",
 						 inode->i_sb->s_id,
 						 inode->i_ino);
 			break;

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux