mirror of
				https://github.com/fspc/gbootroot.git
				synced 2025-10-31 07:35:36 -04:00 
			
		
		
		
	The proper ldd check is now used if a dynamically linked binary is detected
to require uClibc rather than libc6. The ldd from the default location of /usr/i386-linux-uclibc/bin is used for uClibc.
This commit is contained in:
		
							parent
							
								
									dab981e68f
								
							
						
					
					
						commit
						04354d29d3
					
				| @ -532,9 +532,18 @@ sub library_dependencies { | |||||||
| 	    #####  Run ldd to get library dependencies. | 	    #####  Run ldd to get library dependencies. | ||||||
| 	    my $line; | 	    my $line; | ||||||
| 
 | 
 | ||||||
| 	    ## Busybox uses a different ldd | 	    ## uClibc uses a different ldd  --freesource | ||||||
| ##	    foreach $line (`/usr/i386-linux-uclibc/bin/ldd $file`) { | 	    ## Determine which ldd to use | ||||||
| 	    foreach $line (`ldd $file`) { | 	    my $ldd; | ||||||
|  | 	    my $determine_ldd = `ldd $file 2>&1 1>/dev/null`; | ||||||
|  | 	    if ( $determine_ldd =~ /BusyBox/ ) { | ||||||
|  | 		$ldd = "/usr/i386-linux-uclibc/bin/ldd"; | ||||||
|  | 	    } | ||||||
|  | 	    else { | ||||||
|  | 		$ldd = "ldd"; | ||||||
|  | 	    } | ||||||
|  | 
 | ||||||
|  | 	    foreach $line (`$ldd $file`) { | ||||||
| 		my($lib) = $line =~ / => (\S+)/; | 		my($lib) = $line =~ / => (\S+)/; | ||||||
| 		next unless $lib; | 		next unless $lib; | ||||||
| 		my($abs_lib) = $lib; | 		my($abs_lib) = $lib; | ||||||
| @ -2216,11 +2225,9 @@ sub check_pam { | |||||||
|       my (%file_check, $ok); |       my (%file_check, $ok); | ||||||
|       foreach my $files ( @file ) { |       foreach my $files ( @file ) { | ||||||
| 	  if (!-e "$mount_point/$files") { | 	  if (!-e "$mount_point/$files") { | ||||||
| 	      info(0,"NO $mount_point/$files\n"); |  | ||||||
| 	      $file_check{$files} = 0; | 	      $file_check{$files} = 0; | ||||||
| 	  } | 	  } | ||||||
| 	  else { | 	  else { | ||||||
| 	      info(0,"OK $mount_point/$files\n"); |  | ||||||
| 	      $file_check{$files} = 1; | 	      $file_check{$files} = 1; | ||||||
| 	  } | 	  } | ||||||
|       } |       } | ||||||
| @ -2272,11 +2279,9 @@ sub check_pam { | |||||||
| 	   my (%file_check, $ok); | 	   my (%file_check, $ok); | ||||||
| 	   foreach my $files ( @file ) { | 	   foreach my $files ( @file ) { | ||||||
| 	       if (!-e "$mount_point/$files") { | 	       if (!-e "$mount_point/$files") { | ||||||
| 		   info(0,"NO $mount_point/$files\n"); |  | ||||||
| 		   $file_check{$files} = 0; | 		   $file_check{$files} = 0; | ||||||
| 	       } | 	       } | ||||||
| 	       else { | 	       else { | ||||||
| 		   info(0,"OK $mount_point/$files\n"); |  | ||||||
| 		   $file_check{$files} = 1; | 		   $file_check{$files} = 1; | ||||||
| 	       } | 	       } | ||||||
| 	   } | 	   } | ||||||
| @ -2294,11 +2299,6 @@ sub check_pam { | |||||||
| 
 | 
 | ||||||
| 	   } | 	   } | ||||||
| 
 | 
 | ||||||
| 	#   if (!-e "$mount_point/$file") { |  | ||||||
| 	#      warning_test "$file2($.): $_\n", |  | ||||||
| 	#      	  "\tLibrary $file does not exist on root fs\n"; |  | ||||||
| 	#   } |  | ||||||
| 
 |  | ||||||
| 	} | 	} | ||||||
| 	close(PF); | 	close(PF); | ||||||
|      } |      } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user