Commit 2a1c7412 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix SELinux format specifiers

From: Stephen Smalley <sds@epoch.ncsc.mil>, James Morris <jmorris@redhat.com>

This patch corrects several format specifiers in the SELinux security server
code.
parent 696bce21
...@@ -250,8 +250,8 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -250,8 +250,8 @@ int ebitmap_read(struct ebitmap *e, void *fp)
count = le32_to_cpu(buf[2]); count = le32_to_cpu(buf[2]);
if (mapsize != MAPSIZE) { if (mapsize != MAPSIZE) {
printk(KERN_ERR "security: ebitmap: map size %d does not " printk(KERN_ERR "security: ebitmap: map size %u does not "
"match my size %d (high bit was %d)\n", mapsize, "match my size %Zd (high bit was %d)\n", mapsize,
MAPSIZE, e->highbit); MAPSIZE, e->highbit);
goto out; goto out;
} }
...@@ -261,7 +261,7 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -261,7 +261,7 @@ int ebitmap_read(struct ebitmap *e, void *fp)
} }
if (e->highbit & (MAPSIZE - 1)) { if (e->highbit & (MAPSIZE - 1)) {
printk(KERN_ERR "security: ebitmap: high bit (%d) is not a " 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; goto bad;
} }
l = NULL; l = NULL;
...@@ -283,13 +283,13 @@ int ebitmap_read(struct ebitmap *e, void *fp) ...@@ -283,13 +283,13 @@ int ebitmap_read(struct ebitmap *e, void *fp)
if (n->startbit & (MAPSIZE - 1)) { if (n->startbit & (MAPSIZE - 1)) {
printk(KERN_ERR "security: ebitmap start bit (%d) is " 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); n->startbit, MAPSIZE);
goto bad_free; goto bad_free;
} }
if (n->startbit > (e->highbit - MAPSIZE)) { if (n->startbit > (e->highbit - MAPSIZE)) {
printk(KERN_ERR "security: ebitmap start bit (%d) is " 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)); n->startbit, (e->highbit - MAPSIZE));
goto bad_free; goto bad_free;
} }
......
...@@ -1074,7 +1074,7 @@ int policydb_read(struct policydb *p, void *fp) ...@@ -1074,7 +1074,7 @@ int policydb_read(struct policydb *p, void *fp)
len = buf[1]; len = buf[1];
if (len != strlen(POLICYDB_STRING)) { if (len != strlen(POLICYDB_STRING)) {
printk(KERN_ERR "security: policydb string length %d does not " printk(KERN_ERR "security: policydb string length %d does not "
"match expected length %d\n", "match expected length %Zd\n",
len, strlen(POLICYDB_STRING)); len, strlen(POLICYDB_STRING));
goto bad; goto bad;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment