aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth
diff options
context:
space:
mode:
authorTw <wei.tan@intel.com>2021-07-12 11:21:00 +0800
committerDan Cross <crossd@gmail.com>2022-09-07 09:34:32 -0400
commit9dab36f2af60901565b97c8ca0ece46f70fa3ead (patch)
tree627c486ed4587c917afd453bd4f6e0d4f1419429 /src/cmd/auth
parentc57b71966ec2b3342a3a4da515944cabf268609f (diff)
factotum: fix log read inuse bug
When log reading exits, inuse flag should be cleared. Signed-off-by: Tw <wei.tan@intel.com>
Diffstat (limited to 'src/cmd/auth')
-rw-r--r--src/cmd/auth/factotum/dat.h1
-rw-r--r--src/cmd/auth/factotum/fs.c1
-rw-r--r--src/cmd/auth/factotum/log.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/auth/factotum/dat.h b/src/cmd/auth/factotum/dat.h
index db4a3b1e..8e26439e 100644
--- a/src/cmd/auth/factotum/dat.h
+++ b/src/cmd/auth/factotum/dat.h
@@ -111,6 +111,7 @@ extern char *owner; /* main.c */
extern Proto *prototab[]; /* main.c */
extern Ring ring; /* key.c */
extern char *rpcname[]; /* rpc.c */
+extern int *loginuse; /* fs.c */
extern char Easproto[]; /* err.c */
diff --git a/src/cmd/auth/factotum/fs.c b/src/cmd/auth/factotum/fs.c
index 811bd5b0..1a3f5548 100644
--- a/src/cmd/auth/factotum/fs.c
+++ b/src/cmd/auth/factotum/fs.c
@@ -260,6 +260,7 @@ fskickreply(Conv *c)
static int inuse[nelem(dirtab)];
int *confirminuse = &inuse[0];
int *needkeyinuse = &inuse[1];
+int *loginuse = &inuse[5];
static void
fsopen(Req *r)
{
diff --git a/src/cmd/auth/factotum/log.c b/src/cmd/auth/factotum/log.c
index e644028a..8c8408f2 100644
--- a/src/cmd/auth/factotum/log.c
+++ b/src/cmd/auth/factotum/log.c
@@ -107,6 +107,7 @@ void
logflush(Req *r)
{
lbflush(&logbuf, r);
+ *loginuse = 0;
}
void