iovec_add_string(iov, iovlen, msg, 0);
if (!ctl->noact) {
- struct msghdr msg = { 0 };
+ struct msghdr message = { 0 };
struct cmsghdr *cmhp;
struct ucred *cred;
union {
if ((ctl->socket_type == TYPE_TCP) && !ctl->octet_count)
iovec_add_string(iov, iovlen, "\n", 1);
- msg.msg_iov = iov;
- msg.msg_iovlen = iovlen;
+ message.msg_iov = iov;
+ message.msg_iovlen = iovlen;
/* syslog/journald may follow local socket credentials rather
* than in the message PID. If we use --id as root than we can
if (ctl->pid && !ctl->server && ctl->pid != getpid()
&& geteuid() == 0 && kill(ctl->pid, 0) == 0) {
- msg.msg_control = cbuf.control;
- msg.msg_controllen = CMSG_SPACE(sizeof(struct ucred));
+ message.msg_control = cbuf.control;
+ message.msg_controllen = CMSG_SPACE(sizeof(struct ucred));
- cmhp = CMSG_FIRSTHDR(&msg);
+ cmhp = CMSG_FIRSTHDR(&message);
cmhp->cmsg_len = CMSG_LEN(sizeof(struct ucred));
cmhp->cmsg_level = SOL_SOCKET;
cmhp->cmsg_type = SCM_CREDENTIALS;
cred->pid = ctl->pid;
}
- if (sendmsg(ctl->fd, &msg, 0) < 0)
+ if (sendmsg(ctl->fd, &message, 0) < 0)
warn(_("send message failed"));
}