/var/run cannot be used by non-root users to bind and unlink sockets.
Move the default server UDS addresses to /var/run/linuxptp, which will be
created by ptp4l the first time it runs.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 config.c            | 4 ++--
 configs/default.cfg | 4 ++--
 phc2sys.8           | 4 ++--
 phc2sys.c           | 2 +-
 pmc.8               | 2 +-
 pmc.c               | 2 +-
 ptp4l.8             | 4 ++--
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/config.c b/config.c
index 06e5fd1..bc112aa 100644
--- a/config.c
+++ b/config.c
@@ -326,8 +326,8 @@ struct config_item config_tab[] = {
        GLOB_ITEM_INT("tx_timestamp_timeout", 1, 1, INT_MAX),
        PORT_ITEM_INT("udp_ttl", 1, 1, 255),
        PORT_ITEM_INT("udp6_scope", 0x0E, 0x00, 0x0F),
-       GLOB_ITEM_STR("uds_address", "/var/run/ptp4l"),
-       GLOB_ITEM_STR("uds_ro_address", "/var/run/ptp4lro"),
+       GLOB_ITEM_STR("uds_address", "/var/run/linuxptp/ptp4l"),
+       GLOB_ITEM_STR("uds_ro_address", "/var/run/linuxptp/ptp4lro"),
        PORT_ITEM_INT("unicast_listen", 0, 0, 1),
        PORT_ITEM_INT("unicast_master_table", 0, 0, INT_MAX),
        PORT_ITEM_INT("unicast_req_duration", 3600, 10, INT_MAX),
diff --git a/configs/default.cfg b/configs/default.cfg
index 64ef3bd..a739b08 100644
--- a/configs/default.cfg
+++ b/configs/default.cfg
@@ -90,8 +90,8 @@ ptp_dst_mac           01:1B:19:00:00:00
 p2p_dst_mac            01:80:C2:00:00:0E
 udp_ttl                        1
 udp6_scope             0x0E
-uds_address            /var/run/ptp4l
-uds_ro_address         /var/run/ptp4lro
+uds_address            /var/run/linuxptp/ptp4l
+uds_ro_address         /var/run/linuxptp/ptp4lro
 #
 # Default interface options
 #
diff --git a/phc2sys.8 b/phc2sys.8
index a829874..4a0151a 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -210,7 +210,7 @@ option is used).
 .TP
 .BI \-z " uds-address"
 Specifies the address of the server's UNIX domain socket.
-The default is /var/run/ptp4l.
+The default is /var/run/linuxptp/ptp4l.
 .TP
 .BI \-l " print-level"
 Set the maximum syslog level of messages which should be printed or sent to
@@ -388,7 +388,7 @@ Same as option
 .TP
 .B uds_address
 Specifies the address of the server's UNIX domain socket. The default
-is /var/run/ptp4
+is /var/run/linuxptp/ptp4l
 Same as option
 .B \-z
 (see above).
diff --git a/phc2sys.c b/phc2sys.c
index 35e56d7..d50202b 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1061,7 +1061,7 @@ static void usage(char *progname)
                " -u [num]       number of clock updates in summary stats (0)\n"
                " -n [num]       domain number (0)\n"
                " -x             apply leap seconds by servo instead of 
kernel\n"
-               " -z [path]      server address for UDS (/var/run/ptp4l)\n"
+               " -z [path]      server address for UDS 
(/var/run/linuxptp/ptp4l)\n"
                " -l [num]       set the logging level to 'num' (6)\n"
                " -t [tag]       add tag to log messages\n"
                " -m             print messages to stdout\n"
diff --git a/pmc.8 b/pmc.8
index c6ee42f..d9f6467 100644
--- a/pmc.8
+++ b/pmc.8
@@ -87,7 +87,7 @@ Domain socket is relative to the directory of the server's 
socket.
 .TP
 .BI \-s " uds-address"
 Specifies the address of the server's UNIX domain socket.
-The default is /var/run/ptp4l.
+The default is /var/run/linuxptp/ptp4l.
 .TP
 .BI \-t " transport-specific-field"
 Specify the transport specific field in sent messages as a hexadecimal number.
diff --git a/pmc.c b/pmc.c
index 194e450..9435753 100644
--- a/pmc.c
+++ b/pmc.c
@@ -547,7 +547,7 @@ static void usage(char *progname)
                " -h        prints this message and exits\n"
                " -i [dev]  interface device to use, default 'eth0'\n"
                "           for network and 'pmc.$pid' for UDS.\n"
-               " -s [path] server address for UDS, default '/var/run/ptp4l'.\n"
+               " -s [path] server address for UDS, default 
'/var/run/linuxptp/ptp4l'.\n"
                " -t [hex]  transport specific field, default 0x0\n"
                " -v        prints the software version and exits\n"
                " -z        send zero length TLV values with the GET actions\n"
diff --git a/ptp4l.8 b/ptp4l.8
index 021ca9a..dbb6266 100644
--- a/ptp4l.8
+++ b/ptp4l.8
@@ -626,13 +626,13 @@ is only relevant with IPv6 transport.  See RFC 4291.  The 
default is
 .TP
 .B uds_address
 Specifies the address of the UNIX domain socket for receiving local
-management messages. The default is /var/run/ptp4l.
+management messages. The default is /var/run/linuxptp/ptp4l.
 .TP
 .B uds_ro_address
 Specifies the address of the second UNIX domain socket for receiving local
 management messages, which is restricted to GET actions and does not forward
 messages to other ports. Access to this socket can be given to untrusted
-applications for monitoring purposes. The default is /var/run/ptp4lro.
+applications for monitoring purposes. The default is /var/run/linuxptp/ptp4lro.
 .TP
 .B dscp_event
 Defines the Differentiated Services Codepoint (DSCP) to be used for PTP
-- 
2.26.3



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to