diff options
author | Kevin Coffman <kwc@citi.umich.edu> | 2007-02-08 17:27:09 -0500 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-02-09 11:41:45 +1100 |
commit | 2344b8edd958a1089fb19e985a735b41f6e7677e (patch) | |
tree | 098c6e31057a4fd9ef12bac8d00721cdc3e05328 /utils/gssd/cacheio.c | |
parent | b79ad6eabc662867de9e91254ae391fdd08c8428 (diff) | |
download | nfs-utils-2344b8edd958a1089fb19e985a735b41f6e7677e.tar.gz nfs-utils-2344b8edd958a1089fb19e985a735b41f6e7677e.tar.xz nfs-utils-2344b8edd958a1089fb19e985a735b41f6e7677e.zip |
Treat GSSAPI error codes as unsigned.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
GSSAPI error codes (major and minor) are defined as unsigned values.
However, we treat them as signed while passing them down to the
kernel where conversion fails if they include the minus sign.
Convert them as unsigned.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/gssd/cacheio.c')
-rw-r--r-- | utils/gssd/cacheio.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/gssd/cacheio.c b/utils/gssd/cacheio.c index f2f2960..e24ef56 100644 --- a/utils/gssd/cacheio.c +++ b/utils/gssd/cacheio.c @@ -132,6 +132,17 @@ void qword_addint(char **bpp, int *lp, int n) *lp -= len; } +void qword_adduint(char **bpp, int *lp, unsigned int n) +{ + int len; + + len = snprintf(*bpp, *lp, "%u ", n); + if (len > *lp) + len = *lp; + *bpp += len; + *lp -= len; +} + void qword_addeol(char **bpp, int *lp) { if (*lp <= 0) |