<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[15757] CalendarServer/trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/15757">15757</a></dd>
<dt>Author</dt> <dd>dre@apple.com</dd>
<dt>Date</dt> <dd>2016-07-11 17:06:01 -0700 (Mon, 11 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use SSH for Manhole by default; add Manhole.UseSSH boolean to configure this. Slight refactoring, and added some Multiservice names and pre-populated some context to make it easier to debug with manhole.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarservertapcaldavpy">CalendarServer/trunk/calendarserver/tap/caldav.py</a></li>
<li><a href="#CalendarServertrunkconfcaldavdstdconfigplist">CalendarServer/trunk/conf/caldavd-stdconfig.plist</a></li>
<li><a href="#CalendarServertrunktwistedcaldavstdconfigpy">CalendarServer/trunk/twistedcaldav/stdconfig.py</a></li>
<li><a href="#CalendarServertrunktxdavdpsserverpy">CalendarServer/trunk/txdav/dps/server.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarservertapcaldavpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tap/caldav.py (15756 => 15757)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tap/caldav.py        2016-07-07 21:51:51 UTC (rev 15756)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py        2016-07-12 00:06:01 UTC (rev 15757)
</span><span class="lines">@@ -245,6 +245,7 @@
</span><span class="cx">         self.logRotateLength = logRotateLength
</span><span class="cx">         self.logMaxFiles = logMaxFiles
</span><span class="cx">         self.logRotateOnStart = logRotateOnStart
</span><ins>+        self.name = &quot;elms&quot;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def setServiceParent(self, app):
</span><span class="lines">@@ -280,7 +281,7 @@
</span><span class="cx">     # The ConnectionService is a MultiService which bundles all the connection
</span><span class="cx">     # services together for the purposes of being able to stop them and wait
</span><span class="cx">     # for all of their connections to close before shutting down.
</span><del>-    connectionServiceName = &quot;ConnectionService&quot;
</del><ins>+    connectionServiceName = &quot;cs&quot;
</ins><span class="cx"> 
</span><span class="cx">     def __init__(self, logObserver):
</span><span class="cx">         self.logObserver = logObserver  # accesslog observer
</span><span class="lines">@@ -292,6 +293,7 @@
</span><span class="cx">             config.ErrorLogMaxRotatedFiles,
</span><span class="cx">             config.ErrorLogRotateOnStart,
</span><span class="cx">         )
</span><ins>+        self.name = &quot;cds&quot;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def privilegedStartService(self):
</span><span class="lines">@@ -862,6 +864,11 @@
</span><span class="cx">                         frame=frame
</span><span class="cx">                     )
</span><span class="cx"> 
</span><ins>+            if config.Manhole.Enabled:
+                namespace= dict({service.name: service})
+                for n, s in service.namedServices.iteritems():
+                    namespace[n] = s
+                self._makeManhole(namespace=namespace, parent=service)
</ins><span class="cx">             return service
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -898,6 +905,7 @@
</span><span class="cx">         result = self.requestProcessingService(options, store, logObserver)
</span><span class="cx"> 
</span><span class="cx">         if pool is not None:
</span><ins>+            pool.setName(&quot;db&quot;)
</ins><span class="cx">             pool.setServiceParent(result)
</span><span class="cx"> 
</span><span class="cx">         if config.ControlSocket:
</span><span class="lines">@@ -937,6 +945,7 @@
</span><span class="cx">         controlClient = ControlSocketConnectingService(
</span><span class="cx">             endpointFactory, controlSocketClient
</span><span class="cx">         )
</span><ins>+        controlClient.setName(&quot;control&quot;)
</ins><span class="cx">         controlClient.setServiceParent(result)
</span><span class="cx"> 
</span><span class="cx">         # Optionally set up push notifications
</span><span class="lines">@@ -947,6 +956,7 @@
</span><span class="cx">                 pushSubService = ApplePushNotifierService.makeService(
</span><span class="cx">                     config.Notifications.Services.APNS, store)
</span><span class="cx">                 observers.append(pushSubService)
</span><ins>+                pushSubService.setName(&quot;APNS&quot;)
</ins><span class="cx">                 pushSubService.setServiceParent(result)
</span><span class="cx">             if config.Notifications.Services.AMP.Enabled:
</span><span class="cx">                 pushSubService = AMPPushForwarder(controlSocketClient)
</span><span class="lines">@@ -959,6 +969,7 @@
</span><span class="cx">             mailRetriever = MailRetriever(
</span><span class="cx">                 store, directory, config.Scheduling.iMIP.Receiving
</span><span class="cx">             )
</span><ins>+            mailRetriever.setName(&quot;MailRetriever&quot;)
</ins><span class="cx">             mailRetriever.setServiceParent(result)
</span><span class="cx">         else:
</span><span class="cx">             mailRetriever = None
</span><span class="lines">@@ -988,37 +999,6 @@
</span><span class="cx">             txn._groupCacher = groupCacher
</span><span class="cx"> 
</span><span class="cx">         store.callWithNewTransactions(decorateTransaction)
</span><del>-
-        # Optionally enable Manhole access
-        if config.Manhole.Enabled:
-            try:
-                from twisted.conch.manhole_tap import (
-                    makeService as manholeMakeService
-                )
-                portString = &quot;tcp:{:d}:interface=127.0.0.1&quot;.format(
-                    config.Manhole.StartingPortNumber + int(config.LogID) + 1
-                )
-                manholeService = manholeMakeService({
-                    &quot;sshPort&quot;: None,
-                    &quot;telnetPort&quot;: portString,
-                    &quot;namespace&quot;: {
-                        &quot;config&quot;: config,
-                        &quot;service&quot;: result,
-                        &quot;store&quot;: store,
-                        &quot;directory&quot;: directory,
-                    },
-                    &quot;passwd&quot;: config.Manhole.PasswordFilePath,
-                })
-                manholeService.setServiceParent(result)
-                # Using print(because logging isn't ready at this point)
-                print(&quot;Manhole access enabled:&quot;, portString)
-
-            except ImportError:
-                print(
-                    &quot;Manhole access could not enabled because &quot;
-                    &quot;manhole_tap could not be imported&quot;
-                )
-
</del><span class="cx">         return result
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -1181,10 +1161,12 @@
</span><span class="cx">                     # 'SSL' tag on it, since that's the only time it's used.
</span><span class="cx">                     contextFactory = None
</span><span class="cx"> 
</span><del>-            ReportingHTTPService(
</del><ins>+            reportingService = ReportingHTTPService(
</ins><span class="cx">                 requestFactory, int(config.MetaFD), contextFactory,
</span><del>-                usingSocketFile=config.SocketFiles.Enabled
-            ).setServiceParent(connectionService)
</del><ins>+                usingSocketFile=config.SocketFiles.Enabled,
+            )
+            reportingService.setName(&quot;http-{}&quot;.format(int(config.MetaFD)))
+            reportingService.setServiceParent(connectionService)
</ins><span class="cx"> 
</span><span class="cx">         else:  # Not inheriting, therefore we open our own:
</span><span class="cx">             for bindAddress in self._allBindAddresses():
</span><span class="lines">@@ -1211,6 +1193,8 @@
</span><span class="cx">                                 backlog=config.ListenBacklog,
</span><span class="cx">                                 inherit=False
</span><span class="cx">                             )
</span><ins>+                            httpsService.setName(
+                                &quot;https-{}:{}&quot;.format(bindAddress,int(port)))
</ins><span class="cx">                             httpsService.setServiceParent(connectionService)
</span><span class="cx"> 
</span><span class="cx">                 for port in config.BindHTTPPorts:
</span><span class="lines">@@ -1311,6 +1295,59 @@
</span><span class="cx">                     Popen(memcachedArgv)
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+    def _makeManhole(self, namespace=None, parent=None):
+        try:
+            import inspect
+            import objgraph
+        except ImportError:
+            pass
+        try:
+            if 'inspect' in locals():
+                namespace['ins'] = inspect
+            if 'objgraph' in locals():
+                namespace['og'] = objgraph
+            from pprint import pprint
+            namespace.update({
+                'pp': pprint,
+                'cfg': config,
+            })
+            from twisted.conch.manhole_tap import (
+                makeService as manholeMakeService
+            )
+            portOffset = 0 if config.LogID == '' else int(config.LogID) + 1
+            portString = &quot;tcp:{:d}:interface=127.0.0.1&quot;.format(
+                config.Manhole.StartingPortNumber + portOffset
+            )
+            manholeService = manholeMakeService({
+                &quot;passwd&quot;: config.Manhole.PasswordFilePath,
+                &quot;telnetPort&quot;:
+                    portString if config.Manhole.UseSSH is False else None,
+                &quot;sshPort&quot;:
+                    portString if config.Manhole.UseSSH is True else None,
+                &quot;sshKeyDir&quot;: config.DataRoot,
+                &quot;sshKeyName&quot;: config.Manhole.sshKeyName,
+                &quot;sshKeySize&quot;: config.Manhole.sshKeySize,
+                &quot;namespace&quot;: namespace,
+            })
+            manholeService.setName(&quot;manhole&quot;)
+            if parent is not None:
+                manholeService.setServiceParent(parent)
+            # Using print(because logging isn't ready at this point)
+            print(&quot;Manhole access enabled:&quot;, portString)
+        except ImportError:
+            print(
+                &quot;Manhole access could not enabled because &quot;
+                &quot;manhole_tap could not be imported.&quot;
+            )
+            import platform
+            if platform.system() == &quot;Darwin&quot;:
+                if config.Manhole.UseSSH:
+                    print(
+                        &quot;Set Manhole.UseSSH to false or rebuild CS with the &quot;
+                        &quot;USE_OPENSSL environment variable set.&quot;
+                    )
+            
+
</ins><span class="cx">     def makeService_Single(self, options):
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Create a service to be used in a single-process, stand-alone
</span><span class="lines">@@ -1332,6 +1369,7 @@
</span><span class="cx">                         config.Notifications.Services.APNS, store
</span><span class="cx">                     )
</span><span class="cx">                     observers.append(pushSubService)
</span><ins>+                    pushSubService.setName(&quot;APNS&quot;)
</ins><span class="cx">                     pushSubService.setServiceParent(result)
</span><span class="cx">                 if config.Notifications.Services.AMP.Enabled:
</span><span class="cx">                     pushSubService = AMPPushMaster(
</span><span class="lines">@@ -1362,6 +1400,7 @@
</span><span class="cx">                 mailRetriever = MailRetriever(
</span><span class="cx">                     store, directory, config.Scheduling.iMIP.Receiving
</span><span class="cx">                 )
</span><ins>+                mailRetriever.setName(&quot;mailRetriever&quot;)
</ins><span class="cx">                 mailRetriever.setServiceParent(result)
</span><span class="cx">             else:
</span><span class="cx">                 mailRetriever = None
</span><span class="lines">@@ -1401,35 +1440,6 @@
</span><span class="cx">             else:
</span><span class="cx">                 groupCacher = None
</span><span class="cx"> 
</span><del>-            # Optionally enable Manhole access
-            if config.Manhole.Enabled:
-                try:
-                    from twisted.conch.manhole_tap import (
-                        makeService as manholeMakeService
-                    )
-                    portString = &quot;tcp:{:d}:interface=127.0.0.1&quot;.format(
-                        config.Manhole.StartingPortNumber
-                    )
-                    manholeService = manholeMakeService({
-                        &quot;sshPort&quot;: None,
-                        &quot;telnetPort&quot;: portString,
-                        &quot;namespace&quot;: {
-                            &quot;config&quot;: config,
-                            &quot;service&quot;: result,
-                            &quot;store&quot;: store,
-                            &quot;directory&quot;: directory,
-                        },
-                        &quot;passwd&quot;: config.Manhole.PasswordFilePath,
-                    })
-                    manholeService.setServiceParent(result)
-                    # Using print(because logging isn't ready at this point)
-                    print(&quot;Manhole access enabled:&quot;, portString)
-                except ImportError:
-                    print(
-                        &quot;Manhole access could not enabled because &quot;
-                        &quot;manhole_tap could not be imported&quot;
-                    )
-
</del><span class="cx">             def decorateTransaction(txn):
</span><span class="cx">                 txn._pushDistributor = pushDistributor
</span><span class="cx">                 txn._rootResource = result.rootResource
</span><span class="lines">@@ -1526,6 +1536,7 @@
</span><span class="cx">             config.ErrorLogMaxRotatedFiles,
</span><span class="cx">             config.ErrorLogRotateOnStart,
</span><span class="cx">         )
</span><ins>+        svc.setName(&quot;agent&quot;)
</ins><span class="cx">         svc.setServiceParent(agentLoggingService)
</span><span class="cx">         return agentLoggingService
</span><span class="cx"> 
</span><span class="lines">@@ -1582,6 +1593,7 @@
</span><span class="cx">                     dbtype=DatabaseType(dialect, paramstyle, dbfeatures),
</span><span class="cx">                     maxConnections=config.MaxDBConnectionsPerPool
</span><span class="cx">                 )
</span><ins>+                cp.setName(&quot;db&quot;)
</ins><span class="cx">                 cp.setServiceParent(ms)
</span><span class="cx">                 store = storeFromConfigWithoutDPS(config, cp.connection)
</span><span class="cx"> 
</span><span class="lines">@@ -1655,6 +1667,7 @@
</span><span class="cx">                     UpgradeReleaseLockStep(store)
</span><span class="cx">                 )
</span><span class="cx"> 
</span><ins>+                pps.setName(&quot;pre&quot;)
</ins><span class="cx">                 pps.setServiceParent(ms)
</span><span class="cx">                 return ms
</span><span class="cx"> 
</span><span class="lines">@@ -1784,6 +1797,7 @@
</span><span class="cx"> 
</span><span class="cx">         monitor = DelayedStartupProcessMonitor()
</span><span class="cx">         s.processMonitor = monitor
</span><ins>+        monitor.setName(&quot;pm&quot;)
</ins><span class="cx">         monitor.setServiceParent(s)
</span><span class="cx"> 
</span><span class="cx">         if config.MemoryLimiter.Enabled:
</span><span class="lines">@@ -1791,6 +1805,7 @@
</span><span class="cx">                 monitor, config.MemoryLimiter.Seconds,
</span><span class="cx">                 config.MemoryLimiter.Bytes, config.MemoryLimiter.ResidentOnly
</span><span class="cx">             )
</span><ins>+            memoryLimiter.setName(&quot;ml&quot;)
</ins><span class="cx">             memoryLimiter.setServiceParent(s)
</span><span class="cx"> 
</span><span class="cx">         # Maybe spawn memcached through a ProcessMonitor
</span><span class="lines">@@ -1877,32 +1892,6 @@
</span><span class="cx">             statsService.setName(&quot;tcp-stats&quot;)
</span><span class="cx">             statsService.setServiceParent(s)
</span><span class="cx"> 
</span><del>-        # Optionally enable Manhole access
-        if config.Manhole.Enabled:
-            try:
-                from twisted.conch.manhole_tap import (
-                    makeService as manholeMakeService
-                )
-                portString = &quot;tcp:{:d}:interface=127.0.0.1&quot;.format(
-                    config.Manhole.StartingPortNumber
-                )
-                manholeService = manholeMakeService({
-                    &quot;sshPort&quot;: None,
-                    &quot;telnetPort&quot;: portString,
-                    &quot;namespace&quot;: {
-                        &quot;config&quot;: config,
-                        &quot;service&quot;: s,
-                    },
-                    &quot;passwd&quot;: config.Manhole.PasswordFilePath,
-                })
-                manholeService.setServiceParent(s)
-                # Using print(because logging isn't ready at this point)
-                print(&quot;Manhole access enabled:&quot;, portString)
-            except ImportError:
-                print(
-                    &quot;Manhole access could not enabled because &quot;
-                    &quot;manhole_tap could not be imported&quot;
-                )
</del><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         # Finally, let's get the real show on the road.  Create a service that
</span><span class="lines">@@ -1944,11 +1933,13 @@
</span><span class="cx">             else:
</span><span class="cx">                 dispenser = None
</span><span class="cx">             multi = MultiService()
</span><ins>+            multi.setName(&quot;multi&quot;)
</ins><span class="cx">             pool.setServiceParent(multi)
</span><span class="cx">             spawner = SlaveSpawnerService(
</span><span class="cx">                 self, monitor, dispenser, dispatcher, stats, options[&quot;config&quot;],
</span><span class="cx">                 inheritFDs=inheritFDs, inheritSSLFDs=inheritSSLFDs
</span><span class="cx">             )
</span><ins>+            spawner.setName(&quot;spawner&quot;)
</ins><span class="cx">             spawner.setServiceParent(multi)
</span><span class="cx">             if config.UseMetaFD:
</span><span class="cx">                 cl.setServiceParent(multi)
</span><span class="lines">@@ -1961,6 +1952,7 @@
</span><span class="cx">                 mailRetriever = MailRetriever(
</span><span class="cx">                     store, directory, config.Scheduling.iMIP.Receiving
</span><span class="cx">                 )
</span><ins>+                mailRetriever.setName(&quot;MailRetriever&quot;)
</ins><span class="cx">                 mailRetriever.setServiceParent(multi)
</span><span class="cx">             else:
</span><span class="cx">                 mailRetriever = None
</span><span class="lines">@@ -1993,6 +1985,7 @@
</span><span class="cx">         ssvc = self.storageService(
</span><span class="cx">             spawnerSvcCreator, None, uid, gid
</span><span class="cx">         )
</span><ins>+        ssvc.setName(&quot;ssvc&quot;)
</ins><span class="cx">         ssvc.setServiceParent(s)
</span><span class="cx">         return s
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServertrunkconfcaldavdstdconfigplist"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/conf/caldavd-stdconfig.plist (15756 => 15757)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/conf/caldavd-stdconfig.plist        2016-07-07 21:51:51 UTC (rev 15756)
+++ CalendarServer/trunk/conf/caldavd-stdconfig.plist        2016-07-12 00:06:01 UTC (rev 15757)
</span><span class="lines">@@ -2116,14 +2116,28 @@
</span><span class="cx">                 &lt;key&gt;Enabled&lt;/key&gt;
</span><span class="cx">                 &lt;false/&gt;
</span><span class="cx"> 
</span><ins>+                &lt;!-- Set to False for telnet --&gt;
+                &lt;key&gt;UseSSH&lt;/key&gt;
+                &lt;true/&gt;
+
+                &lt;!-- Master listens here, children increment --&gt;
</ins><span class="cx">                 &lt;key&gt;StartingPortNumber&lt;/key&gt;
</span><span class="cx">                 &lt;integer&gt;5000&lt;/integer&gt;
</span><span class="cx"> 
</span><ins>+                &lt;!-- Directory Proxy listens here --&gt;
</ins><span class="cx">                 &lt;key&gt;DPSPortNumber&lt;/key&gt;
</span><span class="cx">                 &lt;integer&gt;4999&lt;/integer&gt;
</span><span class="cx"> 
</span><ins>+                &lt;!-- Path to password file with lines of user:pass --&gt;
</ins><span class="cx">                 &lt;key&gt;PasswordFilePath&lt;/key&gt;
</span><span class="cx">                 &lt;string&gt;&lt;/string&gt;
</span><ins>+
+                &lt;!-- Relative to DataRoot --&gt;
+                &lt;key&gt;sshKeyName&lt;/key&gt;
+                &lt;string&gt;manhole.key&lt;/string&gt;
+
+                &lt;key&gt;sshKeySize&lt;/key&gt;
+                &lt;integer&gt;4096&lt;/integer&gt;
</ins><span class="cx">         &lt;/dict&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;key&gt;EnableKeepAlive&lt;/key&gt;
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavstdconfigpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py (15756 => 15757)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/stdconfig.py        2016-07-07 21:51:51 UTC (rev 15756)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py        2016-07-12 00:06:01 UTC (rev 15757)
</span><span class="lines">@@ -1103,9 +1103,12 @@
</span><span class="cx"> 
</span><span class="cx">     &quot;Manhole&quot;: {
</span><span class="cx">         &quot;Enabled&quot;: False,
</span><del>-        &quot;StartingPortNumber&quot;: 5000,
-        &quot;DPSPortNumber&quot;: 4999,
-        &quot;PasswordFilePath&quot;: &quot;&quot;,
</del><ins>+        &quot;UseSSH&quot;: True, # Set to False for telnet
+        &quot;StartingPortNumber&quot;: 5000, # Master listens here, children increment
+        &quot;DPSPortNumber&quot;: 4999, # Directory Proxy listens here
+        &quot;PasswordFilePath&quot;: &quot;&quot;, # Path to password file with lines of user:pass
+        &quot;sshKeyName&quot;: &quot;manhole.key&quot;, # Relative to DataRoot
+        &quot;sshKeySize&quot;: 4096,
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     &quot;EnableKeepAlive&quot;: False,
</span></span></pre></div>
<a id="CalendarServertrunktxdavdpsserverpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/dps/server.py (15756 => 15757)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/dps/server.py        2016-07-07 21:51:51 UTC (rev 15756)
+++ CalendarServer/trunk/txdav/dps/server.py        2016-07-12 00:06:01 UTC (rev 15757)
</span><span class="lines">@@ -868,8 +868,12 @@
</span><span class="cx">                     config.Manhole.DPSPortNumber
</span><span class="cx">                 )
</span><span class="cx">                 manholeService = manholeMakeService({
</span><del>-                    &quot;sshPort&quot;: None,
-                    &quot;telnetPort&quot;: portString,
</del><ins>+                    &quot;sshPort&quot;: portString if config.Manhole.UseSSH is True else None,
+                    &quot;telnetPort&quot;: portString if config.Manhole.UseSSH is False else None,
+                    &quot;sshKeyDir&quot;: config.DataRoot,
+                    &quot;sshKeyName&quot;: &quot;manhole.key&quot;,
+                    &quot;sshKeySize&quot;: 4096,
+                    &quot;passwd&quot;: config.Manhole.PasswordFilePath,
</ins><span class="cx">                     &quot;namespace&quot;: {
</span><span class="cx">                         &quot;config&quot;: config,
</span><span class="cx">                         &quot;service&quot;: dpsService,
</span></span></pre>
</div>
</div>

</body>
</html>