chiark / gitweb /
journal: Fix syslog forwarding without CAP_SYS_ADMIN
[elogind.git] / src / journal / journald-syslog.c
index 6f43fd48c92c6e349d96d6917c3daf0949ab852a..5d211323adef015cbb4b68dd61a18d3bccbc3a3b 100644 (file)
@@ -85,12 +85,12 @@ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned
                 return;
         }
 
-        if (ucred && errno == ESRCH) {
+        if (ucred && (errno == ESRCH || errno == EPERM)) {
                 struct ucred u;
 
                 /* Hmm, presumably the sender process vanished
-                 * by now, so let's fix it as good as we
-                 * can, and retry */
+                 * by now, or we don't have CAP_SYS_AMDIN, so
+                 * let's fix it as good as we can, and retry */
 
                 u = *ucred;
                 u.pid = getpid();