diff options
author | Allan McRae <allan@archlinux.org> | 2012-07-16 11:26:31 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2013-01-17 22:32:54 +1000 |
commit | bb4d2b72c1d35ab9d65d632be0dcaf00cfa7d600 (patch) | |
tree | c8b41e71e79a72a80c2fd82f8291c5fe1a9a6e32 | |
parent | 60b192e3836a150eb6950ce52241efebbee00f11 (diff) |
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>
-rw-r--r-- | lib/libalpm/util.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index be20ddee..fd1d7868 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; |