diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-10-11 04:43:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-10-11 04:43:01 +0200 |
commit | 688c56ff7d124124007761f917a2950364509043 (patch) | |
tree | 62ff14a2fe368627c5fb76872e3372c533076b51 /src/logind-dbus.c | |
parent | a724d2ed799a8985193ba70c5c3e76f621815e10 (diff) |
logind: fail gracefully if too many sessions are created
https://bugzilla.redhat.com/show_bug.cgi?id=744726
Diffstat (limited to 'src/logind-dbus.c')
-rw-r--r-- | src/logind-dbus.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/logind-dbus.c b/src/logind-dbus.c index bc1e49d18f..0550d1bd1c 100644 --- a/src/logind-dbus.c +++ b/src/logind-dbus.c @@ -973,8 +973,11 @@ static DBusHandlerResult manager_message_handler( } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "CreateSession")) { r = bus_manager_create_session(m, message, &reply); - if (r == -ENOMEM) - goto oom; + + /* Don't delay the work on OOM here, since it might be + * triggered by a low RLIMIT_NOFILE here (since we + * send a dupped fd to the client), and we'd rather + * see this fail quickly then be retried later */ if (r < 0) return bus_send_error_reply(connection, message, &error, r); |