Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cache-config/t3c-request/t3c-request.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ func main() {
os.Exit(3)
}
}
cfg.TCCfg.TOClient.WriteFsCookie(toreq.FsCookiePath)
cfg.TCCfg.TOClient.WriteFsCookie(toreq.FsCookiePath + cfg.TOUser + ".cookie")
}
2 changes: 1 addition & 1 deletion cache-config/t3c-update/t3c-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ func main() {
} else {
log.Infoln("Update successfully completed")
}

cfg.TCCfg.TOClient.WriteFsCookie(toreq.FsCookiePath + cfg.TOUser + ".cookie")
}
4 changes: 2 additions & 2 deletions cache-config/t3cutil/toreq/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down