Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"If the code and the comments disagree, then both are probably wrong." -- Norm Schryer


computers / alt.os.linux.mageia / SOLVED: Openconnect, solution for pidfile-bug

SubjectAuthor
* Openconnect, solution for pidfile-bugMarkus Robert Kessler
`- SOLVED: Openconnect, solution for pidfile-bugMarkus Robert Kessler

1
Openconnect, solution for pidfile-bug

<uff113$32a0s$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5815&group=alt.os.linux.mageia#5815

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no_reply@dipl-ing-kessler.de (Markus Robert Kessler)
Newsgroups: alt.os.linux.mageia
Subject: Openconnect, solution for pidfile-bug
Date: Mon, 2 Oct 2023 18:09:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uff113$32a0s$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 2 Oct 2023 18:09:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="461d7c5b76657800804f0e2bb7faff97";
logging-data="3221532"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qr3M3AXuh619olIVf85PJ"
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:78wxHl+Q69eYI3y+CcXMUapMOX0=
 by: Markus Robert Kessle - Mon, 2 Oct 2023 18:09 UTC

Hi all,

in the meantime I had a closer look at the sources.

I saw, that in main.c within the archive the original authors just try to
open the desired pidfile given by options, only tested for write(!)
access.

That's not a proper solution.

I tested with inserting some more lines, which first test, it the desired
filename exists, and if so, the program terminates with error, instead of
damaging existing files. This approach seems similar to other distros'
solution.

This could be taken as a starting point for a bug report -- if someone
wants to write one. And, if helpful, I could provide this as a patch.

Best regards,

Markus

--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm

SOLVED: Openconnect, solution for pidfile-bug

<ufk4fu$ctsb$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=5824&group=alt.os.linux.mageia#5824

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no_reply@dipl-ing-kessler.de (Markus Robert Kessler)
Newsgroups: alt.os.linux.mageia
Subject: SOLVED: Openconnect, solution for pidfile-bug
Date: Wed, 4 Oct 2023 16:39:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <ufk4fu$ctsb$1@dont-email.me>
References: <uff113$32a0s$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 4 Oct 2023 16:39:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bf686eff9a72cc723d0a10c91c259bf8";
logging-data="423819"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VoT3jpgNLqLeM5Kst6nti"
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:L1r/8+T2quOqlKx4YJQ5qJnfAyY=
 by: Markus Robert Kessle - Wed, 4 Oct 2023 16:39 UTC

On Mon, 2 Oct 2023 18:09:39 -0000 (UTC) Markus Robert Kessler wrote:

> Hi all,
>
> in the meantime I had a closer look at the sources.
>
> I saw, that in main.c within the archive the original authors just try
> to open the desired pidfile given by options, only tested for write(!)
> access.
>
> That's not a proper solution.
>
> I tested with inserting some more lines, which first test, it the
> desired filename exists, and if so, the program terminates with error,
> instead of damaging existing files. This approach seems similar to other
> distros' solution.
>
> This could be taken as a starting point for a bug report -- if someone
> wants to write one. And, if helpful, I could provide this as a patch.

I made the necessary changes, derived a patch from that, inserted and
registered it in the source rpm, installed the binary rpm and tested it:

https://www.dipl-ing-kessler.de/developer/test/linux-src/mageia9/
openconnect/

Now, openconnect behaves as needed, so, if, for instance you (or your
kids) invoke it by accident like

sudo openconnect -b --pid-file=/etc/shadow [...]

then there will be no damage made to your system.
Instead it will be handled like that:

Pid-file: '/etc/shadow' already exists. Exiting.

If someone wants to file a bugreport, feel free to give them above
mentioned source rpm.

Best regards,

Markus

--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor