Since systemd v236, several Arch users complained that
systemd-cryptsetup-generator exits with an OOM error and that it
prevents the boot from continuing.
Investigating the diff of cryptsetup-generator between v235 and v236 I
noticed that create_disk allowed for the `password` and `filtered`
variables to be NULL (they're handled with `strempty()`) but not their
`*_escaped` versions, and returned OOM errors in those cases.
Fix this by checking that the input string is non-NULL before deciding
that `specifier_escape` had an OOM error.
I could not test this fix myself, but some users have reported success.
Downstream bug: https://bugs.archlinux.org/task/56733
return log_error_errno(r, "Failed to generate unit name: %m");
password_escaped = specifier_escape(password);
- if (!password_escaped)
+ if (password && !password_escaped)
return log_oom();
r = generator_open_unit_file(arg_dest, NULL, n, &f);
return r;
filtered_escaped = specifier_escape(filtered);
- if (!filtered_escaped)
+ if (filtered && !filtered_escaped)
return log_oom();
fprintf(f,