X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fjournal%2Fjournald-audit.c;h=20936f4bed7109f58d90acf53f551674e0042442;hp=ef4ad288331aca1208d0fb4d1e93c4870e97c315;hb=f131770b1465fbf423881f16ba85523a05f846fe;hpb=56f64d95763a799ba4475daf44d8e9f72a1bd474;ds=sidebyside diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c index ef4ad2883..20936f4be 100644 --- a/src/journal/journald-audit.c +++ b/src/journal/journald-audit.c @@ -206,7 +206,7 @@ static int map_generic_field(const char *prefix, const char **p, struct iovec ** return r; } -/* Kernel fields are those occuring in the audit string before +/* Kernel fields are those occurring in the audit string before * msg='. All of these fields are trusted, hence carry the "_" prefix. * We try to translate the fields we know into our native names. The * other's are generically mapped to _AUDIT_FIELD_XYZ= */ @@ -240,7 +240,7 @@ static const MapField map_fields_kernel[] = { {} }; -/* Userspace fields are thos occuring in the audit string after +/* Userspace fields are those occurring in the audit string after * msg='. All of these fields are untrusted, hence carry no "_" * prefix. We map the fields we don't know to AUDIT_FIELD_XYZ= */ static const MapField map_fields_userspace[] = { @@ -529,18 +529,14 @@ int server_open_audit(Server *s) { } r = bind(s->audit_fd, &sa.sa, sizeof(sa.nl)); - if (r < 0) { - log_error_errno(errno, "Failed to join audit multicast group: %m"); - return -errno; - } + if (r < 0) + return log_error_errno(errno, "Failed to join audit multicast group: %m"); } else fd_nonblock(s->audit_fd, 1); r = setsockopt(s->audit_fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)); - if (r < 0) { - log_error_errno(errno, "Failed to set SO_PASSCRED on audit socket: %m"); - return -errno; - } + if (r < 0) + return log_error_errno(errno, "Failed to set SO_PASSCRED on audit socket: %m"); r = sd_event_add_io(s->event, &s->audit_event_source, s->audit_fd, EPOLLIN, process_datagram, s); if (r < 0)