summaryrefslogtreecommitdiffstats
path: root/server/providers/krb5/krb5_child.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-11-23 14:33:55 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-11-25 11:03:12 -0500
commitb67dbadc979cbe86545e2275223483d429b74747 (patch)
tree4a7f1173ed9dc3d8810294fff95a7fd535622053 /server/providers/krb5/krb5_child.c
parent5ffb0443ca36ed2be262a7a5dda514686dbd539f (diff)
downloadsssd_unused-b67dbadc979cbe86545e2275223483d429b74747.tar.gz
sssd_unused-b67dbadc979cbe86545e2275223483d429b74747.tar.xz
sssd_unused-b67dbadc979cbe86545e2275223483d429b74747.zip
Split helpers for child processes
Moves several functions out of providers/krb5 hierarchy into a separate module so it can be shared by the ldap child.
Diffstat (limited to 'server/providers/krb5/krb5_child.c')
-rw-r--r--server/providers/krb5/krb5_child.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/server/providers/krb5/krb5_child.c b/server/providers/krb5/krb5_child.c
index f7809d2c..c0e9fbf2 100644
--- a/server/providers/krb5/krb5_child.c
+++ b/server/providers/krb5/krb5_child.c
@@ -30,12 +30,11 @@
#include <security/pam_modules.h>
#include "util/util.h"
+#include "providers/child_common.h"
#include "providers/dp_backend.h"
#include "providers/krb5/krb5_auth.h"
#include "providers/krb5/krb5_utils.h"
-#define IN_BUF_SIZE 512
-
struct krb5_child_ctx {
/* opts taken from kinit */
/* in seconds */
@@ -99,12 +98,6 @@ static const char *__krb5_error_msg;
sss_krb5_free_error_message(krb5_error_ctx, __krb5_error_msg); \
} while(0);
-struct response {
- size_t max_size;
- size_t size;
- uint8_t *buf;
-};
-
static krb5_error_code create_ccache_file(struct krb5_req *kr, krb5_creds *creds)
{
krb5_error_code kerr;
@@ -618,22 +611,6 @@ static errno_t create_empty_ccache(int fd, struct krb5_req *kr)
return ret;
}
-uint8_t *copy_buffer_and_add_zero(TALLOC_CTX *mem_ctx, const uint8_t *src,
- size_t len)
-{
- uint8_t *str;
-
- str = talloc_size(mem_ctx, len + 1);
- if (str == NULL) {
- DEBUG(1, ("talloc_size failed.\n"));
- return NULL;
- }
- memcpy(str, src, len);
- str[len] = '\0';
-
- return str;
-}
-
static errno_t unpack_buffer(uint8_t *buf, size_t size, struct pam_data *pd,
char **ccname, char **keytab, uint32_t *validate)
{