diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-02-18 19:20:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-02-18 19:42:24 +0100 |
commit | 1c8da044469acabcfc479ba3276954da53210830 (patch) | |
tree | a9252d87c59570ebec4f3004526e6f52637bb917 /src/shared/util.h | |
parent | 6e646d22f6f9215de5ccb5e5edf450558c59fed1 (diff) |
shared: introduce cmsg_close_all() call
The call iterates through cmsg list and closes all fds passed via
SCM_RIGHTS.
This patch also ensures the call is used wherever appropriate, where we
might get spurious fds sent and we should better close them, then leave
them lying around.
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 45cb09443d..759d053c25 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -1080,3 +1080,5 @@ void sigkill_wait(pid_t *pid); #define _cleanup_sigkill_wait_ _cleanup_(sigkill_wait) int syslog_parse_priority(const char **p, int *priority, bool with_facility); + +void cmsg_close_all(struct msghdr *mh); |