Bug 33580
| Summary: | LPRng does not work after krb5 update | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Hermann Schichl <hermann.schichl> |
| Component: | krb5 | Assignee: | Nalin Dahyabhai <nalin> |
| Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.0 | CC: | bbaetz, benito, bob, christof, cmmiller, dmerrill, fbuehlmann, klmitch, leon, marc.schmitt, mscampbe, nigel, pdurst, ralston, sefreeman, tobias |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2001-04-02 17:19:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
recompiling the lpr 3.6.24-2 rpm from the source rpm after installing the krb5 update resolves the problem Other programs are affected as well and need to be recompiled against the new libs. An (incomplete) list is [gerald@keen gerald]$ rpm -q --whatrequires krb5-libs cvs-1.10.8-8 LPRng-3.6.24-2 pine-4.30-2 fetchmail-5.5.0-3 mutt-1.2.5i-8.7 *** Bug 33592 has been marked as a duplicate of this bug. *** *** Bug 33591 has been marked as a duplicate of this bug. *** This is a linkage problem that, ironically, the errata fixed. The cvs binary actually checks out and commits files correctly, so I'm fairly certain that it is not affected. Likewise, Mutt is able to attach files to outgoing mail, and fetchmail also appears unaffected. Pine and LPRng, however are going to require bugfix erratas to correct them. The errata didn't fix the linkage problem; the errata just
demonstrated it. :p
This is the problem:
$ rpm -q krb5-libs
krb5-libs-1.2.1-8
$ nm -a libkrb5.so.3 | grep -i stat
0005e688 T __fstat
U __fxstat@@GLIBC_2.0
0005e660 T __stat
U __xstat@@GLIBC_2.0
0005e688 W fstat
0005c198 t parse_init_state
0005e660 W stat
$ rpm -q krb5-libs
krb5-libs-1.2.2-3
$ nm -a libkrb5.so.3 | grep -i stat
U __fxstat@@GLIBC_2.0
U __xstat@@GLIBC_2.0
0004c4d0 t parse_init_state
The libkrb5.so.3 from krb5-libs-1.2.1-8 contained stat and fstat
functions (which are normally just wrappers for the __xstat and
__fxstat functions, respectively). The libkrb5.so.3 from
krb5-libs-1.2.2-3 doesn't have these functions (more on that below).
Any program compiled and linked against krb5-{devel,libs}-1.2.1-8 will
have picked up stat and fstat as *functions* (provided by
libkrb5.so.3), instead of just treating them as inline expansions.
The result is that any program that was previously linked against
krb5-libs-1.2.1-8 will die when it attempts a stat() or fstat() call
if krb5-libs-1.2.2-3 has replaced krb5-libs-1.2.1-8 on the system.
The reason why stat() and fstat() aren't in the libkrb5.so.3 from
krb5-libs-1.2.1-8 is because of this change in the spec file:
--- krb5.spec.old Wed Aug 16 15:35:23 2000
+++ krb5.spec Thu Mar 15 10:51:13 2001
@@ -339 +403,2 @@
- --with-cc=%{__cc} --with-ccopts="-ggdb" \
+ --with-cc=%{__cc} \
+ --with-ccopts="$RPM_OPT_FLAGS $LOCAL_OPT_FLAGS -fPIC" \
It's the optimization flag that triggers it. Passing -O1 or greater
to gcc (gcc-2.96-69) causes gcc to inline the expansions of stat and
fstat (__xstat and __fxstat, respectively):
$ pwd
/tmp/RPM/BUILD/krb5-1.2.2/src/lib/krb5/os
$ gcc -DHAVE_STDARG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_PATHS_H=1 -DHAVE_REGEX_H=1
-DHAVE_REGEXP_H=1 -DHAVE_FCNTL_H=1 -DHAVE_FLOCK=1 -DHAVE_FCHMOD=1 -DHAVE_CHMOD=1
-DHAVE_STRFTIME=1 -DHAVE_STRPTIME=1 -DHAVE_GETEUID=1 -DHAVE_SETENV=1
-DHAVE_UNSETENV=1 -DHAVE_GETENV=1 -DHAVE_SETSID=1 -DHAVE_GETHOSTBYNAME2=1
-DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRDUP=1 -DHAVE_STRCASECMP=1
-DHAVE_STRERROR=1 -DHAVE_MEMMOVE=1 -DHAVE_DAEMON=1 -DHAVE_GETUID=1
-DHAVE_SSCANF=1 -DHAVE_SYSLOG=1 -DHAVE_RE_COMP=1 -DHAVE_RE_EXEC=1
-DHAVE_REGEXEC=1 -DHAVE_REGCOMP=1 -DKRB5_KRB4_COMPAT -I../../../include
-I./../../../include -I../../../include/krb5 -I./../../../include/krb5 -c kuserok.c
$ nm -a kuserok.o | grep stat
U fstat
$ gcc -DHAVE_STDARG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_PATHS_H=1 -DHAVE_REGEX_H=1
-DHAVE_REGEXP_H=1 -DHAVE_FCNTL_H=1 -DHAVE_FLOCK=1 -DHAVE_FCHMOD=1 -DHAVE_CHMOD=1
-DHAVE_STRFTIME=1 -DHAVE_STRPTIME=1 -DHAVE_GETEUID=1 -DHAVE_SETENV=1
-DHAVE_UNSETENV=1 -DHAVE_GETENV=1 -DHAVE_SETSID=1 -DHAVE_GETHOSTBYNAME2=1
-DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRDUP=1 -DHAVE_STRCASECMP=1
-DHAVE_STRERROR=1 -DHAVE_MEMMOVE=1 -DHAVE_DAEMON=1 -DHAVE_GETUID=1
-DHAVE_SSCANF=1 -DHAVE_SYSLOG=1 -DHAVE_RE_COMP=1 -DHAVE_RE_EXEC=1
-DHAVE_REGEXEC=1 -DHAVE_REGCOMP=1 -DKRB5_KRB4_COMPAT -I../../../include
-I./../../../include -I../../../include/krb5 -I./../../../include/krb5 -O1 -c
kuserok.c
$ nm -a kuserok.o | grep stat
U __fxstat
According to the comments in /usr/include/sys/stat.h
(glibc-devel-2.2-12), if the stat/fstat/lstat functions are not
inlined, they are always statically linked, so the above is correct
behavior.
The fix:
The krb5 package must continue to be compiled without optimization
until all packages compiled against it can be recompiled against a new
version of krb5 that has been compiled with optimization.
--- krb5.spec.1.2.2-3.BROKEN Thu Mar 15 10:51:13 2001
+++ krb5.spec Wed Mar 28 17:58:07 2001
@@ -402,5 +402,5 @@
./configure \
--with-cc=%{__cc} \
- --with-ccopts="$RPM_OPT_FLAGS $LOCAL_OPT_FLAGS -fPIC" \
+ --with-ccopts="-fPIC" \
--enable-shared --enable-static \
--prefix=%{prefix} \
The alternative is to individually audit all of these packages for
stat/fstat calls, and ensure that they all function correctly:
$ rpm --redhatrequires libkrb5.so.3
LPRng-3.6.22-5
cvs-1.10.8-8
fetchmail-5.5.0-2
gnome-kerberos-0.2.1-1
imap-4.7c2-12
krb5-devel-1.2.1-8
krb5-libs-1.2.1-8
krb5-server-1.2.1-8
krb5-workstation-1.2.1-8
krbafs-1.0.2-3
krbafs-utils-1.0.2-3
mutt-1.2.5i-3
pam_krb5-1-19
php-imap-4.0.1pl2-9
pine-4.21-23
samba-2.0.7-21ssl
samba-client-2.0.7-21ssl
samba-common-2.0.7-21ssl
(Hopefully the recompilation of everything krb5-related can occur in
time for Red Hat 7.1...)
BTW, I just rebuilt krb5-1.2.2-3.src.rpm with the above patch applied,
and the resulting krb5-{devel,libs,server,workstation}-1.2.2-3 RPMs
are working fine for me.
*** Bug 33689 has been marked as a duplicate of this bug. *** *** Bug 33709 has been marked as a duplicate of this bug. *** *** Bug 33731 has been marked as a duplicate of this bug. *** *** Bug 33670 has been marked as a duplicate of this bug. *** *** Bug 33736 has been marked as a duplicate of this bug. *** *** Bug 33809 has been marked as a duplicate of this bug. *** *** Bug 33809 has been marked as a duplicate of this bug. *** *** Bug 33748 has been marked as a duplicate of this bug. *** *** Bug 33911 has been marked as a duplicate of this bug. *** *** Bug 33971 has been marked as a duplicate of this bug. *** *** Bug 33974 has been marked as a duplicate of this bug. *** *** Bug 34008 has been marked as a duplicate of this bug. *** *** Bug 34009 has been marked as a duplicate of this bug. *** *** Bug 34060 has been marked as a duplicate of this bug. *** *** Bug 34089 has been marked as a duplicate of this bug. *** *** Bug 34129 has been marked as a duplicate of this bug. *** *** Bug 34149 has been marked as a duplicate of this bug. *** *** Bug 34169 has been marked as a duplicate of this bug. *** *** Bug 34177 has been marked as a duplicate of this bug. *** *** Bug 34323 has been marked as a duplicate of this bug. *** |
From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686) After upgrading the krb5 package, all LPRng tools stop working. They report: lpr: error while loading shared libraries: lpr: undefined symbol: stat Reproducible: Always Steps to Reproduce: 1. update krb5 package 2. call e.g. lpr /etc/hosts Actual Results: lpr reports the following error: lpr: error while loading shared libraries: lpr: undefined symbol: stat Expected Results: lpr should have printed the contents of /etc/hosts Workaround: do not upgrade the krb5-libs package. Not upgrading might result in a security problem, however.