Dear all,
Here I attached the diff file for you to review:
diff file of servconf.h :
--- ssh5.3p1/ssh/servconf.h 2009-11-12 10:53:10 +0800
+++ ssh5.3p1_new_version5/ssh/servconf.h 2010-03-19 15:58:52 +0800
@@ -251,6 +251,10 @@
#endif /* HP_HPN_RCVBUF_PATCH */
#endif /* HP_HPN_PATCH */
+#ifdef NEWOPTION
+ int newoption,
+#endif /* NEWOPTION */
+
int permit_tun;
int num_permitted_opens;
diff file of servconf.c:
--- ssh5.3p1/ssh/servconf.c 2009-11-12 10:53:10 +0800
+++ ssh5.3p1_new_version5/ssh/servconf.c 2010-03-19 15:58:52 +0800
@@ -156,6 +156,9 @@
options->hpn_rcvbuf_size = -1;
#endif /* HP_HPN_RCVBUF_PATCH */
#endif /* HP_HPN_PATCH */
+#ifdef NEWOPTION
+ options->newoption = -1;
+#endif /* NEWOPTION */
@@ -338,6 +341,10 @@
options->permit_tun = SSH_TUNMODE_NO;
if (options->zero_knowledge_password_authentication == -1)
options->zero_knowledge_password_authentication = 0;
+#ifdef NEWOPTION
+ if (options->newoption == -1)
+ options->newoption = 0;
+#endif /* NEWOPTION */
#ifdef HP_HPN_PATCH
if (options->hpn_disabled == -1)
@@ -483,6 +490,9 @@
sTcpRcvBuf,
#endif /* HP_HPN_RCVBUF_PATCH */
#endif /* HP_HPN_PATCH */
+#ifdef NEWOPTION
+ sNewOption,
+#endif /* NEWOPTION */
+#ifdef NEWOPTION
+ { "newoption", sNewOption},
+#endif /* NEWOPTION */
@@ -1155,6 +1168,12 @@
#endif /* HP_HPN_PATCH */
+#ifdef NEWOPTION
+ case sNewOption:
+ intptr = &options->newoption;
+ goto parse_int;
+#endif /* NEWOPTION */
+
case sIgnoreUserKnownHosts:
intptr = &options->ignore_user_known_hosts;
goto parse_flag;
So could anybody give some advise? Please cc me. Thanks!
Kevin,
kai_yang2008 at 163.com
?2010-03-18 17:24:18?kai_yang2008 <kai_yang2008 at 163.com> ???
Dear all,
I want to add a new option "newoption" to the sshd server, I have
just add some codes in servconf.h and
servconf.c like the other options. But it seems that the "newoption"
can not be enable,when i set
the "newoption" to "yes" in sshd_config file. I have add a
debug message in main function of sshd.c
....
debug("main sshd %d",options->newoption);
...
debug1: main sshd 0
From the debug message, it seems that the "newoption" is not enable.
So could anyone give me some advise about it?
Kevin,
kai_yang2008 at 163.com