Bugzilla – Attachment 17 Details for
Bug 94
Userdefineable identification string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to sshd to allow a userdefinable identification string
versionstring.patch (text/plain), 3.26 KB, created by
Jason Prondak
on 2002-02-02 09:15:10 AEDT
(
hide
)
Description:
Patch to sshd to allow a userdefinable identification string
Filename:
MIME Type:
Creator:
Jason Prondak
Created:
2002-02-02 09:15:10 AEDT
Size:
3.26 KB
patch
obsolete
>Index: 3_0_2p1.1/sshd.c >--- 3_0_2p1.1/sshd.c Wed, 21 Nov 2001 10:38:46 -0500 jd (OpenSSH/h/27_sshd.c 1.1.1.1 644) >+++ 3_0_2p1_w_versionstring.2(w)/sshd.c Fri, 01 Feb 2002 14:02:45 -0500 prondaja (OpenSSH/h/27_sshd.c 1.1.1.1.2.2 644) >@@ -330,7 +330,14 @@ > major = PROTOCOL_MAJOR_1; > minor = PROTOCOL_MINOR_1; > } >- snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION); >+ >+ if (options.commentstring == NULL) >+ snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, >+ options.versionstring); >+ else >+ snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s %.100s\n", major, >+ minor, options.versionstring, options.commentstring); >+ > server_version_string = xstrdup(buf); > > if (client_version_string == NULL) { >Index: 3_0_2p1.1/servconf.h >--- 3_0_2p1.1/servconf.h Wed, 21 Nov 2001 10:38:46 -0500 jd (OpenSSH/i/17_servconf.h 1.1.1.1 644) >+++ 3_0_2p1_w_versionstring.2(w)/servconf.h Fri, 11 Jan 2002 13:36:51 -0500 prondaja (OpenSSH/i/17_servconf.h 1.1.1.1.1.1 644) >@@ -129,6 +129,8 @@ > char *authorized_keys_file; /* File containing public keys */ > char *authorized_keys_file2; > int pam_authentication_via_kbd_int; >+ char *versionstring; >+ char *commentstring; > > } ServerOptions; > >Index: 3_0_2p1.1/servconf.c >--- 3_0_2p1.1/servconf.c Wed, 21 Nov 2001 10:38:46 -0500 jd (OpenSSH/i/18_servconf.c 1.1.1.1 644) >+++ 3_0_2p1_w_versionstring.2(w)/servconf.c Fri, 01 Feb 2002 14:29:40 -0500 prondaja (OpenSSH/i/18_servconf.c 1.1.1.1.1.2 644) >@@ -109,6 +109,8 @@ > options->client_alive_count_max = -1; > options->authorized_keys_file = NULL; > options->authorized_keys_file2 = NULL; >+ options->versionstring = NULL; >+ options->commentstring = NULL; > } > > void >@@ -229,6 +231,8 @@ > } > if (options->authorized_keys_file == NULL) > options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; >+ if (options->versionstring == NULL) >+ options->versionstring = SSH_VERSION; > } > > /* Keyword tokens. */ >@@ -261,6 +265,7 @@ > sBanner, sReverseMappingCheck, sHostbasedAuthentication, > sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, > sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, >+ sVersionString, sCommentString, > sDeprecated > } ServerOpCodes; > >@@ -334,6 +339,8 @@ > { "clientalivecountmax", sClientAliveCountMax }, > { "authorizedkeysfile", sAuthorizedKeysFile }, > { "authorizedkeysfile2", sAuthorizedKeysFile2 }, >+ { "versionstring", sVersionString}, >+ { "commentstring", sCommentString}, > { NULL, 0 } > }; > >@@ -864,6 +871,30 @@ > filename, linenum, arg); > while(arg) > arg = strdelim(&cp); >+ break; >+ >+ case sVersionString: >+ charptr = &options->versionstring; >+ arg = strdelim(&cp); >+ if (!arg || *arg == '\0') >+ fatal("%s line %d: missing version name.", >+ filename, linenum); >+ if ((p = strchr(arg, (int)'-')) != NULL) >+ fatal("%s line %d: bad VersionString usage.", >+ filename, linenum); >+ *charptr = xstrdup(arg); >+ break; >+ >+ case sCommentString: >+ charptr = &options->commentstring; >+ arg = strdelim(&cp); >+ if (!arg || *arg == '\0') >+ fatal("%s line %d: missing version name.", >+ filename, linenum); >+ if ((p = strchr(arg, (int)'-')) != NULL) >+ fatal("%s line %d: bad CommentString usage.", >+ filename, linenum); >+ *charptr = xstrdup(arg); > break; > > default:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 94
: 17