From: Marc Dionne Date: Fri, 5 Jul 2013 16:50:36 +0000 (-0400) Subject: bos: Do encryption if requested X-Git-Tag: upstream/1.8.0_pre1^2~1106 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7565cb420366d79df319e344678a8d9ceab6db08;p=packages%2Fo%2Fopenafs.git bos: Do encryption if requested Commit d008089a79 didn't replace the processing of the aencrypt flag passed to the GetConn() function, causing all bos connections to be un-encrypted. This causes "addkey" to fail with an error from the server, and "listkeys" to silently ignore the -showkey option to display keys. Set the AFSCONF_SECOPTS_ALWAYSENCRYPT flag, and don't set AFSCONF_SECOPTS_FALLBACK_NULL since fallback is not acceptable if the caller requested enrcyption. Change-Id: I6a15fa20c172ab2ddfc6494fbcd62ec6bc7fc442 Reviewed-on: http://gerrit.openafs.org/10043 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/bozo/bos.c b/src/bozo/bos.c index 97564e5e3..7d0382619 100644 --- a/src/bozo/bos.c +++ b/src/bozo/bos.c @@ -171,7 +171,11 @@ GetConn(struct cmd_syndesc *as, int aencrypt) } memcpy(&addr, th->h_addr, sizeof(afs_int32)); - secFlags = AFSCONF_SECOPTS_FALLBACK_NULL; + if (aencrypt) + secFlags = AFSCONF_SECOPTS_ALWAYSENCRYPT; + else + secFlags = AFSCONF_SECOPTS_FALLBACK_NULL; + if (as->parms[ADDPARMOFFSET + 2].items) { /* -localauth */ secFlags |= AFSCONF_SECOPTS_LOCALAUTH;