]> andersk Git - openssh.git/blobdiff - ssh-keysign.c
[buildpkg.sh.in] Last minute fix didn't make it in the .in file. :-(
[openssh.git] / ssh-keysign.c
index c7ca5c4e40094d35c5cf82fa4e291086a6c71d9f..e642948a0f78c4ebc0e784b725cfe17367402c32 100644 (file)
@@ -22,7 +22,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: ssh-keysign.c,v 1.13 2003/07/03 08:09:06 djm Exp $");
+RCSID("$OpenBSD: ssh-keysign.c,v 1.16 2004/04/18 23:10:26 djm Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/rand.h>
@@ -126,6 +126,7 @@ valid_request(struct passwd *pw, char *host, Key **ret, u_char *data,
        /* end of message */
        if (buffer_len(&b) != 0)
                fail++;
+       buffer_free(&b);
 
        debug3("valid_request: fail %d", fail);
 
@@ -167,7 +168,7 @@ main(int argc, char **argv)
        /* verify that ssh-keysign is enabled by the admin */
        original_real_uid = getuid();   /* XXX readconf.c needs this */
        initialize_options(&options);
-       (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options);
+       (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options, 0);
        fill_default_options(&options);
        if (options.enable_ssh_keysign != 1)
                fatal("ssh-keysign not enabled in %s",
@@ -233,7 +234,8 @@ main(int argc, char **argv)
        /* send reply */
        buffer_clear(&b);
        buffer_put_string(&b, signature, slen);
-       ssh_msg_send(STDOUT_FILENO, version, &b);
+       if (ssh_msg_send(STDOUT_FILENO, version, &b) == -1)
+               fatal("ssh_msg_send failed");
 
        return (0);
 }
This page took 0.047525 seconds and 4 git commands to generate.