libc6 version 2.19 breaks NSS loading for static binaries
Bug #1821752 reported by
Marc Deslauriers
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc |
Fix Released
|
Medium
|
|||
eglibc (Debian) |
Fix Released
|
Unknown
|
|||
eglibc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Rebuilding busybox on trusty breaks wget name resolution.
Introduced by:
https:/
fixed by:
https:/
Changed in eglibc: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Changed in eglibc (Debian): | |
status: | Unknown → Fix Released |
To post a comment you must log in.
it looks like the change landed for bug 16046 broke static dlopening of nss modules. if you try to use getaddrinfo/ getpwnam/ etc..., they just return errors immediately.
example tests:
$ cat test.c
#include <sys/types.h>
#include <pwd.h>
#include <stdio.h>
int main() {
void *p = getpwnam("root");
printf("%p\n", p);
return p == NULL ? 1 : 0;
}
$ gcc test.c && ./a.out
0x7f6aec59a0e0
$ gcc -static test.c && ./a.out
(nil)
$ cat test.c
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <net/if.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
int main(int argc, char *argv[])
{
const char *host = argv[1];
int rc;
struct addrinfo *result = NULL;
struct addrinfo hint;
rc = getaddrinfo(host, NULL, &hint, &result);
if (rc || !result) {
} else
}
$ gcc test.c && ./a.out localhost
$ gcc -static test.c && ./a.out localhost
bad address 'localhost'