diff options
Diffstat (limited to 'src/logic/slbt_exec_uninstall.c')
-rw-r--r-- | src/logic/slbt_exec_uninstall.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_uninstall.c b/src/logic/slbt_exec_uninstall.c index 9f2521c..2930c26 100644 --- a/src/logic/slbt_exec_uninstall.c +++ b/src/logic/slbt_exec_uninstall.c @@ -166,6 +166,7 @@ static int slbt_exec_uninstall_entry( char ** parg, uint32_t flags) { + int fdcwd; const char * dsosuffix; char * dot; char path [PATH_MAX]; @@ -177,6 +178,9 @@ static int slbt_exec_uninstall_entry( *parg = (char *)entry->arg; + /* fdcwd */ + fdcwd = slbt_driver_fdcwd(dctx); + /* remove explicit argument */ if (slbt_exec_uninstall_fs_entry(dctx,ectx,parg,path,flags)) return SLBT_NESTED_ERROR(dctx); @@ -200,7 +204,7 @@ static int slbt_exec_uninstall_entry( /* .so symlink? */ strcpy(dot,dsosuffix); - if (!(slbt_readlink(path,lpath,sizeof(lpath)))) + if (!(slbt_readlinkat(fdcwd,path,lpath,sizeof(lpath)))) if (slbt_exec_uninstall_versioned_library( dctx,ectx,parg, path,lpath, @@ -210,7 +214,7 @@ static int slbt_exec_uninstall_entry( /* .lib.a symlink? */ strcpy(dot,".lib.a"); - if (!(slbt_readlink(path,lpath,sizeof(lpath)))) + if (!(slbt_readlinkat(fdcwd,path,lpath,sizeof(lpath)))) if (slbt_exec_uninstall_versioned_library( dctx,ectx,parg, path,lpath, @@ -220,7 +224,7 @@ static int slbt_exec_uninstall_entry( /* .dll symlink? */ strcpy(dot,".dll"); - if (!(slbt_readlink(path,lpath,sizeof(lpath)))) + if (!(slbt_readlinkat(fdcwd,path,lpath,sizeof(lpath)))) if (slbt_exec_uninstall_versioned_library( dctx,ectx,parg, path,lpath, |