Bug 16056

Summary: [patch] ldconfig skips all command line params. if one is nonexistent
Product: Base System Reporter: un1i <un1i>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description un1i 2000-01-11 09:20:00 UTC
If one (or more) of the directories/files given as command line parameters
doesn't exist, ldconfig doesn't evaluate the others either.

This doesn't happen in -aout mode or when giving a file to ldconfig where
one directory entry doesn't exist. In these cases, ldconfig gives an error
message and treats the other files/directories correctly, i.e. enters them
into var/run/ld-elf.so.hints (resp. /var/run/ld.so.hints).

How-To-Repeat: 
ldconfig -r | wc
       2       3      47
ldconfig /usr/lib /foo
ldconfig: /foo: No such file or directory
ldconfig -r | wc      
       2       3      47

#for comparison:

echo /foo > ld
echo /usr/lib >> ld 
ldconfig ld 
ldconfig -r | wc   
      67     199    2595
Comment 1 John Polstra freebsd_committer freebsd_triage 2000-01-21 02:16:17 UTC
State Changed
From-To: open->closed

Fixed in src/sbin/ldconfig/elfhints.c revision 1.3, using the 
originator's patch with a minor style change.