Line
Link Here
|
0 |
-- install-xattr.c |
0 |
++ install-xattr.c |
Lines 325-330
Link Here
|
325 |
*/ |
325 |
*/ |
326 |
char *oldpwd = getenv("OLDPWD"); |
326 |
char *oldpwd = getenv("OLDPWD"); |
327 |
char *portage_helper_path = getenv("__PORTAGE_HELPER_PATH"); |
327 |
char *portage_helper_path = getenv("__PORTAGE_HELPER_PATH"); |
|
|
328 |
char *portage_helper_canpath = NULL; |
328 |
if (portage_helper_path) |
329 |
if (portage_helper_path) |
329 |
chdir(oldpwd); |
330 |
chdir(oldpwd); |
330 |
|
331 |
|
Lines 334-341
Link Here
|
334 |
|
335 |
|
335 |
case 0: |
336 |
case 0: |
336 |
/* find system install avoiding mypath and portage_helper_path! */ |
337 |
/* find system install avoiding mypath and portage_helper_path! */ |
337 |
install = which(mypath, portage_helper_path); |
338 |
if (portage_helper_path) |
|
|
339 |
portage_helper_canpath = realpath(portage_helper_path, NULL); |
340 |
install = which(mypath, portage_helper_canpath); |
338 |
free(mypath); |
341 |
free(mypath); |
|
|
342 |
free(portage_helper_canpath); |
339 |
argv[0] = install; /* so coreutils' lib/program.c behaves */ |
343 |
argv[0] = install; /* so coreutils' lib/program.c behaves */ |
340 |
execv(install, argv); /* The kernel will free(install). */ |
344 |
execv(install, argv); /* The kernel will free(install). */ |
341 |
err(1, "execv() failed"); |
345 |
err(1, "execv() failed"); |