]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
kauth: Move COUNT_REQ to beginning of block
authorAndrew Deason <adeason@sinenomine.net>
Mon, 26 Aug 2019 21:08:31 +0000 (16:08 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sat, 25 Jan 2020 20:56:42 +0000 (15:56 -0500)
Commit b604ee7a (OPENAFS-SA-2018-002 kaserver: prevent KAM_ListEntry
information leak) added a memset in kamListEntry before COUNT_REQ, but
COUNT_REQ declares a local variable. This breaks the WINNT build,
because we must declare variables at the beginning of a block.

To fix this, just swap the two lines.

Reviewed-on: https://gerrit.openafs.org/13815
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit b9b5385e6a04dcacd180f33e39495c7909fe4df3)

Change-Id: Id9c1fd67e4614f8f433415486e107ecb4bd0d708
Reviewed-on: https://gerrit.openafs.org/13849
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/kauth/kaprocs.c

index 1c6c68f97236543363d4561013e05950085d742c..26c1af46f1cbb8bc15c50feb6fe1c2b04b9907b8 100644 (file)
@@ -1700,8 +1700,8 @@ kamListEntry(struct rx_call *call,
     afs_int32 caller;
     struct kaentry tentry;
 
-    memset(name, 0, sizeof(*name));
     COUNT_REQ(ListEntry);
+    memset(name, 0, sizeof(*name));
     if ((code = InitAuthServ(&tt, LOCKREAD, this_op)))
        return code;
     code = check_auth(call, tt, 1, &caller);