Skip to content

Commit

Permalink
Change: Update gvmd socket location to /run/gvmd/gvmd.sock
Browse files Browse the repository at this point in the history
With our current supported releases the gvmd socket is located at
/run/gvmd/gvmd.sock.
  • Loading branch information
bjoernricks committed Aug 11, 2022
1 parent 6287140 commit 4a0f170
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ The following shows the process of a simple request in more detail.
2. Specify the path to the Unix domain socket in the file system:

.. note:: If **gvmd** is provided by a package of the distribution, it should
be ``/var/run/gvmd.sock``. If **gvmd** was built from source and did not set
be ``/run/gvmd/gvmd.sock``. If **gvmd** was built from source and did not set
a prefix, the default path can be used by setting ``path = None``.

.. code-block:: python
path = '/var/run/gvmd.sock'
path = '/run/gvmd/gvmd.sock'
3. Create a connection and a gmp object:

Expand Down Expand Up @@ -89,7 +89,7 @@ Full Example
from gvm.protocols.gmp import Gmp
# path to unix socket
path = '/var/run/gvmd.sock'
path = '/run/gvmd/gvmd.sock'
connection = UnixSocketConnection(path=path)
# using the with statement to automatically connect and disconnect to gvmd
Expand Down Expand Up @@ -126,7 +126,7 @@ Step by Step

.. code-block:: python
path = '/var/run/gvmd.sock'
path = '/run/gvmd/gvmd.sock'
connection = UnixSocketConnection(path=path)
3. In this case, an `Etree Element`_ should be obtained from the response to be able to
Expand Down Expand Up @@ -192,7 +192,7 @@ Full Example
from gvm.protocols.gmp import Gmp
from gvm.transforms import EtreeCheckCommandTransform
path = '/var/run/gvmd.sock'
path = '/run/gvmd/gvmd.sock'
connection = UnixSocketConnection(path=path)
transform = EtreeCheckCommandTransform()
Expand Down Expand Up @@ -336,7 +336,7 @@ Example using GMP:
from gvm.connections import UnixSocketConnection, DebugConnection
from gvm.protocols.gmp import Gmp
path = '/var/run/gvmd.sock'
path = '/run/gvmd/gvmd.sock'
socketconnection = UnixSocketConnection(path=path)
connection = DebugConnection(socketconnection)
Expand Down
8 changes: 4 additions & 4 deletions gvm/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
DEFAULT_READ_TIMEOUT = 60 # in seconds
DEFAULT_TIMEOUT = 60 # in seconds
DEFAULT_GVM_PORT = 9390
DEFAULT_UNIX_SOCKET_PATH = "/var/run/gvmd.sock"
DEFAULT_UNIX_SOCKET_PATH = "/run/gvmd/gvmd.sock"
DEFAULT_SSH_PORT = 22
DEFAULT_SSH_USERNAME = "gmp"
DEFAULT_SSH_PASSWORD = ""
Expand Down Expand Up @@ -475,11 +475,11 @@ def disconnect(self):

class UnixSocketConnection(GvmConnection):
"""
UNIX-Socket class to connect, read, write from a GVM server daemon via
direct communicating UNIX-Socket
UNIX-Socket class to connect, read, write from a daemon via direct
communicating UNIX-Socket
Arguments:
path: Path to the socket. Default is "/var/run/gvmd.sock".
path: Path to the socket. Default is "/run/gvmd/gvmd.sock".
timeout: Timeout in seconds for the connection. Default is 60 seconds.
"""

Expand Down

0 comments on commit 4a0f170

Please sign in to comment.