Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
fi
fi
+ # Fetch any capabilities
+ local capabilities="$(getfattr --no-dereference --name="security.capability" \
+ --absolute-names --dump "${file}" 2>/dev/null)"
+
# Extract sources
if ! extract_sources "${file}"; then
error "Could not extract sources from ${file}"
cat "${tempfile}" > "${file}"
rm -f "${tempfile}"
+ # Restore capabilities
+ if [ -n "${capabilities}" ]; then
+ setfattr --no-dereference --restore=<(echo "${capabilities}")
+ fi
+
return 0
}