butc: do not use stack garbage for secobj
authorBen Kaduk <kaduk@mit.edu>
Tue, 19 Feb 2013 18:06:36 +0000 (13:06 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 19 Feb 2013 20:17:55 +0000 (12:17 -0800)
The butc only ever handles connections over rxnull anyway, so just
specify an array of security objects of length one.

Change-Id: Ia073157488ac6b887f972448074ad1615422e26e
Reviewed-on: http://gerrit.openafs.org/9140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/butc/tcmain.c

index ada5099..885d44c 100644 (file)
@@ -835,7 +835,7 @@ static int
 WorkerBee(struct cmd_syndesc *as, void *arock)
 {
     afs_int32 code;
-    struct rx_securityClass *(securityObjects[3]);
+    struct rx_securityClass *(securityObjects[1]);
     struct rx_service *service;
     time_t tokenExpires;
     char cellName[64];
@@ -1083,14 +1083,13 @@ WorkerBee(struct cmd_syndesc *as, void *arock)
      */
 
     securityObjects[0] = rxnull_NewServerSecurityObject();
-    securityObjects[1] = (struct rx_securityClass *)0; /* don't bother with rxvab */
     if (!securityObjects[0]) {
        TLog(0, "rxnull_NewServerSecurityObject");
        exit(1);
     }
 
     service =
-       rx_NewServiceHost(host, 0, 1, "BUTC", securityObjects, 3, TC_ExecuteRequest);
+       rx_NewServiceHost(host, 0, 1, "BUTC", securityObjects, 1, TC_ExecuteRequest);
     if (!service) {
        TLog(0, "rx_NewService");
        exit(1);