summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-16 16:28:26 +0900
committerGitHub <noreply@github.com>2023-04-16 16:28:26 +0900
commitd8e75260e9667225638e32cd1e4cf897cb7b7adb (patch)
treeafdd17ba5403d479fed7f5187b3179406db18f2a /src/libsystemd
parent23603bc67f86384a037b287f66b13db6482feafe (diff)
parentb5d39bb3cae7e36c284fcfcc87a42ff8a2bae7f5 (diff)
downloadsystemd-d8e75260e9667225638e32cd1e4cf897cb7b7adb.tar.gz
Merge pull request #27253 from yuwata/cmsg-find-and-copy-data
socket-util: introduce CMSG_FIND_AND_COPY_DATA()
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-daemon/sd-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c
index 8dc11aeb30..f2f295d6e4 100644
--- a/src/libsystemd/sd-daemon/sd-daemon.c
+++ b/src/libsystemd/sd-daemon/sd-daemon.c
@@ -567,7 +567,7 @@ _public_ int sd_pid_notify_with_fds(
cmsg->cmsg_type = SCM_CREDENTIALS;
cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred));
- ucred = (struct ucred*) CMSG_DATA(cmsg);
+ ucred = CMSG_TYPED_DATA(cmsg, struct ucred);
ucred->pid = pid != 0 ? pid : getpid_cached();
ucred->uid = getuid();
ucred->gid = getgid();