logger: initialize socket credentials contol union

Addresses: https://github.com/util-linux/util-linux/issues/2336
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2023-06-26 11:56:23 +02:00
parent 0904cff4a5
commit 3a4d70419c

View file

@ -471,7 +471,7 @@ static void write_output(struct logger_ctl *ctl, const char *const msg)
union {
struct cmsghdr cmh;
char control[CMSG_SPACE(sizeof(struct ucred))];
} cbuf;
} cbuf = { .control = { 0 } };
#endif
/* 4) add extra \n to make sure message is terminated */