X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Fauth_gss.c;h=6e82a26fdde78a4bad596dee12ad5f21f847df3a;hp=a2783f97f8e7174952f4e71d400f1893d535c266;hb=132d06d5920f9a496a8623acfbbabe9739618489;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/imap/auth_gss.c b/imap/auth_gss.c index a2783f9..6e82a26 100644 --- a/imap/auth_gss.c +++ b/imap/auth_gss.c @@ -9,14 +9,10 @@ /* GSS login/authentication code */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include #ifdef USE_GSS -#include - #include #ifdef HAVE_HEIMDAL @@ -44,7 +40,6 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA * idata, const char *method __attribute gss_buffer_t sec_token; gss_name_t target_name; gss_ctx_id_t context; - gss_OID mech_name; gss_qop_t quality; int cflags; OM_uint32 maj_stat, min_stat; @@ -178,7 +173,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA * idata, const char *method __attribute memcpy (buf1, &buf_size, 4); buf1[0] = GSS_AUTH_P_NONE; /* server decides if principal can log in as user */ - strncpy (buf1 + 4, idata->conn->account.user, sizeof (buf1) - 4); + m_strcpy(buf1 + 4, sizeof(buf1) - 4, idata->conn->account.user); request_buf.value = buf1; request_buf.length = 4 + m_strlen(idata->conn->account.user) + 1; maj_stat = gss_wrap (&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf,