Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: security/acme.sh: new port (version 3.0.9)
To:
Klemens Nanni <kn@openbsd.org>
Cc:
Landry Breuil <landry@openbsd.org>, OpenBSD ports <ports@openbsd.org>
Date:
Sun, 17 Nov 2024 20:57:17 +0100

Download raw body.

Thread
On Sun, 17 Nov 2024 20:52:38 +0100,
Klemens Nanni <kn@openbsd.org> wrote:
> 
> 17.11.2024 22:47, Kirill A. Korinsky пишет:
> > On Sun, 17 Nov 2024 20:43:27 +0100,
> > Klemens Nanni <kn@openbsd.org> wrote:
> >>
> >> 17.11.2024 22:35, Kirill A. Korinsky пишет:
> >>> On Sun, 17 Nov 2024 20:26:40 +0100,
> >>> Klemens Nanni <kn@openbsd.org> wrote:
> >>>>
> >>>> I was aiming for an explanation of the change, something like this.
> >>>> The other patch I haven't found the for yet.
> >>>>
> >>>>
> >>>> Feedback? OK?
> >>>>
> >>>> Index: patches/patch-dnsapi_dns_netcup_sh
> >>>> ===================================================================
> >>>> RCS file: /cvs/ports/security/acme.sh/patches/patch-dnsapi_dns_netcup_sh,v
> >>>> diff -u -p -r1.1.1.1 patch-dnsapi_dns_netcup_sh
> >>>> --- patches/patch-dnsapi_dns_netcup_sh	17 Nov 2024 14:10:23 -0000	1.1.1.1
> >>>> +++ patches/patch-dnsapi_dns_netcup_sh	17 Nov 2024 19:25:00 -0000
> >>>> @@ -1,7 +1,10 @@
> >>>> -Fix syntax error by our sh:
> >>>> +ksh(1) defaults to alias login='exec login' which expands before definition
> >>>> +of the equally named function, i.e. 'exec login() ...' causing
> >>>>  
> >>>>    dnsapi/dns_netcup.sh[128]: syntax error: `(' unexpected
> >>>>  
> >>>> +Rename it to _login() for sh(1) -n to pass.
> >>>> +
> >>>>  Index: dnsapi/dns_netcup.sh
> >>>>  --- dnsapi/dns_netcup.sh.orig
> >>>>  +++ dnsapi/dns_netcup.sh
> >>>> @@ -32,12 +35,3 @@ Index: dnsapi/dns_netcup.sh
> >>>>     tmp=$(_post "{\"action\": \"login\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apipassword\": \"$NC_Apipw\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
> >>>>     sid=$(echo "$tmp" | tr '{}' '\n' | grep apisessionid | cut -d '"' -f 4)
> >>>>     _debug "$tmp"
> >>>> -@@ -134,7 +134,7 @@ login() {
> >>>> -     return 1
> >>>> -   fi
> >>>> - }
> >>>> --logout() {
> >>>> -+_logout() {
> >>>> -   tmp=$(_post "{\"action\": \"logout\", \"param\": {\"apikey\": \"$NC_Apikey\", \"apisessionid\": \"$sid\", \"customernumber\": \"$NC_CID\"}}" "$end" "" "POST")
> >>>> -   _debug "$tmp"
> >>>> -   if [ "$(_getfield "$tmp" "4" | sed s/\"status\":\"//g | sed s/\"//g)" != "success" ]; then
> >>>>
> >>>
> >>> I think that this chunk should stay in patch. Am I wrong?
> >>
> >> test passes without it, I don't see an existing alias, function or program
> >> this script's logout() function could clash with:
> >>
> >> 	$ type logout
> >> 	logout not found
> >>
> >> Plus, you only renamed the function definition, but not the call to it.
> >> So this should actually unbreak the script.
> >>
> > 
> > Are you sure?
> 
> Yes, the hunk I remove is about logout() -- OUT instead of IN.

Sorry, I missread it as login.

Ok

-- 
wbr, Kirill