From b4901af20f67730cc63e38dcfd70d66c8ccd677b Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Tue, 13 Dec 2011 14:49:00 -0500 Subject: [PATCH] nfsidmap: Stack variable not being initialized. The 'clearing' variable was not being initialized to zero which was cause the default key ring to always be cleared. Signed-off-by: Steve Dickson --- utils/nfsidmap/nfsidmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c index c6b730b..ce8cf3e 100644 --- a/utils/nfsidmap/nfsidmap.c +++ b/utils/nfsidmap/nfsidmap.c @@ -211,7 +211,7 @@ int main(int argc, char **argv) int timeout = 600; key_serial_t key; char *progname, *keystr = NULL; - int clearring, keymask = 0; + int clearing = 0, keymask = 0; /* Set the basename */ if ((progname = strrchr(argv[0], '/')) != NULL) @@ -236,7 +236,7 @@ int main(int argc, char **argv) keystr = strdup(optarg); break; case 'c': - clearring++; + clearing++; break; case 'v': verbose++; @@ -254,7 +254,7 @@ int main(int argc, char **argv) rc = key_revoke(keystr, keymask); return rc; } - if (clearring) { + if (clearing) { rc = keyring_clear(DEFAULT_KEYRING); return rc; } -- 2.39.5