]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
nfsidmap: Stack variable not being initialized. nfs-utils-1-2-6-rc4
authorSteve Dickson <steved@redhat.com>
Tue, 13 Dec 2011 19:49:00 +0000 (14:49 -0500)
committerSteve Dickson <steved@redhat.com>
Tue, 13 Dec 2011 19:49:00 +0000 (14:49 -0500)
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 <steved@redhat.com>
utils/nfsidmap/nfsidmap.c

index c6b730bc7f637dc0aa7d0d0cba2ae2eede8fb73e..ce8cf3e3982705811304730ed91f66ca68976089 100644 (file)
@@ -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;              
        }