convert_abs_rel() gets
from =/var/tmp/dracut.8dxnpY/initramfs/lib/x86_64-linux-gnu/libuuid.so.1.3.0
target=/var/tmp/dracut.8dxnpY/initramfs/lib/x86_64-linux-gnu/libuuid.so
returning from is invalid; skip over the destdir:
/lib/x86_64-linux-gnu/libuuid.so.1.3.0
dirlen = dir_len(target);
target_dir_p = strndup(target, dirlen);
if (!target_dir_p)
- return strdup(from);
+ return strdup(from + strlen(destrootdir));
realpath_p = realpath(target_dir_p, NULL);
if (realpath_p == NULL) {
log_warning("convert_abs_rel(): target '%s' directory has no realpath.", target);
- return strdup(from);
+ return strdup(from + strlen(destrootdir));
}
/* dir_len() skips double /'s e.g. //lib64, so we can't skip just one