OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-387-g877d9d7
Gerrit Code Review
gerrit@openafs.org
Fri, 28 Jun 2019 22:26:50 -0400
The following commit has been merged in the master branch:
commit 877d9d79a32b9e81911cb567f844b11c693229f0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 30 15:41:22 2018 -0500
aklog: Avoid misleading AFSCELL message
Currently, if the AFSCELL environment variable is set, aklog (and
other libauth-using utilities) print out a message when
afsconf_GetLocalCell is called:
Note: Operation is performed on cell env.example.com
However, this message is also printed (with the AFSCELL cell) when
aklog is given the -cell command-line argument, even though aklog
actually uses the cell given on the command line. For example:
$ AFSCELL=env.example.com aklog -cell cli.example.com -d
Note: Operation is performed on cell env.example.com
Authenticating to cell cli.example.com (server srv1.example.com).
[...]
libauth will normally not print the "Operation" message if we're not
using the default cell, but it determines this by checking if someone
called afsconf_GetCellInfo before calling afsconf_GetLocalCell. And
currently, aklog calls afsconf_GetLocalCell before
afsconf_GetCellInfo, so the message gets printed because libauth has
no way of knowing that we're actually using a different cell.
klog gets around this by making an additional ignored call to
afsconf_GetCellInfo before afsconf_GetLocalCell, but we can fix this
in aklog by just changing the order of the calls. So, just call
afsconf_GetCellInfo first; if we're using the local cell, we can just
give a NULL cell parameter, instead of looking up the local cellname
first.
Change-Id: I53469ee93d6e88632a944a87a031e0ffa4ede584
Reviewed-on: https://gerrit.openafs.org/13371
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/aklog/aklog.c | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
--
OpenAFS Master Repository