/* GSS login/authentication code */
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include <lib-lib/lib-lib.h>
#ifdef USE_GSS
-#include <lib-lib/macros.h>
-
#include <netinet/in.h>
#ifdef HAVE_HEIMDAL
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;
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,