|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/authfd.c 2013-10-30 17:14:26.013615342 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/authfd.c 2013-10-30 17:15:07.353327799 +0100
|
|
Petr Lautrbach |
579532 |
@@ -260,7 +260,7 @@
|
|
Petr Lautrbach |
579532 |
{
|
|
Petr Lautrbach |
579532 |
buffer_free(&auth->identities);
|
|
Petr Lautrbach |
579532 |
close(auth->fd);
|
|
Petr Lautrbach |
579532 |
- xfree(auth);
|
|
Petr Lautrbach |
579532 |
+ free(auth);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
/* Lock/unlock agent */
|
|
Petr Lautrbach |
579532 |
@@ -379,7 +379,7 @@
|
|
Petr Lautrbach |
579532 |
blob = buffer_get_string(&auth->identities, &blen);
|
|
Petr Lautrbach |
579532 |
*comment = buffer_get_string(&auth->identities, NULL);
|
|
Petr Lautrbach |
579532 |
key = key_from_blob(blob, blen);
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
break;
|
|
Petr Lautrbach |
579532 |
default:
|
|
Petr Lautrbach |
579532 |
return NULL;
|
|
Petr Lautrbach |
579532 |
@@ -472,7 +472,7 @@
|
|
Petr Lautrbach |
579532 |
buffer_put_string(&msg, blob, blen);
|
|
Petr Lautrbach |
579532 |
buffer_put_string(&msg, data, datalen);
|
|
Petr Lautrbach |
579532 |
buffer_put_int(&msg, flags);
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
if (ssh_request_reply(auth, &msg, &msg) == 0) {
|
|
Petr Lautrbach |
579532 |
buffer_free(&msg;;
|
|
Petr Lautrbach |
579532 |
@@ -612,7 +612,7 @@
|
|
Petr Lautrbach |
579532 |
key_to_blob(key, &blob, &blen);
|
|
Petr Lautrbach |
579532 |
buffer_put_char(&msg, SSH2_AGENTC_REMOVE_IDENTITY);
|
|
Petr Lautrbach |
579532 |
buffer_put_string(&msg, blob, blen);
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
} else {
|
|
Petr Lautrbach |
579532 |
buffer_free(&msg;;
|
|
Petr Lautrbach |
579532 |
return 0;
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/bufaux.c 2013-10-30 17:14:26.014615310 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/bufaux.c 2013-10-30 17:15:07.354327768 +0100
|
|
Petr Lautrbach |
579532 |
@@ -176,7 +176,7 @@
|
|
Petr Lautrbach |
579532 |
/* Get the string. */
|
|
Petr Lautrbach |
579532 |
if (buffer_get_ret(buffer, value, len) == -1) {
|
|
Petr Lautrbach |
579532 |
logerror("buffer_get_string_ret: buffer_get failed");
|
|
Petr Lautrbach |
579532 |
- xfree(value);
|
|
Petr Lautrbach |
579532 |
+ free(value);
|
|
Petr Lautrbach |
579532 |
return (NULL);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
/* Append a null character to make processing easier. */
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/bufbn.c 2013-10-30 17:14:26.014615310 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/bufbn.c 2013-10-30 17:15:07.354327768 +0100
|
|
Petr Lautrbach |
579532 |
@@ -69,7 +69,7 @@
|
|
Petr Lautrbach |
579532 |
if (oi != bin_size) {
|
|
Petr Lautrbach |
579532 |
logerror("buffer_put_bignum_ret: BN_bn2bin() failed: oi %d != bin_size %d",
|
|
Petr Lautrbach |
579532 |
oi, bin_size);
|
|
Petr Lautrbach |
579532 |
- xfree(buf);
|
|
Petr Lautrbach |
579532 |
+ free(buf);
|
|
Petr Lautrbach |
579532 |
return (-1);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -80,7 +80,7 @@
|
|
Petr Lautrbach |
579532 |
buffer_append(buffer, buf, oi);
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
memset(buf, 0, bin_size);
|
|
Petr Lautrbach |
579532 |
- xfree(buf);
|
|
Petr Lautrbach |
579532 |
+ free(buf);
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
return (0);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -167,13 +167,13 @@
|
|
Petr Lautrbach |
579532 |
if (oi < 0 || (u_int)oi != bytes - 1) {
|
|
Petr Lautrbach |
579532 |
logerror("buffer_put_bignum2_ret: BN_bn2bin() failed: "
|
|
Petr Lautrbach |
579532 |
"oi %d != bin_size %d", oi, bytes);
|
|
Petr Lautrbach |
579532 |
- xfree(buf);
|
|
Petr Lautrbach |
579532 |
+ free(buf);
|
|
Petr Lautrbach |
579532 |
return (-1);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
hasnohigh = (buf[1] & 0x80) ? 0 : 1;
|
|
Petr Lautrbach |
579532 |
buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh);
|
|
Petr Lautrbach |
579532 |
memset(buf, 0, bytes);
|
|
Petr Lautrbach |
579532 |
- xfree(buf);
|
|
Petr Lautrbach |
579532 |
+ free(buf);
|
|
Petr Lautrbach |
579532 |
return (0);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -197,21 +197,21 @@
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
if (len > 0 && (bin[0] & 0x80)) {
|
|
Petr Lautrbach |
579532 |
logerror("buffer_get_bignum2_ret: negative numbers not supported");
|
|
Petr Lautrbach |
579532 |
- xfree(bin);
|
|
Petr Lautrbach |
579532 |
+ free(bin);
|
|
Petr Lautrbach |
579532 |
return (-1);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
if (len > 8 * 1024) {
|
|
Petr Lautrbach |
579532 |
logerror("buffer_get_bignum2_ret: cannot handle BN of size %d",
|
|
Petr Lautrbach |
579532 |
len);
|
|
Petr Lautrbach |
579532 |
- xfree(bin);
|
|
Petr Lautrbach |
579532 |
+ free(bin);
|
|
Petr Lautrbach |
579532 |
return (-1);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
if (BN_bin2bn(bin, len, value) == NULL) {
|
|
Petr Lautrbach |
579532 |
logerror("buffer_get_bignum2_ret: BN_bin2bn failed");
|
|
Petr Lautrbach |
579532 |
- xfree(bin);
|
|
Petr Lautrbach |
579532 |
+ free(bin);
|
|
Petr Lautrbach |
579532 |
return (-1);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(bin);
|
|
Petr Lautrbach |
579532 |
+ free(bin);
|
|
Petr Lautrbach |
579532 |
return (0);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/buffer.c 2013-10-30 17:14:26.014615310 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/buffer.c 2013-10-30 17:15:07.355327737 +0100
|
|
Petr Lautrbach |
579532 |
@@ -50,7 +50,7 @@
|
|
Petr Lautrbach |
579532 |
if (buffer->alloc > 0) {
|
|
Petr Lautrbach |
579532 |
memset(buffer->buf, 0, buffer->alloc);
|
|
Petr Lautrbach |
579532 |
buffer->alloc = 0;
|
|
Petr Lautrbach |
579532 |
- xfree(buffer->buf);
|
|
Petr Lautrbach |
579532 |
+ free(buffer->buf);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/iterate_ssh_agent_keys.c 2013-10-30 17:14:26.031614782 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/iterate_ssh_agent_keys.c 2013-10-30 17:15:07.357327674 +0100
|
|
Petr Lautrbach |
579532 |
@@ -197,9 +197,9 @@
|
|
Petr Lautrbach |
579532 |
if(userauth_pubkey_from_id(id)) {
|
|
Petr Lautrbach |
579532 |
retval = 1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(id->filename);
|
|
Petr Lautrbach |
579532 |
+ free(id->filename);
|
|
Petr Lautrbach |
579532 |
key_free(id->key);
|
|
Petr Lautrbach |
579532 |
- xfree(id);
|
|
Petr Lautrbach |
579532 |
+ free(id);
|
|
Petr Lautrbach |
579532 |
if(retval == 1)
|
|
Petr Lautrbach |
579532 |
break;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -209,7 +209,7 @@
|
|
Petr Lautrbach |
579532 |
else {
|
|
Petr Lautrbach |
579532 |
verbose("No ssh-agent could be contacted");
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(session_id2);
|
|
Petr Lautrbach |
579532 |
+ free(session_id2);
|
|
Petr Lautrbach |
579532 |
EVP_cleanup();
|
|
Petr Lautrbach |
579532 |
return retval;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/key.c 2013-10-30 17:14:26.017615218 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/key.c 2013-10-30 17:15:07.358327643 +0100
|
|
Petr Lautrbach |
579532 |
@@ -154,7 +154,7 @@
|
|
Petr Lautrbach |
579532 |
fatal("key_free: bad key type %d", k->type);
|
|
Petr Lautrbach |
579532 |
break;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(k);
|
|
Petr Lautrbach |
579532 |
+ free(k);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
int
|
|
Petr Lautrbach |
579532 |
@@ -229,7 +229,7 @@
|
|
Petr Lautrbach |
579532 |
EVP_DigestUpdate(&ctx, blob, len);
|
|
Petr Lautrbach |
579532 |
EVP_DigestFinal(&ctx, retval, dgst_raw_length);
|
|
Petr Lautrbach |
579532 |
memset(blob, 0, len);
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
} else {
|
|
Petr Lautrbach |
579532 |
fatal("key_fingerprint_raw: blob is null");
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -324,7 +324,7 @@
|
|
Petr Lautrbach |
579532 |
break;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
memset(dgst_raw, 0, dgst_raw_len);
|
|
Petr Lautrbach |
579532 |
- xfree(dgst_raw);
|
|
Petr Lautrbach |
579532 |
+ free(dgst_raw);
|
|
Petr Lautrbach |
579532 |
return retval;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -447,11 +447,11 @@
|
|
Petr Lautrbach |
579532 |
n = uudecode(cp, blob, len);
|
|
Petr Lautrbach |
579532 |
if (n < 0) {
|
|
Petr Lautrbach |
579532 |
logerror("key_read: uudecode %s failed", cp);
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
k = key_from_blob(blob, (u_int)n);
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
if (k == NULL) {
|
|
Petr Lautrbach |
579532 |
logerror("key_read: key_from_blob %s failed", cp);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
@@ -526,8 +526,8 @@
|
|
Petr Lautrbach |
579532 |
fprintf(f, "%s %s", key_ssh_name(key), uu);
|
|
Petr Lautrbach |
579532 |
success = 1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(blob);
|
|
Petr Lautrbach |
579532 |
- xfree(uu);
|
|
Petr Lautrbach |
579532 |
+ free(blob);
|
|
Petr Lautrbach |
579532 |
+ free(uu);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
return success;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -673,12 +673,12 @@
|
|
Petr Lautrbach |
579532 |
switch (key_type_from_name(p)) {
|
|
Petr Lautrbach |
579532 |
case KEY_RSA1:
|
|
Petr Lautrbach |
579532 |
case KEY_UNSPEC:
|
|
Petr Lautrbach |
579532 |
- xfree(s);
|
|
Petr Lautrbach |
579532 |
+ free(s);
|
|
Petr Lautrbach |
579532 |
return 0;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
verbose("key names ok: [%s]", names);
|
|
Petr Lautrbach |
579532 |
- xfree(s);
|
|
Petr Lautrbach |
579532 |
+ free(s);
|
|
Petr Lautrbach |
579532 |
return 1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -743,7 +743,7 @@
|
|
Petr Lautrbach |
579532 |
logerror("key_from_blob: remaining bytes in key blob %d", rlen);
|
|
Petr Lautrbach |
579532 |
out:
|
|
Petr Lautrbach |
579532 |
if (ktype != NULL)
|
|
Petr Lautrbach |
579532 |
- xfree(ktype);
|
|
Petr Lautrbach |
579532 |
+ free(ktype);
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
return key;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/misc.c 2013-10-30 17:14:26.017615218 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/misc.c 2013-10-30 17:15:07.360327581 +0100
|
|
Petr Lautrbach |
579532 |
@@ -251,13 +251,13 @@
|
|
Petr Lautrbach |
579532 |
*remote = SSH_TUNID_ANY;
|
|
Petr Lautrbach |
579532 |
sp = xstrdup(s);
|
|
Petr Lautrbach |
579532 |
if ((ep = strchr(sp, ':')) == NULL) {
|
|
Petr Lautrbach |
579532 |
- xfree(sp);
|
|
Petr Lautrbach |
579532 |
+ free(sp);
|
|
Petr Lautrbach |
579532 |
return (a2tun(s, NULL));
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
ep[0] = '\0'; ep++;
|
|
Petr Lautrbach |
579532 |
*remote = a2tun(ep, NULL);
|
|
Petr Lautrbach |
579532 |
tun = a2tun(sp, NULL);
|
|
Petr Lautrbach |
579532 |
- xfree(sp);
|
|
Petr Lautrbach |
579532 |
+ free(sp);
|
|
Petr Lautrbach |
579532 |
return (*remote == SSH_TUNID_ERR ? *remote : tun);
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -490,7 +490,7 @@
|
|
Petr Lautrbach |
579532 |
if (which >= args->num)
|
|
Petr Lautrbach |
579532 |
fatal("replacearg: tried to replace invalid arg %d >= %d",
|
|
Petr Lautrbach |
579532 |
which, args->num);
|
|
Petr Lautrbach |
579532 |
- xfree(args->list[which]);
|
|
Petr Lautrbach |
579532 |
+ free(args->list[which]);
|
|
Petr Lautrbach |
579532 |
args->list[which] = cp;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -501,8 +501,8 @@
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
if (args->list != NULL) {
|
|
Petr Lautrbach |
579532 |
for (i = 0; i < args->num; i++)
|
|
Petr Lautrbach |
579532 |
- xfree(args->list[i]);
|
|
Petr Lautrbach |
579532 |
- xfree(args->list);
|
|
Petr Lautrbach |
579532 |
+ free(args->list[i]);
|
|
Petr Lautrbach |
579532 |
+ free(args->list);
|
|
Petr Lautrbach |
579532 |
args->nalloc = args->num = 0;
|
|
Petr Lautrbach |
579532 |
args->list = NULL;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/pam_user_authorized_keys.c 2013-10-30 17:14:26.017615218 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/pam_user_authorized_keys.c 2013-10-30 17:15:07.361327550 +0100
|
|
Petr Lautrbach |
579532 |
@@ -121,7 +121,7 @@
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
authorized_keys_file = tilde_expand_filename(auth_keys_file_buf, authorized_keys_file_allowed_owner_uid);
|
|
Petr Lautrbach |
579532 |
strncpy(auth_keys_file_buf, authorized_keys_file, sizeof(auth_keys_file_buf) - 1 );
|
|
Petr Lautrbach |
579532 |
- xfree(authorized_keys_file) /* when we percent_expand later, we'd step on this, so free it immediately */;
|
|
Petr Lautrbach |
579532 |
+ free(authorized_keys_file) /* when we percent_expand later, we'd step on this, so free it immediately */;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
if(strstr(auth_keys_file_buf, "%h")) {
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/pam_user_key_allowed2.c 2013-10-30 17:14:26.018615187 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/pam_user_key_allowed2.c 2013-10-30 17:15:07.361327550 +0100
|
|
Petr Lautrbach |
579532 |
@@ -121,7 +121,7 @@
|
|
Petr Lautrbach |
579532 |
fp = key_fingerprint(found, SSH_FP_MD5, SSH_FP_HEX);
|
|
Petr Lautrbach |
579532 |
logit("Found matching %s key: %s",
|
|
Petr Lautrbach |
579532 |
key_type(found), fp);
|
|
Petr Lautrbach |
579532 |
- xfree(fp);
|
|
Petr Lautrbach |
579532 |
+ free(fp);
|
|
Petr Lautrbach |
579532 |
break;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/ssh-dss.c 2013-10-30 17:14:26.014615310 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/ssh-dss.c 2013-10-30 17:15:07.361327550 +0100
|
|
Petr Lautrbach |
579532 |
@@ -135,17 +135,17 @@
|
|
Petr Lautrbach |
579532 |
if (strcmp("ssh-dss", ktype) != 0) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_dss_verify: cannot handle type %s", ktype);
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
- xfree(ktype);
|
|
Petr Lautrbach |
579532 |
+ free(ktype);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(ktype);
|
|
Petr Lautrbach |
579532 |
+ free(ktype);
|
|
Petr Lautrbach |
579532 |
sigblob = buffer_get_string(&b, &len;;
|
|
Petr Lautrbach |
579532 |
rlen = buffer_len(&b);
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
if (rlen != 0) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_dss_verify: "
|
|
Petr Lautrbach |
579532 |
"remaining bytes in signature %d", rlen);
|
|
Petr Lautrbach |
579532 |
- xfree(sigblob);
|
|
Petr Lautrbach |
579532 |
+ free(sigblob);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -167,7 +167,7 @@
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
/* clean up */
|
|
Petr Lautrbach |
579532 |
memset(sigblob, 0, len);
|
|
Petr Lautrbach |
579532 |
- xfree(sigblob);
|
|
Petr Lautrbach |
579532 |
+ free(sigblob);
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
/* sha1 the data */
|
|
Petr Lautrbach |
579532 |
EVP_DigestInit(&md, evp_md);
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/ssh-rsa.c 2013-10-30 17:14:26.015615278 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/ssh-rsa.c 2013-10-30 17:15:07.362327518 +0100
|
|
Petr Lautrbach |
579532 |
@@ -70,7 +70,7 @@
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
logerror("ssh_rsa_sign: RSA_sign failed: %s",
|
|
Petr Lautrbach |
579532 |
ERR_error_string(ecode, NULL));
|
|
Petr Lautrbach |
579532 |
- xfree(sig);
|
|
Petr Lautrbach |
579532 |
+ free(sig);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
if (len < slen) {
|
|
Petr Lautrbach |
579532 |
@@ -80,7 +80,7 @@
|
|
Petr Lautrbach |
579532 |
memset(sig, 0, diff);
|
|
Petr Lautrbach |
579532 |
} else if (len > slen) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_rsa_sign: slen %u slen2 %u", slen, len);
|
|
Petr Lautrbach |
579532 |
- xfree(sig);
|
|
Petr Lautrbach |
579532 |
+ free(sig);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
/* encode signature */
|
|
Petr Lautrbach |
579532 |
@@ -96,7 +96,7 @@
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
memset(sig, 's', slen);
|
|
Petr Lautrbach |
579532 |
- xfree(sig);
|
|
Petr Lautrbach |
579532 |
+ free(sig);
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
return 0;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -128,23 +128,23 @@
|
|
Petr Lautrbach |
579532 |
if (strcmp("ssh-rsa", ktype) != 0) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_rsa_verify: cannot handle type %s", ktype);
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
- xfree(ktype);
|
|
Petr Lautrbach |
579532 |
+ free(ktype);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
- xfree(ktype);
|
|
Petr Lautrbach |
579532 |
+ free(ktype);
|
|
Petr Lautrbach |
579532 |
sigblob = buffer_get_string(&b, &len;;
|
|
Petr Lautrbach |
579532 |
rlen = buffer_len(&b);
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
if (rlen != 0) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_rsa_verify: remaining bytes in signature %d", rlen);
|
|
Petr Lautrbach |
579532 |
- xfree(sigblob);
|
|
Petr Lautrbach |
579532 |
+ free(sigblob);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
/* RSA_verify expects a signature of RSA_size */
|
|
Petr Lautrbach |
579532 |
modlen = RSA_size(key->rsa);
|
|
Petr Lautrbach |
579532 |
if (len > modlen) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_rsa_verify: len %u > modlen %u", len, modlen);
|
|
Petr Lautrbach |
579532 |
- xfree(sigblob);
|
|
Petr Lautrbach |
579532 |
+ free(sigblob);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
} else if (len < modlen) {
|
|
Petr Lautrbach |
579532 |
u_int diff = modlen - len;
|
|
Petr Lautrbach |
579532 |
@@ -158,7 +158,7 @@
|
|
Petr Lautrbach |
579532 |
nid = (datafellows & SSH_BUG_RSASIGMD5) ? NID_md5 : NID_sha1;
|
|
Petr Lautrbach |
579532 |
if ((evp_md = EVP_get_digestbynid(nid)) == NULL) {
|
|
Petr Lautrbach |
579532 |
logerror("ssh_rsa_verify: EVP_get_digestbynid %d failed", nid);
|
|
Petr Lautrbach |
579532 |
- xfree(sigblob);
|
|
Petr Lautrbach |
579532 |
+ free(sigblob);
|
|
Petr Lautrbach |
579532 |
return -1;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
EVP_DigestInit(&md, evp_md);
|
|
Petr Lautrbach |
579532 |
@@ -168,7 +168,7 @@
|
|
Petr Lautrbach |
579532 |
ret = openssh_RSA_verify(nid, digest, dlen, sigblob, len, key->rsa);
|
|
Petr Lautrbach |
579532 |
memset(digest, 'd', sizeof(digest));
|
|
Petr Lautrbach |
579532 |
memset(sigblob, 's', len);
|
|
Petr Lautrbach |
579532 |
- xfree(sigblob);
|
|
Petr Lautrbach |
579532 |
+ free(sigblob);
|
|
Petr Lautrbach |
579532 |
verbose("ssh_rsa_verify: signature %scorrect", (ret==0) ? "in" : "");
|
|
Petr Lautrbach |
579532 |
return ret;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
@@ -258,6 +258,6 @@
|
|
Petr Lautrbach |
579532 |
ret = 1;
|
|
Petr Lautrbach |
579532 |
done:
|
|
Petr Lautrbach |
579532 |
if (decrypted)
|
|
Petr Lautrbach |
579532 |
- xfree(decrypted);
|
|
Petr Lautrbach |
579532 |
+ free(decrypted);
|
|
Petr Lautrbach |
579532 |
return ret;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/userauth_pubkey_from_id.c 2013-10-30 17:14:26.014615310 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/userauth_pubkey_from_id.c 2013-10-30 17:15:07.362327518 +0100
|
|
Petr Lautrbach |
579532 |
@@ -92,9 +92,9 @@
|
|
Petr Lautrbach |
579532 |
if(&b != NULL)
|
|
Petr Lautrbach |
579532 |
buffer_free(&b);
|
|
Petr Lautrbach |
579532 |
if(sig != NULL)
|
|
Petr Lautrbach |
579532 |
- xfree(sig);
|
|
Petr Lautrbach |
579532 |
+ free(sig);
|
|
Petr Lautrbach |
579532 |
if(pkblob != NULL)
|
|
Petr Lautrbach |
579532 |
- xfree(pkblob);
|
|
Petr Lautrbach |
579532 |
+ free(pkblob);
|
|
Petr Lautrbach |
579532 |
CRYPTO_cleanup_all_ex_data();
|
|
Petr Lautrbach |
579532 |
return authenticated;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
--- pam_ssh_agent_auth-0.9.3.orig/uuencode.c 2013-10-30 17:14:26.015615278 +0100
|
|
Petr Lautrbach |
579532 |
+++ pam_ssh_agent_auth-0.9.3.orig/uuencode.c 2013-10-30 17:15:07.362327518 +0100
|
|
Petr Lautrbach |
579532 |
@@ -56,7 +56,7 @@
|
|
Petr Lautrbach |
579532 |
/* and remove trailing whitespace because __b64_pton needs this */
|
|
Petr Lautrbach |
579532 |
*p = '\0';
|
|
Petr Lautrbach |
579532 |
len = __b64_pton(encoded, target, targsize);
|
|
Petr Lautrbach |
579532 |
- xfree(encoded);
|
|
Petr Lautrbach |
579532 |
+ free(encoded);
|
|
Petr Lautrbach |
579532 |
return len;
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
|
|
Petr Lautrbach |
579532 |
@@ -79,5 +79,5 @@
|
|
Petr Lautrbach |
579532 |
}
|
|
Petr Lautrbach |
579532 |
if (i % 70 != 69)
|
|
Petr Lautrbach |
579532 |
fprintf(fp, "\n");
|
|
Petr Lautrbach |
579532 |
- xfree(buf);
|
|
Petr Lautrbach |
579532 |
+ free(buf);
|
|
Petr Lautrbach |
579532 |
}
|