diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2009-11-30 14:55:19 +0100 |
---|---|---|
committer | Sumit Bose <sbose@redhat.com> | 2009-12-09 14:03:48 +0100 |
commit | 1ddb2703f0a44affebcfbbbc6194048251308ca3 (patch) | |
tree | ff130e8c9f3e00dd92e41c1e089b74e40f564a5f /server/providers/child_common.h | |
parent | 9b7b10940bb223f7923a8535a0f5aa2849a8aaa4 (diff) | |
download | sssd-1ddb2703f0a44affebcfbbbc6194048251308ca3.tar.gz sssd-1ddb2703f0a44affebcfbbbc6194048251308ca3.tar.xz sssd-1ddb2703f0a44affebcfbbbc6194048251308ca3.zip |
Reduce code duplication between LDAP child and Kerberos child
Fixes: #294
Diffstat (limited to 'server/providers/child_common.h')
-rw-r--r-- | server/providers/child_common.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/providers/child_common.h b/server/providers/child_common.h index 75cb3a6fc..894255b57 100644 --- a/server/providers/child_common.h +++ b/server/providers/child_common.h @@ -25,10 +25,13 @@ #ifndef __CHILD_COMMON_H__ #define __CHILD_COMMON_H__ +#include <errno.h> #include <sys/types.h> #include <sys/wait.h> #include <tevent.h> +#include "util/util.h" + #define IN_BUF_SIZE 512 #define MAX_CHILD_MSG_SIZE 255 @@ -38,6 +41,11 @@ struct response { uint8_t *buf; }; +struct io_buffer { + uint8_t *data; + size_t size; +}; + uint8_t *copy_buffer_and_add_zero(TALLOC_CTX *mem_ctx, const uint8_t *src, size_t len); @@ -57,4 +65,10 @@ void child_sig_handler(struct tevent_context *ev, struct tevent_signal *sige, int signum, int count, void *__siginfo, void *pvt); +errno_t exec_child(TALLOC_CTX *mem_ctx, + int *pipefd_to_child, int *pipefd_from_child, + const char *binary, int debug_fd); + +void child_cleanup(int readfd, int writefd); + #endif /* __CHILD_COMMON_H__ */ |