We have bug report 1378 <https://sourceforge.net/p/oorexx/bugs/1378/> open
against SysGetservbyname() from the "rxunixsys" library. (The bug would
equally apply to SysGetservbyport() )
The example in the docs (unixextensions.pdf)
SysGetservbyname("HTTP", "TCP", "n") --> HTTP
shows *service name* and *protocol* in uppercase, whereas /etc/services
will typically list both names in lowercase. Rexx currently just hands
over all arguments to the C API getservbyname() which reads and parses
/etc/services and only returns success if the args match with respect to
case. So the example won't work, as "HTTP" or "TCP" won't match the
(typical) entry "http" / "tcp".
I can see three choices how to handle this:
1. open a doc bug, fix the example, and document that SysGetservbyname()
is case-sensitive
2. fix the code for SysGetservbyname() (and SysGetservbyport() ) by
lower-casing arguments before calling the C API. In theory (very unlikely
though) this might break existing code, as someone could be relying on the
fact that case is respected.
3. fix the code as above, but first call C API with the unmodified args,
and only if this fails and any arg contains uppercase letters, then call
the C API with lower-cased args.
I believe that neither 2) nor 3) will 100% ensure a caseless match, as
/etc/services might define "http" as e. g. (a very unlikely) "HttP". If I
correctly read RFC 6335 <https://tools.ietf.org/html/rfc6335> service names
are designed to be caseless ("Although service names may contain both
upper-case and lower-case letters, case is ignored for comparison purposes,
so both "http" and "HTTP" denote the same service") and I'm assuming the
same for the *protocol*.
Any preferences? Other opinions?
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel