afs: Remove SRXAFSCB_GetDE 88/14488/2
authorAndrew Deason <adeason@sinenomine.net>
Sat, 9 Jan 2021 18:50:03 +0000 (12:50 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 13 Jan 2021 05:34:53 +0000 (00:34 -0500)
The GetDE RPC has been commented out from afscbint.xg effectively
since it was introduced, but we still define the SRXAFSCB_GetDE server
stub for it.

This is useless, but also potentially dangerous, since the stub
routine just returns success, without populating the output arguments.
One of the output arguments is a string, and so if this RPC is
actually run, the rxgen-generated server code will try to xdr_string()
that string. Since we never set it to anything, this will result in
xdr_string trying to dereference a NULL pointer.

None of this actually happens currently, since the GetDE RPC is
commented out. But to avoid the above situation if it's ever
uncommented, remove the useless SRXAFSCB_GetDE function.

Change-Id: I6ef478ee69a8de1ac14baa86aa82489181d67452
Reviewed-on: https://gerrit.openafs.org/14488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/afs/afs_callback.c

index 73e9cfd..5c51ebe 100644 (file)
@@ -1633,14 +1633,3 @@ SRXAFSCB_TellMeAboutYourself(struct rx_call *a_call,
 
     return code;
 }
-
-
-int
-SRXAFSCB_GetDE(struct rx_call *a_call, afs_int32 a_index, afs_int32 *addr,
-              afs_int32 *inode, afs_int32 *flags, afs_int32 *time,
-              char ** fileName)
-{ /*SRXAFSCB_GetDE*/
-    int code = 0;                              /*Return code*/
-    return(code);
-
-} /*SRXAFSCB_GetDE*/