diff --git a/cache-config/t3c-request/t3c-request.go b/cache-config/t3c-request/t3c-request.go index 821ee80cdc..4f94fc186c 100644 --- a/cache-config/t3c-request/t3c-request.go +++ b/cache-config/t3c-request/t3c-request.go @@ -68,5 +68,5 @@ func main() { os.Exit(3) } } - cfg.TCCfg.TOClient.WriteFsCookie(toreq.FsCookiePath) + cfg.TCCfg.TOClient.WriteFsCookie(toreq.FsCookiePath + cfg.TOUser + ".cookie") } diff --git a/cache-config/t3c-update/t3c-update.go b/cache-config/t3c-update/t3c-update.go index 310a4f3db4..31f9884ef5 100644 --- a/cache-config/t3c-update/t3c-update.go +++ b/cache-config/t3c-update/t3c-update.go @@ -80,5 +80,5 @@ func main() { } else { log.Infoln("Update successfully completed") } - + cfg.TCCfg.TOClient.WriteFsCookie(toreq.FsCookiePath + cfg.TOUser + ".cookie") } diff --git a/cache-config/t3cutil/toreq/client.go b/cache-config/t3cutil/toreq/client.go index 289eddafac..5f5d97ddfb 100644 --- a/cache-config/t3cutil/toreq/client.go +++ b/cache-config/t3cutil/toreq/client.go @@ -68,14 +68,14 @@ func (cl *TOClient) SetURL(newURL string) { } } -const FsCookiePath = `/var/lib/trafficcontrol-cache-config/fsCookie` +const FsCookiePath = `/var/lib/trafficcontrol-cache-config/` // New logs into Traffic Ops, returning the TOClient which contains the logged-in client. func New(url *url.URL, user string, pass string, insecure bool, timeout time.Duration, userAgent string) (*TOClient, error) { log.Infoln("URL: '" + url.String() + "' User: '" + user + "' Pass len: '" + strconv.Itoa(len(pass)) + "'") client := &TOClient{} - fsCookie, err := torequtil.GetFsCookie(FsCookiePath) + fsCookie, err := torequtil.GetFsCookie(FsCookiePath + user + ".cookie") if err != nil { log.Infoln("Error retrieving cookie: ", err) }