From 9e5a581307e65151630072fb353aa2aa15380f24 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 8 Jul 2009 17:54:36 +0000 Subject: [PATCH] When unlocking the server, don't try to clear the prompt on clients without a prompt (such as the one issuing the unlock request). This caused the server to die if the wrong password was entered when unlocking from the command line with -U (nasty). --- server-fn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-fn.c b/server-fn.c index f1483568..0b0876e3 100644 --- a/server-fn.c +++ b/server-fn.c @@ -1,4 +1,4 @@ -/* $Id: server-fn.c,v 1.65 2009-07-01 19:15:12 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.3 2009/06/30 13:40:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -202,7 +202,7 @@ server_unlock(const char *s) for (i = 0; i < ARRAY_LENGTH(&clients); i++) { c = ARRAY_ITEM(&clients, i); - if (c == NULL) + if (c == NULL || c->prompt_buffer == NULL) continue; status_prompt_clear(c);