summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-03-14 11:30:17 +0100
committerSven Eden <yamakuzure@gmx.net>2017-03-14 12:12:32 +0100
commit3d1092eab0f4a5c771225c78072a7b6eccb82849 (patch)
tree2b1603e5a0aa1e7e42f4bb9bbcac73bfac46e63d /src/login
parentd76bb3c179b7a32b109e39aa87ff09c8f5a8c178 (diff)
Major cleanup of all leftovers after rebasing on master.
The patching of elogind in several steps with only partly rebasing on a common commit with upstream, left the tree in a state, that was unmergeable with master. By rebasing on master and manually cleaning up all commits, this merge is now possible. However, this process left some orphans, that are cleanup now.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-button.h34
-rw-r--r--src/login/logind-core.c51
-rw-r--r--src/login/logind-dbus.c124
-rw-r--r--src/login/logind-session-dbus.c5
-rw-r--r--src/login/logind.c21
-rw-r--r--src/login/logind.h6
-rw-r--r--src/login/org.freedesktop.login1.conf4
-rw-r--r--src/login/org.freedesktop.login1.service9
-rw-r--r--src/login/pam_elogind.sym4
-rw-r--r--src/login/test-login-tables.c54
10 files changed, 167 insertions, 145 deletions
diff --git a/src/login/logind-button.h b/src/login/logind-button.h
index 95bb6a524..80d93c7e6 100644
--- a/src/login/logind-button.h
+++ b/src/login/logind-button.h
@@ -5,7 +5,7 @@
/***
This file is part of systemd.
- Copyright 2014 Daniel Mack
+ Copyright 2012 Lennart Poettering
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
@@ -21,24 +21,26 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct BusEndpoint BusEndpoint;
-typedef struct BusEndpointPolicy BusEndpointPolicy;
+typedef struct Button Button;
-#include "hashmap.h"
-#include "bus-policy.h"
+#include "logind.h"
-struct BusEndpointPolicy {
- char *name;
- BusPolicyAccess access;
-};
+struct Button {
+ Manager *manager;
-struct BusEndpoint {
- Hashmap *policy_hash;
-};
+ sd_event_source *io_event_source;
+ sd_event_source *check_event_source;
-// UNNEEDED int bus_endpoint_new(BusEndpoint **ep);
-void bus_endpoint_free(BusEndpoint *endpoint);
+ char *name;
+ char *seat;
+ int fd;
-// UNNEEDED int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access);
+ bool lid_closed;
+ bool docked;
+};
-int bus_kernel_set_endpoint_policy(int fd, uid_t uid, BusEndpoint *ep);
+Button* button_new(Manager *m, const char *name);
+void button_free(Button*b);
+int button_open(Button *b);
+int button_set_seat(Button *b, const char *sn);
+int button_check_switches(Button *b);
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index 2b4d6ff0b..fe97c1de0 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -354,7 +354,7 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **user) {
int manager_get_idle_hint(Manager *m, dual_timestamp *t) {
Session *s;
bool idle_hint;
- dual_timestamp ts = { 0, 0 };
+ dual_timestamp ts = DUAL_TIMESTAMP_NULL;
Iterator i;
assert(m);
@@ -474,7 +474,7 @@ int manager_spawn_autovt(Manager *m, unsigned int vtnr) {
}
#endif // 0
-bool manager_is_docked(Manager *m) {
+static bool manager_is_docked(Manager *m) {
Iterator i;
Button *b;
@@ -485,7 +485,7 @@ bool manager_is_docked(Manager *m) {
return false;
}
-int manager_count_displays(Manager *m) {
+static int manager_count_external_displays(Manager *m) {
_cleanup_udev_enumerate_unref_ struct udev_enumerate *e = NULL;
struct udev_list_entry *item = NULL, *first = NULL;
int r;
@@ -507,7 +507,8 @@ int manager_count_displays(Manager *m) {
udev_list_entry_foreach(item, first) {
_cleanup_udev_device_unref_ struct udev_device *d = NULL;
struct udev_device *p;
- const char *status;
+ const char *status, *enabled, *dash, *nn, *i;
+ bool external = false;
d = udev_device_new_from_syspath(m->udev, udev_list_entry_get_name(item));
if (!d)
@@ -523,6 +524,40 @@ int manager_count_displays(Manager *m) {
if (!streq_ptr(udev_device_get_subsystem(p), "drm"))
continue;
+ nn = udev_device_get_sysname(d);
+ if (!nn)
+ continue;
+
+ /* Ignore internal displays: the type is encoded in
+ * the sysfs name, as the second dash seperated item
+ * (the first is the card name, the last the connector
+ * number). We implement a whitelist of external
+ * displays here, rather than a whitelist, to ensure
+ * we don't block suspends too eagerly. */
+ dash = strchr(nn, '-');
+ if (!dash)
+ continue;
+
+ dash++;
+ FOREACH_STRING(i, "VGA-", "DVI-I-", "DVI-D-", "DVI-A-"
+ "Composite-", "SVIDEO-", "Component-",
+ "DIN-", "DP-", "HDMI-A-", "HDMI-B-", "TV-") {
+
+ if (startswith(dash, i)) {
+ external = true;
+ break;
+ }
+ }
+ if (!external)
+ continue;
+
+ /* Ignore ports that are not enabled */
+ enabled = udev_device_get_sysattr_value(d, "enabled");
+ if (!enabled)
+ continue;
+ if (!streq_ptr(enabled, "enabled"))
+ continue;
+
/* We count any connector which is not explicitly
* "disconnected" as connected. */
status = udev_device_get_sysattr_value(d, "status");
@@ -533,7 +568,7 @@ int manager_count_displays(Manager *m) {
return n;
}
-bool manager_is_docked_or_multiple_displays(Manager *m) {
+bool manager_is_docked_or_external_displays(Manager *m) {
int n;
/* If we are docked don't react to lid closing */
@@ -544,11 +579,11 @@ bool manager_is_docked_or_multiple_displays(Manager *m) {
/* If we have more than one display connected,
* assume that we are docked. */
- n = manager_count_displays(m);
+ n = manager_count_external_displays(m);
if (n < 0)
log_warning_errno(n, "Display counting failed: %m");
- else if (n > 1) {
- log_debug("Multiple (%i) displays connected.", n);
+ else if (n >= 1) {
+ log_debug("External (%i) displays connected.", n);
return true;
}
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 800e2a51b..e59795eed 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -158,7 +158,7 @@ static int property_get_idle_since_hint(
sd_bus_error *error) {
Manager *m = userdata;
- dual_timestamp t;
+ dual_timestamp t = DUAL_TIMESTAMP_NULL;
assert(bus);
assert(reply);
@@ -243,6 +243,24 @@ static int property_get_scheduled_shutdown(
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_handle_action, handle_action, HandleAction);
+static int property_get_docked(
+ sd_bus *bus,
+ const char *path,
+ const char *interface,
+ const char *property,
+ sd_bus_message *reply,
+ void *userdata,
+ sd_bus_error *error) {
+
+ Manager *m = userdata;
+
+ assert(bus);
+ assert(reply);
+ assert(m);
+
+ return sd_bus_message_append(reply, "b", manager_is_docked_or_external_displays(m));
+}
+
static int method_get_session(sd_bus_message *message, void *userdata, sd_bus_error *error) {
_cleanup_free_ char *p = NULL;
Manager *m = userdata;
@@ -671,45 +689,26 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus
return r;
}
- manager_get_session_by_pid(m, leader, &session);
- if (session) {
- _cleanup_free_ char *path = NULL;
- _cleanup_close_ int fifo_fd = -1;
-
- /* Session already exists, client is probably
- * something like "su" which changes uid but is still
- * the same session */
-
- fifo_fd = session_create_fifo(session);
- if (fifo_fd < 0)
- return fifo_fd;
-
- path = session_bus_path(session);
- if (!path)
- return -ENOMEM;
-
- log_debug("Sending reply about an existing session: "
- "id=%s object_path=%s uid=%u runtime_path=%s "
- "session_fd=%d seat=%s vtnr=%u",
- session->id,
- path,
- (uint32_t) session->user->uid,
- session->user->runtime_path,
- fifo_fd,
- session->seat ? session->seat->id : "",
- (uint32_t) session->vtnr);
-
- return sd_bus_reply_method_return(
- message, "soshusub",
- session->id,
- path,
- session->user->runtime_path,
- fifo_fd,
- (uint32_t) session->user->uid,
- session->seat ? session->seat->id : "",
- (uint32_t) session->vtnr,
- true);
- }
+ r = manager_get_session_by_pid(m, leader, NULL);
+ if (r > 0)
+ return sd_bus_error_setf(error, BUS_ERROR_SESSION_BUSY, "Already running in a session");
+
+ /*
+ * Old gdm and lightdm start the user-session on the same VT as
+ * the greeter session. But they destroy the greeter session
+ * after the user-session and want the user-session to take
+ * over the VT. We need to support this for
+ * backwards-compatibility, so make sure we allow new sessions
+ * on a VT that a greeter is running on. Furthermore, to allow
+ * re-logins, we have to allow a greeter to take over a used VT for
+ * the exact same reasons.
+ */
+ if (c != SESSION_GREETER &&
+ vtnr > 0 &&
+ vtnr < m->seat0->position_count &&
+ m->seat0->positions[vtnr] &&
+ m->seat0->positions[vtnr]->class != SESSION_GREETER)
+ return sd_bus_error_setf(error, BUS_ERROR_SESSION_BUSY, "Already occupied by a session");
audit_session_from_pid(leader, &audit_id);
if (audit_id > 0) {
@@ -825,8 +824,6 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus
if (r < 0)
goto fail;
- session_save(session);
-
return 1;
fail:
@@ -1184,7 +1181,7 @@ static int trigger_device(Manager *m, struct udev_device *d) {
if (!t)
return -ENOMEM;
- write_string_file(t, "change");
+ write_string_file(t, "change", WRITE_STRING_FILE_CREATE);
}
return 0;
@@ -1523,18 +1520,13 @@ static int execute_shutdown_or_sleep(
return 0;
}
-static int manager_inhibit_timeout_handler(
- sd_event_source *s,
- uint64_t usec,
- void *userdata) {
+int manager_dispatch_delayed(Manager *manager, bool timeout) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
Inhibitor *offending = NULL;
- Manager *manager = userdata;
int r;
assert(manager);
- assert(manager->inhibit_timeout_source == s);
if (manager->action_what == 0)
return 0;
@@ -1542,6 +1534,9 @@ static int manager_inhibit_timeout_handler(
if (manager_is_inhibited(manager, manager->action_what, INHIBIT_DELAY, NULL, false, false, 0, &offending)) {
_cleanup_free_ char *comm = NULL, *u = NULL;
+ if (!timeout)
+ return 0;
+
(void) get_process_comm(offending->pid, &comm);
u = uid_to_name(offending->uid);
@@ -1557,9 +1552,25 @@ static int manager_inhibit_timeout_handler(
manager->pending_action = HANDLE_IGNORE;
manager->action_what = 0;
+ return r;
}
- return 0;
+ return 1;
+}
+
+static int manager_inhibit_timeout_handler(
+ sd_event_source *s,
+ uint64_t usec,
+ void *userdata) {
+
+ Manager *manager = userdata;
+ int r;
+
+ assert(manager);
+ assert(manager->inhibit_timeout_source == s);
+
+ r = manager_dispatch_delayed(manager, true);
+ return (r < 0) ? r : 0;
}
static int delay_shutdown_or_sleep(
@@ -1790,7 +1801,7 @@ static int nologin_timeout_handler(
log_info("Creating /run/nologin, blocking further logins...");
- r = write_string_file_atomic("/run/nologin", "System is going down.");
+ r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
if (r < 0)
log_error_errno(r, "Failed to create /run/nologin: %m");
else
@@ -2001,6 +2012,11 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
m->scheduled_shutdown_type = mfree(m->scheduled_shutdown_type);
m->scheduled_shutdown_timeout = 0;
+ if (m->unlink_nologin) {
+ (void) unlink("/run/nologin");
+ m->unlink_nologin = false;
+ }
+
if (cancelled) {
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
const char *tty = NULL;
@@ -2483,6 +2499,7 @@ const sd_bus_vtable manager_vtable[] = {
SD_BUS_PROPERTY("PreparingForShutdown", "b", property_get_preparing, 0, 0),
SD_BUS_PROPERTY("PreparingForSleep", "b", property_get_preparing, 0, 0),
SD_BUS_PROPERTY("ScheduledShutdown", "(st)", property_get_scheduled_shutdown, 0, 0),
+ SD_BUS_PROPERTY("Docked", "b", property_get_docked, 0, 0),
SD_BUS_METHOD("GetSession", "s", "o", method_get_session, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("GetSessionByPID", "u", "o", method_get_session_by_pid, SD_BUS_VTABLE_UNPRIVILEGED),
@@ -2512,8 +2529,6 @@ const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD("PowerOff", "b", NULL, method_poweroff, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Reboot", "b", NULL, method_reboot, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Suspend", "b", NULL, method_suspend, SD_BUS_VTABLE_UNPRIVILEGED),
- SD_BUS_METHOD("ScheduleShutdown", "st", NULL, method_schedule_shutdown, SD_BUS_VTABLE_UNPRIVILEGED),
- SD_BUS_METHOD("CancelScheduledShutdown", NULL, "b", method_cancel_scheduled_shutdown, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Hibernate", "b", NULL, method_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("HybridSleep", "b", NULL, method_hybrid_sleep, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("CanPowerOff", NULL, "s", method_can_poweroff, SD_BUS_VTABLE_UNPRIVILEGED),
@@ -2521,6 +2536,8 @@ const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD("CanSuspend", NULL, "s", method_can_suspend, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("CanHibernate", NULL, "s", method_can_hibernate, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("CanHybridSleep", NULL, "s", method_can_hybrid_sleep, SD_BUS_VTABLE_UNPRIVILEGED),
+ SD_BUS_METHOD("ScheduleShutdown", "st", NULL, method_schedule_shutdown, SD_BUS_VTABLE_UNPRIVILEGED),
+ SD_BUS_METHOD("CancelScheduledShutdown", NULL, "b", method_cancel_scheduled_shutdown, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("Inhibit", "ssss", "h", method_inhibit, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("CanRebootToFirmwareSetup", NULL, "s", method_can_reboot_to_firmware_setup, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD("SetRebootToFirmwareSetup", "b", NULL, method_set_reboot_to_firmware_setup, SD_BUS_VTABLE_UNPRIVILEGED),
@@ -2599,6 +2616,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
session_jobs_reply(session, unit, result);
session_save(session);
+ user_save(session->user);
session_add_to_gc_queue(session);
}
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index b0db8e2cc..5d3fec411 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -720,9 +720,10 @@ int session_send_create_reply(Session *s, sd_bus_error *error) {
if (fifo_fd < 0)
return fifo_fd;
- /* Update the session state file before we notify the client
- * about the result. */
+ /* Update the session and user state files before we notify
+ * the client about the result. */
session_save(s);
+ user_save(s->user);
p = session_bus_path(s);
if (!p)
diff --git a/src/login/logind.c b/src/login/logind.c
index 23f405993..0b7d9653a 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -30,11 +30,11 @@
#include "conf-parser.h"
#include "bus-util.h"
#include "bus-error.h"
-#include "logind.h"
#include "udev-util.h"
#include "formats-util.h"
+#include "signal-util.h"
#include "label.h"
-#include "label.h"
+#include "logind.h"
#include "cgroup.h"
#include "mount-setup.h"
#include "virt.h"
@@ -203,7 +203,7 @@ static void manager_free(Manager *m) {
udev_unref(m->udev);
if (m->unlink_nologin)
- unlink("/run/nologin");
+ (void) unlink("/run/nologin");
bus_verify_polkit_async_registry_free(m->polkit_registry);
@@ -869,13 +869,8 @@ static int manager_connect_console(Manager *m) {
return -EINVAL;
}
- r = ignore_signals(SIGRTMIN + 1, -1);
- if (r < 0)
- return log_error_errno(r, "Cannot ignore SIGRTMIN + 1: %m");
-
- r = sigprocmask_many(SIG_BLOCK, SIGRTMIN, -1);
- if (r < 0)
- return log_error_errno(r, "Cannot block SIGRTMIN: %m");
+ assert_se(ignore_signals(SIGRTMIN + 1, -1) >= 0);
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGRTMIN, -1) >= 0);
r = sd_event_add_signal(m->event, NULL, SIGRTMIN, manager_vt_switch, m);
if (r < 0)
@@ -1202,6 +1197,12 @@ static int manager_run(Manager *m) {
manager_gc(m, true);
+ r = manager_dispatch_delayed(m, false);
+ if (r < 0)
+ return r;
+ if (r > 0)
+ continue;
+
r = sd_event_run(m->event, (uint64_t) -1);
if (r < 0)
return r;
diff --git a/src/login/logind.h b/src/login/logind.h
index 29432823e..4783ea3b2 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -185,9 +185,7 @@ int manager_get_idle_hint(Manager *m, dual_timestamp *t);
int manager_get_user_by_pid(Manager *m, pid_t pid, User **user);
int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session);
-bool manager_is_docked(Manager *m);
-int manager_count_displays(Manager *m);
-bool manager_is_docked_or_multiple_displays(Manager *m);
+bool manager_is_docked_or_external_displays(Manager *m);
extern const sd_bus_vtable manager_vtable[];
@@ -227,3 +225,5 @@ int manager_get_seat_from_creds(Manager *m, sd_bus_message *message, const char
int manager_setup_wall_message_timer(Manager *m);
bool logind_wall_tty_filter(const char *tty, void *userdata);
+
+int manager_dispatch_delayed(Manager *manager, bool timeout);
diff --git a/src/login/org.freedesktop.login1.conf b/src/login/org.freedesktop.login1.conf
index c89e40457..1662d4c42 100644
--- a/src/login/org.freedesktop.login1.conf
+++ b/src/login/org.freedesktop.login1.conf
@@ -234,10 +234,6 @@
<allow send_destination="org.freedesktop.login1"
send_interface="org.freedesktop.login1.Session"
- send_member="SetLockedHint"/>
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Session"
send_member="Kill"/>
<allow send_destination="org.freedesktop.login1"
diff --git a/src/login/org.freedesktop.login1.service b/src/login/org.freedesktop.login1.service
index a30a8da60..762dae2bb 100644
--- a/src/login/org.freedesktop.login1.service
+++ b/src/login/org.freedesktop.login1.service
@@ -5,7 +5,8 @@
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
-# See tmpfiles.d(5), systemd-user-session.service(5) and pam_nologin(8).
-# This file has special suffix so it is not run by mistake.
-
-F! /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"
+[D-BUS Service]
+Name=org.freedesktop.login1
+Exec=/bin/false
+User=root
+SystemdService=dbus-org.freedesktop.login1.service
diff --git a/src/login/pam_elogind.sym b/src/login/pam_elogind.sym
index 8f3aed665..23ff75f68 100644
--- a/src/login/pam_elogind.sym
+++ b/src/login/pam_elogind.sym
@@ -11,9 +11,5 @@
global:
pam_sm_close_session;
pam_sm_open_session;
- _nss_mymachines_getpwnam_r;
- _nss_mymachines_getpwuid_r;
- _nss_mymachines_getgrnam_r;
- _nss_mymachines_getgrgid_r;
local: *;
};
diff --git a/src/login/test-login-tables.c b/src/login/test-login-tables.c
index 0ee5ddcc9..a4196bf14 100644
--- a/src/login/test-login-tables.c
+++ b/src/login/test-login-tables.c
@@ -1,7 +1,7 @@
/***
This file is part of systemd
- Copyright 2014 Zbigniew Jędrzejewski-Szmek
+ Copyright 2013 Zbigniew Jędrzejewski-Szmek
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
@@ -17,47 +17,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "set.h"
+#include "logind-action.h"
+#include "logind-session.h"
-static void test_set_steal_first(void) {
- _cleanup_set_free_ Set *m = NULL;
- int seen[3] = {};
- char *val;
+#include "test-tables.h"
- m = set_new(&string_hash_ops);
- assert_se(m);
+int main(int argc, char **argv) {
+ test_table(handle_action, HANDLE_ACTION);
+ test_table(inhibit_mode, INHIBIT_MODE);
+ test_table(kill_who, KILL_WHO);
+ test_table(session_class, SESSION_CLASS);
+ test_table(session_state, SESSION_STATE);
+ test_table(session_type, SESSION_TYPE);
+ test_table(user_state, USER_STATE);
- assert_se(set_put(m, (void*) "1") == 1);
- assert_se(set_put(m, (void*) "22") == 1);
- assert_se(set_put(m, (void*) "333") == 1);
-
- while ((val = set_steal_first(m)))
- seen[strlen(val) - 1]++;
-
- assert_se(seen[0] == 1 && seen[1] == 1 && seen[2] == 1);
-
- assert_se(set_isempty(m));
-}
-
-static void test_set_put(void) {
- _cleanup_set_free_ Set *m = NULL;
-
- m = set_new(&string_hash_ops);
- assert_se(m);
-
- assert_se(set_put(m, (void*) "1") == 1);
- assert_se(set_put(m, (void*) "22") == 1);
- assert_se(set_put(m, (void*) "333") == 1);
- assert_se(set_put(m, (void*) "333") == 0);
- assert_se(set_remove(m, (void*) "333"));
- assert_se(set_put(m, (void*) "333") == 1);
- assert_se(set_put(m, (void*) "333") == 0);
- assert_se(set_put(m, (void*) "22") == 0);
-}
-
-int main(int argc, const char *argv[]) {
- test_set_steal_first();
- test_set_put();
-
- return 0;
+ return EXIT_SUCCESS;
}