summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4idmap.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-07-31 00:37:52 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 15:39:38 -0700
commit0a725fc4d3bfc4734164863d6c50208b109ca5c7 (patch)
treed0b8c618a5af484b88c08dc04643fa05e1bcf144 /fs/nfsd/nfs4idmap.c
parent749997e5127a1df6b68a10c686af3f5b819a41a2 (diff)
downloadlwn-0a725fc4d3bfc4734164863d6c50208b109ca5c7.tar.gz
lwn-0a725fc4d3bfc4734164863d6c50208b109ca5c7.zip
nfsd4: idmap upcalls should use unsigned uid and gid
We shouldn't be using negative uid's and gid's in the idmap upcalls. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
-rw-r--r--fs/nfsd/nfs4idmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index 2cf9a9a2d89c..2ccffde81b84 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -138,7 +138,7 @@ idtoname_request(struct cache_detail *cd, struct cache_head *ch, char **bpp,
char idstr[11];
qword_add(bpp, blen, ent->authname);
- snprintf(idstr, sizeof(idstr), "%d", ent->id);
+ snprintf(idstr, sizeof(idstr), "%u", ent->id);
qword_add(bpp, blen, ent->type == IDMAP_TYPE_GROUP ? "group" : "user");
qword_add(bpp, blen, idstr);
@@ -165,7 +165,7 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
return 0;
}
ent = container_of(h, struct ent, h);
- seq_printf(m, "%s %s %d", ent->authname,
+ seq_printf(m, "%s %s %u", ent->authname,
ent->type == IDMAP_TYPE_GROUP ? "group" : "user",
ent->id);
if (test_bit(CACHE_VALID, &h->flags))
@@ -349,7 +349,7 @@ nametoid_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
ent->type == IDMAP_TYPE_GROUP ? "group" : "user",
ent->name);
if (test_bit(CACHE_VALID, &h->flags))
- seq_printf(m, " %d", ent->id);
+ seq_printf(m, " %u", ent->id);
seq_printf(m, "\n");
return 0;
}