Bug 75876 - libmilter uses strlcpy() function which is not available
Summary: libmilter uses strlcpy() function which is not available
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sendmail
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-14 13:29 UTC by Johann Uhrmann
Modified: 2007-04-18 16:47 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-14 13:29:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Johann Uhrmann 2002-10-14 13:29:30 UTC
Description of problem:
The libmilter library included in sendmail-devel 8.11.6 calls the
libc function strlcpy().
However, that function does not seem to be available with
glibc2.2.5-40.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Compile the following source:

/* compile with gcc -o foo foo.c /usr/lib/libmilter.a -lpthread */
#include <libmilter/mfapi.h>
int main() {
        smfi_main();
        return 0;
}


Actual Results:  /usr/lib/libmilter.a(main.o): In function `smfi_register':
main.o(.text+0x74): undefined reference to `strlcpy'
/usr/lib/libmilter.a(main.o): In function `smfi_setconn':
main.o(.text+0x12f): undefined reference to `strlcpy'
/usr/lib/libmilter.a(listener.o): In function `mi_milteropen':
listener.o(.text+0x184): undefined reference to `strlcpy'
/usr/lib/libmilter.a(engine.o): In function `st_connectinfo':
engine.o(.text+0x83a): undefined reference to `strlcpy'
collect2: ld returned 1 exit status

Expected Results:  compile run without errors

Additional info:

Redhat Linux 7.3
sendmail 8.11.6-15
sendmail-devel 8.11.6-15
glibc and glibc-common 2.2.5-40

Prototype definition of strlcpy() exists in the header files but is
not available for the linker.

Comment 1 Johann Uhrmann 2002-10-27 16:09:21 UTC
The missing functions seem to be available in /usr/lib/libsmutil.a:

Therefore, the call
gcc -o foo foo.c /usr/lib/libmilter.a /usr/lib/libsmutil.a -lpthread

compiles the source listed above.

But are this functions supposed to be in glibc?
(Some programs rely on this and do not check for libsmutil.)


Note You need to log in before you can comment on or make changes to this bug.