systemd/0001-make-fortify-happy-with-ppoll.patch

56 lines
2.3 KiB
Diff

--- systemd-209/src/libsystemd/sd-bus/sd-bus.c
+++ systemd-209/src/libsystemd/sd-bus/sd-bus.c 2014-02-28 11:08:21.354235373 +0000
@@ -2548,7 +2548,7 @@ static int bus_poll(sd_bus *bus, bool ne
n = 2;
}
- r = ppoll(p, n, m == (uint64_t) -1 ? NULL : timespec_store(&ts, m), NULL);
+ r = __ppoll_alias(p, n, m == (uint64_t) -1 ? NULL : timespec_store(&ts, m), NULL);
if (r < 0)
return -errno;
--- systemd-209/src/core/hostname-setup.c
+++ systemd-209/src/core/hostname-setup.c 2014-02-28 11:14:51.594832792 +0000
@@ -50,8 +50,8 @@ static int read_and_strip_hostname(const
}
/* strip any leftover of a domain name */
- if (domain = strchr(s, '.')) {
- *domain = NULL;
+ if ((domain = strchr(s, '.'))) {
+ *domain = '\0';
}
*hn = s;
--- systemd-209/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ systemd-209/src/tty-ask-password-agent/tty-ask-password-agent.c 2014-02-28 11:41:42.254735820 +0000
@@ -142,7 +142,7 @@ static int ask_password_plymouth(
goto finish;
}
- if ((j = poll(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
+ if ((j = __poll_alias(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
if (errno == EINTR)
continue;
@@ -595,7 +595,7 @@ static int watch_passwords(void) {
if ((r = show_passwords()) < 0)
log_error("Failed to show password: %s", strerror(-r));
- if (poll(pollfd, _FD_MAX, -1) < 0) {
+ if (__poll_alias(pollfd, _FD_MAX, -1) < 0) {
if (errno == EINTR)
continue;
--- systemd-209/src/shared/ask-password-api.c
+++ systemd-209/src/shared/ask-password-api.c 2014-02-28 11:47:21.754234675 +0000
@@ -138,7 +138,7 @@ int ask_password_tty(
goto finish;
}
- if ((k = poll(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
+ if ((k = __poll_alias(pollfd, notify > 0 ? 2 : 1, sleep_for)) < 0) {
if (errno == EINTR)
continue;