X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Fauth_gss.c;h=09024c4b72cbc55d9f56dedaa1a6f9d8c29761e3;hb=492434e350e3ca2d3330c2589de3f9485929dab7;hp=37172d7eb801899ab2840175bfdad6aa9d860b5a;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281;p=apps%2Fmadmutt.git diff --git a/imap/auth_gss.c b/imap/auth_gss.c index 37172d7..09024c4 100644 --- a/imap/auth_gss.c +++ b/imap/auth_gss.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1999-2000 Brendan Cully - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ /* GSS login/authentication code */ @@ -66,7 +57,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA * idata, const char *method) /* get an IMAP service ticket for the server */ snprintf (buf1, sizeof (buf1), "imap@%s", idata->conn->account.host); request_buf.value = buf1; - request_buf.length = strlen (buf1) + 1; + request_buf.length = mutt_strlen (buf1) + 1; maj_stat = gss_import_name (&min_stat, &request_buf, gss_nt_service_name, &target_name); if (maj_stat != GSS_S_COMPLETE) { @@ -208,7 +199,7 @@ imap_auth_res_t imap_auth_gss (IMAP_DATA * idata, const char *method) /* server decides if principal can log in as user */ strncpy (buf1 + 4, idata->conn->account.user, sizeof (buf1) - 4); request_buf.value = buf1; - request_buf.length = 4 + strlen (idata->conn->account.user) + 1; + request_buf.length = 4 + mutt_strlen (idata->conn->account.user) + 1; maj_stat = gss_wrap (&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf, &cflags, &send_token); if (maj_stat != GSS_S_COMPLETE) {