From afa6bda887c39101dbfc7c3268a315e48d47fa09 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 16 Dec 2014 17:03:34 -0600 Subject: [PATCH] cacheout: Use authenticated secClass for VLDB Currently 'cacheout' will always utilize an unauthenticated connection when talking to the VDLB, even if it uses an authenticated connection when talking to fileservers. This is regardless of any tokens retrieved or command-line parameters, etc. Using an authenticated connection to the VLDB can be useful, since a user may want to encrypt the VLDB communication, or require stronger guarantees of data consistency. So, just use the same security class information for our VLDB communication as for our fileserver communication. 'scnull' is now not used anywhere after this commit, so get rid of it. Change-Id: I1e8a440ea7427399a3b219246e4c3623a603c35e Reviewed-on: http://gerrit.openafs.org/11637 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Daria Brashear --- src/venus/cacheout.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/venus/cacheout.c b/src/venus/cacheout.c index 33f1861..f7b1d5a 100644 --- a/src/venus/cacheout.c +++ b/src/venus/cacheout.c @@ -239,7 +239,6 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock) struct afsconf_cell info; struct rx_connection *serverconns[MAXSERVERS]; afs_int32 code, i; - struct rx_securityClass *scnull; rxkad_level sclevel = rxkad_auth; sprintf(confdir, "%s", AFSDIR_CLIENT_ETC_DIRPATH); @@ -258,7 +257,7 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock) return 1; } - scnull = sc = rxnull_NewClientSecurityObject(); + sc = rxnull_NewClientSecurityObject(); scindex = 0; tdir = afsconf_Open(confdir); @@ -310,8 +309,8 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock) for (i = 0; i < info.numServers; ++i) serverconns[i] = rx_NewConnection(info.hostAddr[i].sin_addr.s_addr, - info.hostAddr[i].sin_port, USER_SERVICE_ID, scnull, - 0); + info.hostAddr[i].sin_port, USER_SERVICE_ID, sc, + scindex); for (; i < MAXSERVERS; ++i) { serverconns[i] = (struct rx_connection *)0; } -- 1.9.4