summaryrefslogtreecommitdiff
path: root/sys/src/cmd/auth
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-09-27 11:44:21 +0200
committercinap_lenrek <cinap_lenrek@centraldogma>2011-09-27 11:44:21 +0200
commitb8d741d34b4130afabe5467a0d9e0e3d57e6c765 (patch)
treef7e35a551aa72fc6574131fcfec7cebba57034c7 /sys/src/cmd/auth
parentbb3a16f07f32f7eabd51036b3c3ec1dc81a1d3fe (diff)
factotum: fix flush handling for /mnt/factotum/needkey use
Diffstat (limited to 'sys/src/cmd/auth')
-rw-r--r--sys/src/cmd/auth/factotum/confirm.c12
-rw-r--r--sys/src/cmd/auth/factotum/log.c2
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/src/cmd/auth/factotum/confirm.c b/sys/src/cmd/auth/factotum/confirm.c
index 63086d0f2..805f728bf 100644
--- a/sys/src/cmd/auth/factotum/confirm.c
+++ b/sys/src/cmd/auth/factotum/confirm.c
@@ -21,8 +21,9 @@ confirmflush(Req *r)
*l = r->aux;
if(r->aux == nil)
cuselast = l;
- closereq(r);
- break;
+ r->aux = nil;
+ respond(r, "interrupted");
+ return;
}
}
logbufflush(&confbuf, r);
@@ -81,6 +82,7 @@ confirmwrite(char *s)
*l = r->aux;
if(r->aux == nil)
cuselast = l;
+ r->aux = nil;
break;
}
}
@@ -143,8 +145,9 @@ needkeyflush(Req *r)
*l = r->aux;
if(r->aux == nil)
needlast = l;
- closereq(r);
- break;
+ r->aux = nil;
+ respond(r, "interrupted");
+ return;
}
}
logbufflush(&needkeybuf, r);
@@ -175,6 +178,7 @@ needkeywrite(char *s)
*l = r->aux;
if(r->aux == nil)
needlast = l;
+ r->aux = nil;
break;
}
}
diff --git a/sys/src/cmd/auth/factotum/log.c b/sys/src/cmd/auth/factotum/log.c
index 82ed6adf9..26c3cfc5f 100644
--- a/sys/src/cmd/auth/factotum/log.c
+++ b/sys/src/cmd/auth/factotum/log.c
@@ -59,9 +59,9 @@ logbufflush(Logbuf *lb, Req *r)
for(l=&lb->wait; *l; l=&(*l)->aux){
if(*l == r){
*l = r->aux;
- r->aux = nil;
if(*l == nil)
lb->waitlast = l;
+ r->aux = nil;
respond(r, "interrupted");
break;
}