Patch: 3.0.1p1: rename a conflicting variable
Jos Backus
josb at cncdsl.com
Tue Nov 20 12:01:58 EST 2001
These patches are against 3.0.1p1. I need them because I have a local mod
which needs access to the ServerOptions struct named ``options'', hence the
rename.
--- auth-rsa.c.orig Mon Nov 19 16:54:01 2001
+++ auth-rsa.c Mon Nov 19 16:56:18 2001
@@ -180,8 +180,7 @@
* user really has the corresponding private key.
*/
while (fgets(line, sizeof(line), f)) {
- char *cp;
- char *options;
+ char *cp, *optionsp;
linenum++;
@@ -199,7 +198,7 @@
*/
if (*cp < '0' || *cp > '9') {
int quoted = 0;
- options = cp;
+ optionsp = cp;
for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {
if (*cp == '\\' && cp[1] == '"')
cp++; /* Skip both */
@@ -207,7 +206,7 @@
quoted = !quoted;
}
} else
- options = NULL;
+ optionsp = NULL;
/* Parse the key from the line. */
if (!auth_rsa_read_key(&cp, &bits, pk->e, pk->n)) {
@@ -232,7 +231,7 @@
* If our options do not allow this key to be used,
* do not send challenge.
*/
- if (!auth_parse_options(pw, options, file, linenum))
+ if (!auth_parse_options(pw, optionsp, file, linenum))
continue;
/* Perform the challenge-response dialog for this key. */
--- auth2.c.orig Mon Nov 19 16:54:10 2001
+++ auth2.c Mon Nov 19 16:55:18 2001
@@ -691,7 +691,7 @@
found = key_new(key->type);
while (fgets(line, sizeof(line), f)) {
- char *cp, *options = NULL;
+ char *cp, *optionsp = NULL;
linenum++;
/* Skip leading whitespace, empty and comment lines. */
for (cp = line; *cp == ' ' || *cp == '\t'; cp++)
@@ -703,7 +703,7 @@
/* no key? check if there are options for this key */
int quoted = 0;
debug2("user_key_allowed: check options: '%s'", cp);
- options = cp;
+ optionsp = cp;
for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) {
if (*cp == '\\' && cp[1] == '"')
cp++; /* Skip both */
@@ -720,7 +720,7 @@
}
}
if (key_equal(found, key) &&
- auth_parse_options(pw, options, file, linenum) == 1) {
+ auth_parse_options(pw, optionsp, file, linenum) == 1) {
found_key = 1;
debug("matching key found: file %s, line %lu",
file, linenum);
Thanks,
--
Jos Backus _/ _/_/_/ Santa Clara, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
josb at cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;
More information about the openssh-unix-dev
mailing list