binary incompatible change in libnss_*.so.2
Bruno Haible
haible@ilog.fr
Tue Apr 9 10:35:00 GMT 2002
Hi,
After installing glibc-20020408 (built with gcc-3.0.4, on a SuSE 7.3 i386
system) "su" and "login" don't work any more, because dynamic loading of
/lib/security/pam_unix.so fails. The reason are unsatisfied symbols.
Last time, with glibc-20020115, there was no problem.
$ ldd /lib/security/pam_unix.so
/lib/security/pam_unix.so: /lib/libnss_nisplus.so.2: version `GLIBC_2.1' not found (required by /lib/security/pam_unix.so)
/lib/security/pam_unix.so: /lib/libnss_files.so.2: version `GLIBC_2.0' not found (required by /lib/security/pam_unix.so)
/lib/security/pam_unix.so: /lib/libnss_nis.so.2: version `GLIBC_2.0' not found (required by /lib/security/pam_unix.so)
libnsl.so.1 => /lib/libnsl.so.1 (0x40019000)
libnss_files.so.2 => /lib/libnss_files.so.2 (0x4002e000)
libnss_nis.so.2 => /lib/libnss_nis.so.2 (0x40039000)
libnss_nisplus.so.2 => /lib/libnss_nisplus.so.2 (0x40043000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004e000)
libc.so.6 => /lib/libc.so.6 (0x4007b000)
libdl.so.2 => /lib/libdl.so.2 (0x401a3000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
$ nm /lib/security/pam_unix.so | grep _nss_
U _nss_files_getpwnam_r@@GLIBC_2.0
U _nss_files_getspnam_r@@GLIBC_2.0
U _nss_nis_getpwnam_r@@GLIBC_2.0
U _nss_nis_getspnam_r@@GLIBC_2.0
U _nss_nisplus_getpwnam_r@@GLIBC_2.1
U _nss_nisplus_getspnam_r@@GLIBC_2.1
$ ls -l /lib/libnss_files*
-rwxr-xr-x 1 root root 235079 2. Dez 12:22 /lib/libnss_files-2.2.4.so
-rwxr-xr-x 1 root root 239411 9. Apr 02:04 /lib/libnss_files-2.2.90.so
lrwxrwxrwx 1 root root 22 9. Apr 02:04 /lib/libnss_files.so.2 -> libnss_files-2.2.90.so
$ objdump -p /lib/libnss_files-2.2.90.so
/lib/libnss_files-2.2.90.so: file format elf32-i386
Program Header:
PHDR off 0x00000034 vaddr 0x00000034 paddr 0x00000034 align 2**2
filesz 0x000000c0 memsz 0x000000c0 flags r-x
INTERP off 0x000084cd vaddr 0x000084cd paddr 0x000084cd align 2**0
filesz 0x00000013 memsz 0x00000013 flags r--
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x000084e0 memsz 0x000084e0 flags r-x
LOAD off 0x000084e0 vaddr 0x000094e0 paddr 0x000094e0 align 2**12
filesz 0x000001ec memsz 0x000003e4 flags rw-
DYNAMIC off 0x000084f4 vaddr 0x000094f4 paddr 0x000094f4 align 2**2
filesz 0x000000d8 memsz 0x000000d8 flags rw-
NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2
filesz 0x00000020 memsz 0x00000020 flags r--
Dynamic Section:
NEEDED libc.so.6
SONAME libnss_files.so.2
INIT 0x1fc8
FINI 0x8380
HASH 0x114
STRTAB 0x1164
SYMTAB 0x784
STRSZ 0xa68
SYMENT 0x10
PLTGOT 0x95dc
PLTRELSZ 0x180
PLTREL 0x11
JMPREL 0x1e48
REL 0x1df0
RELSZ 0x58
RELENT 0x8
VERDEF 0x1d48
VERDEFNUM 0x2
VERNEED 0x1d80
VERNEEDNUM 0x1
VERSYM 0x1c0c
RELCOUNT 0x3
Version definitions:
1 0x01 0x0762b762 libnss_files.so.2
2 0x00 0x0963cf85 GLIBC_PRIVATE
Version References:
required from libc.so.6:
0x09691f73 0x00 08 GLIBC_2.1.3
0x0963cf85 0x00 07 GLIBC_PRIVATE
0x0b792650 0x00 06 GCC_3.0
0x0d696912 0x00 05 GLIBC_2.2
0x0d696911 0x00 04 GLIBC_2.1
0x0d696910 0x00 03 GLIBC_2.0
$ objdump -p /lib/libnss_files-2.2.4.so
/lib/libnss_files-2.2.4.so: file format elf32-i386
Program Header:
PHDR off 0x00000034 vaddr 0x00000034 paddr 0x00000034 align 2**2
filesz 0x000000c0 memsz 0x000000c0 flags r-x
INTERP off 0x00008300 vaddr 0x00008300 paddr 0x00008300 align 2**0
filesz 0x00000013 memsz 0x00000013 flags r--
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x00008313 memsz 0x00008313 flags r-x
LOAD off 0x00008314 vaddr 0x00009314 paddr 0x00009314 align 2**12
filesz 0x000001b0 memsz 0x000003a4 flags rw-
DYNAMIC off 0x00008414 vaddr 0x00009414 paddr 0x00009414 align 2**2
filesz 0x000000b0 memsz 0x000000b0 flags rw-
NOTE off 0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2
filesz 0x00000020 memsz 0x00000020 flags r--
Dynamic Section:
NEEDED libc.so.6
SONAME libnss_files.so.2
INIT 0x1f18
FINI 0x81a0
HASH 0x114
STRTAB 0x1148
SYMTAB 0x768
STRSZ 0xa1f
SYMENT 0x10
PLTGOT 0x9330
PLTRELSZ 0x178
PLTREL 0x11
JMPREL 0x1da0
REL 0x1d60
RELSZ 0x40
RELENT 0x8
VERDEF 0x1cc4
VERDEFNUM 0x3
VERNEED 0x1d20
VERNEEDNUM 0x1
VERSYM 0x1b86
Version definitions:
1 0x01 0x0762b762 libnss_files.so.2
2 0x00 0x0d696910 GLIBC_2.0
3 0x00 0x0d696911 GLIBC_2.1
GLIBC_2.0
Version References:
required from libc.so.6:
0x0d696912 0x00 06 GLIBC_2.2
0x0d696911 0x00 05 GLIBC_2.1
0x0d696910 0x00 04 GLIBC_2.0
$ objdump -p /lib/security/pam_unix.so
/lib/security/pam_unix.so: file format elf32-i386
Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x000097e0 memsz 0x000097e0 flags r-x
LOAD off 0x000097e0 vaddr 0x0000a7e0 paddr 0x0000a7e0 align 2**12
filesz 0x000003a8 memsz 0x00000940 flags rw-
DYNAMIC off 0x00009868 vaddr 0x0000a868 paddr 0x0000a868 align 2**2
filesz 0x000000f0 memsz 0x000000f0 flags rw-
Dynamic Section:
NEEDED libnsl.so.1
NEEDED libnss_files.so.2
NEEDED libnss_nis.so.2
NEEDED libnss_nisplus.so.2
NEEDED libcrypt.so.1
NEEDED libc.so.6
NEEDED libdl.so.2
INIT 0x1cd0
FINI 0x84e0
HASH 0x94
STRTAB 0xf78
SYMTAB 0x538
STRSZ 0x6ac
SYMENT 0x10
PLTGOT 0xa968
PLTRELSZ 0x3d0
PLTREL 0x11
JMPREL 0x1900
REL 0x1898
RELSZ 0x68
RELENT 0x8
VERNEED 0x1798
VERNEEDNUM 0x6
VERSYM 0x164e
RELCOUNT 0x3
Version References:
required from libcrypt.so.1:
0x0d696910 0x00 11 GLIBC_2.0
required from libnss_nisplus.so.2:
0x0d696911 0x00 10 GLIBC_2.1
required from libnss_files.so.2:
0x0d696910 0x00 06 GLIBC_2.0
required from libnsl.so.1:
0x0d696910 0x00 07 GLIBC_2.0
0x0d696911 0x00 05 GLIBC_2.1
required from libnss_nis.so.2:
0x0d696910 0x00 04 GLIBC_2.0
required from libc.so.6:
0x09691f73 0x00 09 GLIBC_2.1.3
0x0d696912 0x00 08 GLIBC_2.2
0x0d696911 0x00 03 GLIBC_2.1
0x0d696910 0x00 02 GLIBC_2.0
As you can see, in libnss_files.so the version definitions GLIBC_2.0, GLIBC_2.1
have been dropped. Similarly, in libnss_nis.so the version definitions
GLIBC_2.0, GLIBC_2.2 have been dropped. And in libnss_nisplus.so the version
definition GLIBC_2.1 has been dropped.
These are binary incompatibilities. Either you have to bump the major version
number of these libraries to 3, or take measures to keep the
symbol and version definitions in order to satisfy existing shared library
references.
This patch fixes it. Now I can "su" again.
2002-04-09 Bruno Haible <bruno@clisp.org>
* nss/Versions (libnss_files): Restore the exports needed by
pam_unix.so.
* nis/Versions (libnss_nis): Likewise.
(libnss_nisplus): Likewise.
*** glibc-20020408/nss/Versions.bak Mon Feb 4 12:42:40 2002
--- glibc-20020408/nss/Versions Tue Apr 9 12:07:32 2002
***************
*** 60,66 ****
_nss_files_setpwent;
_nss_files_endpwent;
_nss_files_getpwent_r;
- _nss_files_getpwnam_r;
_nss_files_getpwuid_r;
_nss_files_setrpcent;
--- 60,65 ----
***************
*** 80,89 ****
_nss_files_setspent;
_nss_files_endspent;
_nss_files_getspent_r;
- _nss_files_getspnam_r;
_nss_netgroup_parseline;
_nss_files_getpublickey;
_nss_files_getsecretkey;
}
}
--- 79,94 ----
_nss_files_setspent;
_nss_files_endspent;
_nss_files_getspent_r;
_nss_netgroup_parseline;
_nss_files_getpublickey;
_nss_files_getsecretkey;
}
+ GLIBC_2.0 {
+ # Should be GLIBC_PRIVATE. Kept here to ensure the presence of the
+ # GLIBC_2.0 version definition and to satisfy pam_unix.so, needed for
+ # backward compatibility.
+ _nss_files_getpwnam_r;
+ _nss_files_getspnam_r;
+ }
}
*** glibc-20020408/nis/Versions.bak Mon Feb 4 12:42:40 2002
--- glibc-20020408/nis/Versions Tue Apr 9 12:08:01 2002
***************
*** 83,98 ****
_nss_nis_getnetent_r; _nss_nis_getnetgrent_r; _nss_nis_getntohost_r;
_nss_nis_getprotobyname_r; _nss_nis_getprotobynumber_r;
_nss_nis_getprotoent_r; _nss_nis_getpublickey; _nss_nis_getpwent_r;
! _nss_nis_getpwnam_r; _nss_nis_getpwuid_r; _nss_nis_getrpcbyname_r;
_nss_nis_getrpcbynumber_r; _nss_nis_getrpcent_r; _nss_nis_getsecretkey;
_nss_nis_getservbyname_r; _nss_nis_getservbyport_r; _nss_nis_getservent_r;
! _nss_nis_getspent_r; _nss_nis_getspnam_r;
_nss_nis_netname2user; _nss_nis_setaliasent; _nss_nis_setetherent;
_nss_nis_setgrent; _nss_nis_sethostent; _nss_nis_setnetent;
_nss_nis_setnetgrent; _nss_nis_setprotoent; _nss_nis_setpwent;
_nss_nis_setrpcent; _nss_nis_setservent; _nss_nis_setspent;
_nss_nis_initgroups_dyn;
}
}
libnss_nisplus {
--- 83,104 ----
_nss_nis_getnetent_r; _nss_nis_getnetgrent_r; _nss_nis_getntohost_r;
_nss_nis_getprotobyname_r; _nss_nis_getprotobynumber_r;
_nss_nis_getprotoent_r; _nss_nis_getpublickey; _nss_nis_getpwent_r;
! _nss_nis_getpwuid_r; _nss_nis_getrpcbyname_r;
_nss_nis_getrpcbynumber_r; _nss_nis_getrpcent_r; _nss_nis_getsecretkey;
_nss_nis_getservbyname_r; _nss_nis_getservbyport_r; _nss_nis_getservent_r;
! _nss_nis_getspent_r;
_nss_nis_netname2user; _nss_nis_setaliasent; _nss_nis_setetherent;
_nss_nis_setgrent; _nss_nis_sethostent; _nss_nis_setnetent;
_nss_nis_setnetgrent; _nss_nis_setprotoent; _nss_nis_setpwent;
_nss_nis_setrpcent; _nss_nis_setservent; _nss_nis_setspent;
_nss_nis_initgroups_dyn;
}
+ GLIBC_2.0 {
+ # Should be GLIBC_PRIVATE. Kept here to ensure the presence of the
+ # GLIBC_2.0 version definition and to satisfy pam_unix.so, needed for
+ # backward compatibility.
+ _nss_nis_getpwnam_r; _nss_nis_getspnam_r;
+ }
}
libnss_nisplus {
***************
*** 111,122 ****
_nss_nisplus_getnetgrent_r; _nss_nisplus_getntohost_r;
_nss_nisplus_getprotobyname_r; _nss_nisplus_getprotobynumber_r;
_nss_nisplus_getprotoent_r; _nss_nisplus_getpublickey;
! _nss_nisplus_getpwent_r; _nss_nisplus_getpwnam_r; _nss_nisplus_getpwuid_r;
_nss_nisplus_getrpcbyname_r; _nss_nisplus_getrpcbynumber_r;
_nss_nisplus_getrpcent_r; _nss_nisplus_getsecretkey;
_nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r;
_nss_nisplus_getservent_r; _nss_nisplus_getspent_r;
! _nss_nisplus_getspnam_r; _nss_nisplus_netname2user;
_nss_nisplus_parse_grent; _nss_nisplus_parse_pwent;
_nss_nisplus_parse_spent; _nss_nisplus_setaliasent;
_nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent;
--- 117,128 ----
_nss_nisplus_getnetgrent_r; _nss_nisplus_getntohost_r;
_nss_nisplus_getprotobyname_r; _nss_nisplus_getprotobynumber_r;
_nss_nisplus_getprotoent_r; _nss_nisplus_getpublickey;
! _nss_nisplus_getpwent_r; _nss_nisplus_getpwuid_r;
_nss_nisplus_getrpcbyname_r; _nss_nisplus_getrpcbynumber_r;
_nss_nisplus_getrpcent_r; _nss_nisplus_getsecretkey;
_nss_nisplus_getservbyname_r; _nss_nisplus_getservbynumber_r;
_nss_nisplus_getservent_r; _nss_nisplus_getspent_r;
! _nss_nisplus_netname2user;
_nss_nisplus_parse_grent; _nss_nisplus_parse_pwent;
_nss_nisplus_parse_spent; _nss_nisplus_setaliasent;
_nss_nisplus_setetherent; _nss_nisplus_setgrent; _nss_nisplus_sethostent;
***************
*** 124,127 ****
--- 130,139 ----
_nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent;
_nss_nisplus_setspent;
}
+ GLIBC_2.1 {
+ # Should be GLIBC_PRIVATE. Kept here to ensure the presence of the
+ # GLIBC_2.1 version definition and to satisfy pam_unix.so, needed for
+ # backward compatibility.
+ _nss_nisplus_getpwnam_r; _nss_nisplus_getspnam_r;
+ }
}
More information about the Libc-alpha
mailing list