diff --git a/src/charon/daemon.c b/src/charon/daemon.c index 95edd35cc..9e0b16aaa 100644 --- a/src/charon/daemon.c +++ b/src/charon/daemon.c @@ -50,6 +50,11 @@ extern int capset(cap_user_header_t hdrp, const cap_user_data_t datap); #endif /* NO_CAPSET_DEFINED */ +/* missing on older kernel headers */ +#ifndef CAP_AUDIT_WRITE +#define CAP_AUDIT_WRITE 29 +#endif /* CAP_AUDIT_WRITE */ + #ifdef INTEGRITY_TEST #include #include @@ -247,8 +252,10 @@ static void drop_capabilities(private_daemon_t *this, bool full) struct __user_cap_header_struct hdr; struct __user_cap_data_struct data; - /* CAP_NET_ADMIN is needed to use netlink */ - u_int32_t keep = (1<credentials->get_shared(charon->credentials, SHARED_EAP, - this->server, this->peer); + this->peer, this->server); if (shared == NULL) { DBG1(DBG_IKE, "no EAP key found for '%D' - '%D'", @@ -163,6 +171,8 @@ static status_t process_peer(private_eap_gtc_t *this, } key = shared->get_key(shared); len = key.len; + + /* TODO: According to the draft we should "SASLprep" password, RFC4013. */ res = alloca(sizeof(eap_gtc_header_t) + len); res->length = htons(sizeof(eap_gtc_header_t) + len); @@ -206,11 +216,8 @@ static status_t process_server(private_eap_gtc_t *this, service = lib->settings->get_str(lib->settings, "charon.plugins.eap_gtc.pam_service", GTC_PAM_SERVICE); - /* TODO: According to the draft we should "SASLprep" username and - * passwords... RFC4013 */ if (!authenticate(service, user, password)) { - DBG1(DBG_IKE, "EAP-GTC PAM authentication failed"); return FAILED; } return SUCCESS;