Bug 2389 - /etc/host.conf's "order" line is useless
Summary: /etc/host.conf's "order" line is useless
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.3.6
: P2 minor
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 13:49 UTC by Samuel Thibault
Modified: 2018-04-19 13:52 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
Removes unused num_services and service fields of struct hconf, and the corresponding initialization functions (1.56 KB, patch)
2006-03-20 16:07 UTC, Samuel Thibault
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Thibault 2006-02-23 13:49:33 UTC
Hi,

I noticed that my /etc/host.conf is mostly useless:

order bind,hosts
multi on

The "order" line doesn't have any effect, only the "hosts:" line of
/etc/nsswitch.conf has effect. And indeed, the _res_hconf structure is almost
never used in libc: only _res_hconf.{flags,num_trimdomains,trimdomain} are used.

I guess this is on purpose since the future is /etc/nsswitch.conf, but for
much better readibility, res_hconf.c should probably get some cleanup. I'll
submit a separate bug report to manpages for removing most of the /etc/host.conf
documentation (since it does not work any more)

Regards,
Samuel
Comment 1 Dwayne Grant McConnell 2006-02-28 21:00:49 UTC
Do you have a patch containing the code changes you think should occur?
Comment 2 Samuel Thibault 2006-03-20 16:07:27 UTC
Created attachment 933 [details]
Removes unused num_services and service fields of struct hconf, and the corresponding initialization functions
Comment 3 Ulrich Drepper 2006-04-25 19:44:22 UTC
I applied a modified version of the patch.  We cannot mark 'order' lines as
errors.  They have to be ingred for compatibility.  And you changed teh libc ABI
by changing the hconf structure.