Re:Make Your Own Programming Language
by gue5t on Saturday January 03, 2015 @04:48PM
(#8832133)
In glibc's libresolv, this is caused by res_hnok in resolv/res_name.c returning 0:
[ Parent
| on HN ]
And the hack fix:
/*
hnokpre.c: LD_PRELOAD shim to bypass valid hostname checking in glibc
gcc -fPIC -shared hnokpre.c -o libhnokpre.so
LD_PRELOAD=./libhnokpre.so curl http://mattias-.github.io/
*/
int res_hnok(const char* dn)
{
return 1;
}
int __res_hnok(const char* dn)
{
return 1;
}I'm kinda wondering what's the reason for that that check to begin with. Just being pedantic for pedentrys sake?
* Note the conspicuous absence of ctype macros in these definitions. On
* non-ASCII hosts, we can't depend on string literals or ctype macros to
* tell us anything about network-format data. The rest of the BIND system
* is not careful about this, but for some reason, we're doing it right here.
Well that is only a problem if the charset is converted to something else. Are there still systems out there without a C compiler that can be told to use ASCII?