audit-util: use read_full_virtual_file()

Conversely this one is "raw" file, but let's switch to
static inline helper for it.
This commit is contained in:
Mike Yuan
2025-05-01 13:10:26 +09:00
committed by Yu Watanabe
parent 42dbe9d6b9
commit e0c4b80fb0
+1 -1
View File
@@ -37,7 +37,7 @@ static int audit_read_field(const PidRef *pid, const char *field, char **ret) {
_cleanup_free_ char *s = NULL;
bool enoent = false;
r = read_virtual_file(p, SIZE_MAX, &s, /* ret_size= */ NULL);
r = read_full_virtual_file(p, &s, /* ret_size= */ NULL);
if (r == -ENOENT) {
if (proc_mounted() == 0)
return -ENOSYS;