kauth: Don't overflow stack when building username
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 09:35:01 +0000 (09:35 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 10 Mar 2013 03:13:39 +0000 (19:13 -0800)
commitcc194827a841f057654f1dbe4dcb3f6de98c1c60
tree8a981a85735c8c25bfe4f3cccd9f2508679977d6
parent25011b4544e48dffd5978201669f7b9e23da3144
kauth: Don't overflow stack when building username

knfs constructs the userName by combining the clientName.name
and clientName.instance arrays, along with a dot separator. Make
sure that the userName array is big enough to hold these, and
use strlcpy and strlcat just to make sure.

Caught by coverity (#985829)

Change-Id: I75431212c8464861a26546c9e47d13acbff08967
Reviewed-on: http://gerrit.openafs.org/9351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/kauth/knfs.c