From: "cron2 (Code Review)" Date: Wed, 3 Jul 2024 14:30:03 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., samuli@...515..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <6d017ce98ea71f3bb18e2fd26fce9b9ca18a5622-EmailReviewComments-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="Cner5sCMnH0="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: t_server_null: multiple improvements and fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mattock Cc: flichtenheld , plaisthos , openvpn-devel --Cner5sCMnH0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: mattock, plaisthos. cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/669?usp=3Demail ) Change subject: t_server_null: multiple improvements and fixes ...................................................................... Patch Set 4: Code-Review-1 (1 comment) Patchset: PS4: OK, so the NetBSD problem seems to be "umask" - when run from BB, the server processes are started (sudo openvpn...) jus= t fine - the resulting PID file (and Log file) are 600 ``` -rw------- 1 root users 6 Jul 3 16:22 t_server_null_server-119= 4_udp.pid -rw------- 1 root users 5 Jul 3 16:22 t_server_null_server-119= 5_tcp.pid -rw------- 1 root users 227 Jul 3 16:24 t_server_null_server-119= 5_tcp.status -rw------- 1 root users 1991 Jul 3 16:24 t_server_null_server-119= 5_tcp.log -rw------- 1 root users 227 Jul 3 16:24 t_server_null_server-119= 4_udp.status -rw------- 1 root users 1824 Jul 3 16:24 t_server_null_server-119= 4_udp.log ``` - some other element running as non-root cannot read the pid file, so assu= mes "the server process must have been not started", and neither proceeds w= ith the client - since "the server has not been started" it's not killed either, and on t= he next run, the port is in use My suggestion would be to add an `umask 022` to the script that starts the = server processes (I do not feel like digging into "why does BB set 077, whe= n the system default is 022", and it *will* bite someone else running from = the CLI eventually) Also, error handling, for "there is a file and I can't read it". -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/669?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I2cce8ad4e0d262e1404ab1eb6ff673d8590b6b3a Gerrit-Change-Number: 669 Gerrit-PatchSet: 4 Gerrit-Owner: mattock Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: mattock Gerrit-Comment-Date: Wed, 03 Jul 2024 14:30:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment --Cner5sCMnH0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: mattock, plaisthos.

Patch set 4:Code-Review -1=

Vi= ew Change

1 comment:

  • Patchset:

    • Patch Set #4:

      OK, so the NetBSD problem seems to be "um= ask"

       - when run from BB, the server processes are started (sudo openv=
      pn...) just fine
      - the resulting PID file (and Log file) are 600
      ```=
      -rw------- 1 root users 6 Jul 3 16:22 t_server_null_server= -1194_udp.pid
      -rw------- 1 root users 5 Jul 3 16:22 t_serve= r_null_server-1195_tcp.pid
      -rw------- 1 root users 227 Jul 3 = 16:24 t_server_null_server-1195_tcp.status
      -rw------- 1 root users= 1991 Jul 3 16:24 t_server_null_server-1195_tcp.log
      -rw------- 1 ro= ot users 227 Jul 3 16:24 t_server_null_server-1194_udp.status
      = -rw------- 1 root users 1824 Jul 3 16:24 t_server_null_server-119= 4_udp.log
      ```
      - some other element running as non-root cannot read t= he pid file, so assumes "the server process must have been not started= ", and neither proceeds with the client
      - since "the server h= as not been started" it's not killed either, and on the next run, = the port is in use

      My suggestion would be to add an `umask 022` to = the script that starts the server processes (I do not feel like digging int= o "why does BB set 077, when the system default is 022", and it *= will* bite someone else running from the CLI eventually)

      Also, error handling, for &qu= ot;there is a file and I can't read it".

To view, visit change 669. To unsubscribe, or for help writing mail filters, vi= sit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2cce8ad4e0d262e1404ab1eb6ff= 673d8590b6b3a
Gerrit-Change-Number: 669
Gerrit-PatchSet: 4
Gerrit-Owner: mattock <samuli@...515...>=
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: mattock <samuli@...515...= >
Gerrit-Comment-Date: Wed, 03 Jul 2024 14:30:03= +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
--Cner5sCMnH0=--