FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-16-2012, 01:41 AM
Allan McRae
 
Default Do not use full path for ldconfig

The ldconfig binary is not guaranteed to be in /sbin. Change to calling
just "ldconfig" rather than using the full path.

This removed the check that the ldconfig binary exists. However, it is
a reasonable assumption that it will exist if its configuration file
does.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
lib/libalpm/util.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index bdb9e56..0db9e87 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -621,13 +621,10 @@ int _alpm_ldconfig(alpm_handle_t *handle)

snprintf(line, PATH_MAX, "%setc/ld.so.conf", handle->root);
if(access(line, F_OK) == 0) {
- snprintf(line, PATH_MAX, "%ssbin/ldconfig", handle->root);
- if(access(line, X_OK) == 0) {
- char arg0[32];
- char *argv[] = { arg0, NULL };
- strcpy(arg0, "ldconfig");
- return _alpm_run_chroot(handle, "/sbin/ldconfig", argv);
- }
+ char arg0[32];
+ char *argv[] = { arg0, NULL };
+ strcpy(arg0, "ldconfig");
+ return _alpm_run_chroot(handle, "ldconfig", argv);
}

return 0;
--
1.7.11.2
 

Thread Tools




All times are GMT. The time now is 03:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org