X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fask-password-api.c;h=8a0fb89a84b8b69f61cb0a316e4c4d16ba7f56a4;hb=961e4526925b7b1e1d3582f2fc9fb38035e2b5fb;hp=55be807cf20eb634b44b6939288d2febaef7e6d7;hpb=3bdf9c1d0a241eff2d17591854172725682b27cd;p=elogind.git diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 55be807cf..8a0fb89a8 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -281,8 +281,7 @@ static int create_socket(char **name) { } if (!(c = strdup(sa.un.sun_path))) { - r = -ENOMEM; - log_error("Out of memory"); + r = log_oom(); goto fail; } @@ -324,7 +323,7 @@ int ask_password_agent( sigset_add_many(&mask, SIGINT, SIGTERM, -1); assert_se(sigprocmask(SIG_BLOCK, &mask, &oldmask) == 0); - mkdir_p("/run/systemd/ask-password", 0755); + mkdir_p_label("/run/systemd/ask-password", 0755); u = umask(0022); fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY);