auth: Fix GetTokenEx with NULL cellName
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 16 Jul 2012 19:09:04 +0000 (20:09 +0100)
committerDerrick Brashear <shadow@dementix.org>
Mon, 23 Jul 2012 16:26:17 +0000 (09:26 -0700)
commit0eca3c1822683ccf1b559eb8e455688c5bdc1fc9
treea42912de66e104b5a1af8205445637b8448cf0d5
parent1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec
auth: Fix GetTokenEx with NULL cellName

If GetTokenEx is called with a NULL cellName, it means use the
local cell. To do this with the legacy interface, a 0 length string
must be used for the cell instance of the ktc_principal passed to
GetToken. Fix this so that we do so, rather than attempting to
strcpy(..., NULL) which never ends well.

Caught by clang-analyzer

Change-Id: I53d9bdf0fc280ee073a2fb7693659269df29c2eb
Reviewed-on: http://gerrit.openafs.org/7840
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/auth/ktc.c