From 2a1c74123aa2b54f3e8d0b726f5a4bdccc34c900 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 31 Aug 2003 04:31:28 -0700 Subject: [PATCH] [PATCH] Fix SELinux format specifiers From: Stephen Smalley , James Morris This patch corrects several format specifiers in the SELinux security server code. --- security/selinux/ss/ebitmap.c | 10 +++++----- security/selinux/ss/policydb.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index a277f06b88cda..7ea4300c63dd9 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c @@ -250,8 +250,8 @@ int ebitmap_read(struct ebitmap *e, void *fp) count = le32_to_cpu(buf[2]); if (mapsize != MAPSIZE) { - printk(KERN_ERR "security: ebitmap: map size %d does not " - "match my size %d (high bit was %d)\n", mapsize, + printk(KERN_ERR "security: ebitmap: map size %u does not " + "match my size %Zd (high bit was %d)\n", mapsize, MAPSIZE, e->highbit); goto out; } @@ -261,7 +261,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) } if (e->highbit & (MAPSIZE - 1)) { printk(KERN_ERR "security: ebitmap: high bit (%d) is not a " - "multiple of the map size (%d)\n", e->highbit, MAPSIZE); + "multiple of the map size (%Zd)\n", e->highbit, MAPSIZE); goto bad; } l = NULL; @@ -283,13 +283,13 @@ int ebitmap_read(struct ebitmap *e, void *fp) if (n->startbit & (MAPSIZE - 1)) { printk(KERN_ERR "security: ebitmap start bit (%d) is " - "not a multiple of the map size (%d)\n", + "not a multiple of the map size (%Zd)\n", n->startbit, MAPSIZE); goto bad_free; } if (n->startbit > (e->highbit - MAPSIZE)) { printk(KERN_ERR "security: ebitmap start bit (%d) is " - "beyond the end of the bitmap (%d)\n", + "beyond the end of the bitmap (%Zd)\n", n->startbit, (e->highbit - MAPSIZE)); goto bad_free; } diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index d1ffecbbd117d..f4a38f435a16e 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -1074,7 +1074,7 @@ int policydb_read(struct policydb *p, void *fp) len = buf[1]; if (len != strlen(POLICYDB_STRING)) { printk(KERN_ERR "security: policydb string length %d does not " - "match expected length %d\n", + "match expected length %Zd\n", len, strlen(POLICYDB_STRING)); goto bad; } -- 2.53.0