bugGNU gettext - Bugs: bug #63983, replace gethostbyname with...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63983: replace gethostbyname with getaddrinfo

Submitter:  Jens Petersen <juhp>
Submitted:  Fri 31 Mar 2023 07:56:01 AM UTC
   
 
Category:  Translator tools Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed

Sat 17 Jun 2023 01:51:10 PM UTC, comment #3: 

The fix is contained in gettext 0.22.

Bruno Haible <haible>
Group administrator
Sat 01 Apr 2023 03:29:18 PM UTC, comment #2: 


> gettext still uses gethostbyname, which is considered generally deprecated function in favor of getaddrinfo.
> It would be good to replace the usage in gettext to future-proof it.


Thanks for the report. Done through
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=c5cdf41d436261b279c172753ac727335d44b9fd

> the main runtime usage seems to be in hostname.c
> and hostname is used by user-email.


Correct. And user-email is used by msginit.

> Perhaps a workaround could be to drop (remove) the hostname program from gettext on Linux systems, etc?


It is true that on some Linux systems, gettext's 'hostname' program implements a subset of the functionality of the (Debian-maintained) 'hostname' program. The reason why it exists in gettext is for portability to systems that don't have it. msginit should work also on those systems.

Do all Linux distros ship with the 'hostname' program by default? I wouldn't bet on it.

Bruno Haible <haible>
Group administrator
Fri 31 Mar 2023 08:43:00 AM UTC, comment #1: 

Well the main runtime usage seems to be in hostname.c
and hostname is used by user-email.

Perhaps a workaround could be to drop (remove) the hostname program from gettext on Linux systems, etc?


Jens Petersen <juhp>
Fri 31 Mar 2023 07:56:01 AM UTC, original submission:  

gettext still uses gethostbyname, which is considered generally deprecated function in favor of getaddrinfo.

It would be good to replace the usage in gettext to future-proof it.
Perhaps this has already been done in some other GNU projects.

Jens Petersen <juhp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by juhp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-17 haible StatusFixed Fix Released
    2023-04-01 haible CategoryNone Translator tools
        StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code