Univention Bugzilla – Attachment 7834 Details for
Bug 34836
Cleanup old TCP references in udm-cli; now uses AF_UNIX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
34836.patch (text/plain), 1.95 KB, created by
Florian Best
on 2016-07-26 16:05:28 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-07-26 16:05:28 CEST
Size:
1.95 KB
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/univention-cli-client b/management/univention-directory-manager-modules/univention-cli-client >index c990314..9a56908 100755 >--- a/management/univention-directory-manager-modules/univention-cli-client >+++ b/management/univention-directory-manager-modules/univention-cli-client >@@ -89,8 +89,7 @@ def fork_server(sock, socket_path): > socket_timeout > sys.exit(1) > >- # this takes a long time if getfqdn(host) is used in cli-server >- connection_timeout = 30 >+ connection_timeout = 5 > stime = time.time() + connection_timeout > while True: > try: >diff --git a/management/univention-directory-manager-modules/univention-cli-server b/management/univention-directory-manager-modules/univention-cli-server >index 509d22c..c98b064 100755 >--- a/management/univention-directory-manager-modules/univention-cli-server >+++ b/management/univention-directory-manager-modules/univention-cli-server >@@ -76,18 +76,10 @@ class MyRequestHandler(SocketServer.BaseRequestHandler): > pass > > >-class ForkingTCPServer(SocketServer.ForkingTCPServer): >+class ForkingServer(SocketServer.UnixStreamServer, SocketServer.ForkingMixIn): > > """UDM server listening on UNIX socket.""" > address_family = socket.AF_UNIX >- allow_reuse_address = 1 >- >- def server_bind(self): >- SocketServer.TCPServer.server_bind(self) >- _host, port = self.socket.getsockname()[:2] >- self.server_name = 'localhost' # socket.getfqdn(host) >- self.server_port = port >- > > def server_main(args): > """UDM command line server.""" >@@ -138,7 +130,7 @@ def server_main(args): > ud.debug(ud.ADMIN, ud.WARN, 'daemon [%s] baseconfig key directory/manager/cmd/timeout not set, setting to default (%s seconds)' % (os.getpid(), timeout)) > > try: >- sock = ForkingTCPServer(socket_path, MyRequestHandler) >+ sock = ForkingServer(socket_path, MyRequestHandler) > os.chmod(socket_path, 0o600) > except: > print >> sys.stderr, 'E: Failed creating socket (%s). Daemon stopped.' % socket_path
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 34836
:
7834
|
7835
|
8999