summaryrefslogtreecommitdiffstats
path: root/back/cmd/authfs/sess.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2026-03-14 16:14:15 -0400
committerSam Anthony <sam@samanthony.xyz>2026-03-14 16:14:15 -0400
commit51c51c16bf4839940124695fbee65c152f6d29c5 (patch)
treeb3da9c0bf28306c80167074ee051ded043be9e7d /back/cmd/authfs/sess.go
parent700096b078f6e16f2c5c967ea140f0b93e799986 (diff)
downloadbuth-51c51c16bf4839940124695fbee65c152f6d29c5.zip
authfs: implement Qid() for Session and SessionsDir
Diffstat (limited to 'back/cmd/authfs/sess.go')
-rw-r--r--back/cmd/authfs/sess.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/back/cmd/authfs/sess.go b/back/cmd/authfs/sess.go
index 138ea84..3d0cca3 100644
--- a/back/cmd/authfs/sess.go
+++ b/back/cmd/authfs/sess.go
@@ -4,12 +4,15 @@ import (
"sync/atomic"
"time"
+ p9 "github.com/Harvey-OS/ninep/protocol"
+
"git.samanthony.xyz/buth/back/auth"
)
type Session struct {
auth.SessId
auth.Uname
+ qid p9.QID
timer *time.Timer
dead *atomic.Bool
}
@@ -20,6 +23,7 @@ func NewSession(id auth.SessId, uname auth.Uname) *Session {
return &Session{
id,
uname,
+ p9.QID{Path: NextQidPath()},
timer,
dead,
}
@@ -46,3 +50,5 @@ func (s *Session) Extend() bool {
// already expired
return false
}
+
+func (s *Session) Qid() (p9.QID, error) { return s.qid, nil }