bastion 0.55.3
This commit is contained in:
@@ -296,13 +296,6 @@ func nonceSave(m map[string]string) error {
|
||||
return atomicWrite(p, raw)
|
||||
}
|
||||
|
||||
func nonceSeen(nonce string) bool {
|
||||
deviceMu.Lock()
|
||||
defer deviceMu.Unlock()
|
||||
_, ok := nonceLoad()[nonce]
|
||||
return ok
|
||||
}
|
||||
|
||||
// burnNonce records the nonce until its approval's expiry (after which a
|
||||
// replay fails on expiry anyway).
|
||||
func burnNonce(a *deviceApproval) {
|
||||
@@ -331,17 +324,6 @@ func approvalOK(dir, approval, purpose string) error {
|
||||
return stepupCheckApproval(dir, approval, purpose)
|
||||
}
|
||||
|
||||
// approvalKind names how an approval was given, for the audit line.
|
||||
func approvalKind(approval string) string {
|
||||
switch {
|
||||
case strings.TrimSpace(approval) == "":
|
||||
return ""
|
||||
case isDeviceApproval(approval):
|
||||
return "device"
|
||||
}
|
||||
return "console"
|
||||
}
|
||||
|
||||
// approvalRequired: does a change on this box need the person's approval?
|
||||
// Always on an anchored box (writes.go); on a local box only when the person
|
||||
// enrolled a factor here — the rule the DCN lanes have had since stepup.go.
|
||||
|
||||
Reference in New Issue
Block a user