Deleted Added
full compact
auth2-hostbased.c (124208) auth2-hostbased.c (126274)
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26RCSID("$OpenBSD: auth2-hostbased.c,v 1.5 2003/06/24 08:23:46 markus Exp $");
26RCSID("$OpenBSD: auth2-hostbased.c,v 1.6 2004/01/19 21:25:15 markus Exp $");
27
28#include "ssh2.h"
29#include "xmalloc.h"
30#include "packet.h"
31#include "buffer.h"
32#include "log.h"
33#include "servconf.h"
34#include "compat.h"

--- 74 unchanged lines hidden (view full) ---

109#endif
110 /* test for allowed key and correct signature */
111 authenticated = 0;
112 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) &&
113 PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b),
114 buffer_len(&b))) == 1)
115 authenticated = 1;
116
27
28#include "ssh2.h"
29#include "xmalloc.h"
30#include "packet.h"
31#include "buffer.h"
32#include "log.h"
33#include "servconf.h"
34#include "compat.h"

--- 74 unchanged lines hidden (view full) ---

109#endif
110 /* test for allowed key and correct signature */
111 authenticated = 0;
112 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) &&
113 PRIVSEP(key_verify(key, sig, slen, buffer_ptr(&b),
114 buffer_len(&b))) == 1)
115 authenticated = 1;
116
117 buffer_clear(&b);
117 buffer_free(&b);
118done:
119 debug2("userauth_hostbased: authenticated %d", authenticated);
120 if (key != NULL)
121 key_free(key);
122 xfree(pkalg);
123 xfree(pkblob);
124 xfree(cuser);
125 xfree(chost);

--- 57 unchanged lines hidden ---
118done:
119 debug2("userauth_hostbased: authenticated %d", authenticated);
120 if (key != NULL)
121 key_free(key);
122 xfree(pkalg);
123 xfree(pkblob);
124 xfree(cuser);
125 xfree(chost);

--- 57 unchanged lines hidden ---