diff options
-rw-r--r-- | gssapi.c | 24 | ||||
-rw-r--r-- | idle.c | 2 | ||||
-rw-r--r-- | kerberos.c | 10 | ||||
-rw-r--r-- | rpa.c | 82 |
4 files changed, 59 insertions, 59 deletions
@@ -59,13 +59,13 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) maj_stat = gss_import_name(&min_stat, &request_buf, GSS_C_NT_HOSTBASED_SERVICE, &target_name); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, _("Couldn't get service name for [%s]\n"), buf1); + report(stderr, GT_("Couldn't get service name for [%s]\n"), buf1); return PS_AUTHFAIL; } else if (outlevel >= O_DEBUG) { maj_stat = gss_display_name(&min_stat, target_name, &request_buf, &mech_name); - report(stderr, _("Using service name [%s]\n"),request_buf.value); + report(stderr, GT_("Using service name [%s]\n"),request_buf.value); maj_stat = gss_release_buffer(&min_stat, &request_buf); } @@ -81,7 +81,7 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) sec_token = GSS_C_NO_BUFFER; context = GSS_C_NO_CONTEXT; if (outlevel >= O_VERBOSE) - report(stdout, _("Sending credentials\n")); + report(stdout, GT_("Sending credentials\n")); do { send_token.length = 0; send_token.value = NULL; @@ -99,7 +99,7 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) NULL, NULL); if (maj_stat!=GSS_S_COMPLETE && maj_stat!=GSS_S_CONTINUE_NEEDED) { - report(stderr, _("Error exchanging credentials\n")); + report(stderr, GT_("Error exchanging credentials\n")); gss_release_name(&min_stat, &target_name); /* wake up server and await NO response */ SockWrite(sock, "\r\n", 2); @@ -137,16 +137,16 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) maj_stat = gss_unwrap(&min_stat, context, &request_buf, &send_token, &cflags, &quality); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, _("Couldn't unwrap security level data\n")); + report(stderr, GT_("Couldn't unwrap security level data\n")); gss_release_buffer(&min_stat, &send_token); return PS_AUTHFAIL; } if (outlevel >= O_DEBUG) - report(stdout, _("Credential exchange complete\n")); + report(stdout, GT_("Credential exchange complete\n")); /* first octet is security levels supported. We want none, for now */ server_conf_flags = ((char *)send_token.value)[0]; if ( !(((char *)send_token.value)[0] & GSSAUTH_P_NONE) ) { - report(stderr, _("Server requires integrity and/or privacy\n")); + report(stderr, GT_("Server requires integrity and/or privacy\n")); gss_release_buffer(&min_stat, &send_token); return PS_AUTHFAIL; } @@ -155,11 +155,11 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) /* we don't care about buffer size if we don't wrap data */ gss_release_buffer(&min_stat, &send_token); if (outlevel >= O_DEBUG) { - report(stdout, _("Unwrapped security level flags: %s%s%s\n"), + report(stdout, GT_("Unwrapped security level flags: %s%s%s\n"), server_conf_flags & GSSAUTH_P_NONE ? "N" : "-", server_conf_flags & GSSAUTH_P_INTEGRITY ? "I" : "-", server_conf_flags & GSSAUTH_P_PRIVACY ? "C" : "-"); - report(stdout, _("Maximum GSS token size is %ld\n"),buf_size); + report(stdout, GT_("Maximum GSS token size is %ld\n"),buf_size); } /* now respond in kind (hack!!!) */ @@ -172,7 +172,7 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) maj_stat = gss_wrap(&min_stat, context, 0, GSS_C_QOP_DEFAULT, &request_buf, &cflags, &send_token); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, _("Error creating security level request\n")); + report(stderr, GT_("Error creating security level request\n")); return PS_AUTHFAIL; } to64frombits(buf1, send_token.value, send_token.length); @@ -183,10 +183,10 @@ int do_gssauth(int sock, char *command, char *hostname, char *username) /* flush security context */ if (outlevel >= O_DEBUG) - report(stdout, _("Releasing GSS credentials\n")); + report(stdout, GT_("Releasing GSS credentials\n")); maj_stat = gss_delete_sec_context(&min_stat, &context, &send_token); if (maj_stat != GSS_S_COMPLETE) { - report(stderr, _("Error releasing credentials\n")); + report(stderr, GT_("Error releasing credentials\n")); return PS_AUTHFAIL; } /* send_token may contain a notification to the server to flush @@ -54,7 +54,7 @@ void itimerthread(void* dummy) { if (outlevel >= O_VERBOSE) report(stderr, - _("fetchmail: thread sleeping for %d sec.\n"), poll_interval); + GT_("fetchmail: thread sleeping for %d sec.\n"), poll_interval); while(1) { _sleep2(poll_interval*1000); @@ -71,7 +71,7 @@ int do_rfc1731(int sock, char *command, char *truename) len = from64tobits(challenge1.cstr, buf1); if (len < 0) { - report(stderr, _("could not decode initial BASE64 challenge\n")); + report(stderr, GT_("could not decode initial BASE64 challenge\n")); return PS_AUTHFAIL; } @@ -136,7 +136,7 @@ int do_rfc1731(int sock, char *command, char *truename) */ if (strcmp(tktuser, user) != 0) { report(stderr, - _("principal %s in ticket does not match -u %s\n"), tktuser, + GT_("principal %s in ticket does not match -u %s\n"), tktuser, user); return PS_AUTHFAIL; } @@ -144,7 +144,7 @@ int do_rfc1731(int sock, char *command, char *truename) if (tktinst[0]) { report(stderr, - _("non-null instance (%s) might cause strange behavior\n"), + GT_("non-null instance (%s) might cause strange behavior\n"), tktinst); strcat(tktuser, "."); strcat(tktuser, tktinst); @@ -210,14 +210,14 @@ int do_rfc1731(int sock, char *command, char *truename) len = from64tobits(buf2, buf1); if (len < 0) { - report(stderr, _("could not decode BASE64 ready response\n")); + report(stderr, GT_("could not decode BASE64 ready response\n")); return PS_AUTHFAIL; } des_ecb_encrypt((des_cblock *)buf2, (des_cblock *)buf2, schedule, 0); memcpy(challenge2.cstr, buf2, 4); if (ntohl(challenge2.cint) != challenge1.cint + 1) { - report(stderr, _("challenge mismatch\n")); + report(stderr, GT_("challenge mismatch\n")); return PS_AUTHFAIL; } @@ -110,10 +110,10 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) unsigned char buf [POPBUFSIZE]; unsigned char *bufp; int status,aulin,kuslin; - char* stdec[4] = { N_("Success") , - N_("Restricted user (something wrong with account)") , - N_("Invalid userid or passphrase") , - N_("Deity error") }; + char* stdec[4] = { NGT_("Success") , + NGT_("Restricted user (something wrong with account)") , + NGT_("Invalid userid or passphrase") , + NGT_("Deity error") }; /* Initiate RPA authorisation */ @@ -166,7 +166,7 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) if ((rxlen = DecBase64(buf)) == 0) { if (outlevel > O_SILENT) - report(stderr, _("RPA token 2: Base64 decode error\n")); + report(stderr, GT_("RPA token 2: Base64 decode error\n")); return(PS_RPA); } bufp = buf; @@ -177,13 +177,13 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) verh = *(bufp++); verl = *(bufp++); if (outlevel >= O_DEBUG) - report(stdout, _("Service chose RPA version %d.%d\n"),verh,verl); + report(stdout, GT_("Service chose RPA version %d.%d\n"),verh,verl); Csl = *(bufp++); memcpy(Cs, bufp, Csl); bufp += Csl; if (outlevel >= O_DEBUG) { - report(stdout, _("Service challenge (l=%d):\n"),Csl); + report(stdout, GT_("Service challenge (l=%d):\n"),Csl); for (i=0; i<Csl; i++) report_build(stdout, "%02X ",Cs[i]); report_complete(stdout, "\n"); @@ -192,20 +192,20 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) Ts[Tsl] = 0; bufp += Tsl; if (outlevel >= O_DEBUG) - report(stdout, _("Service timestamp %s\n"),Ts); + report(stdout, GT_("Service timestamp %s\n"),Ts); rll = *(bufp++) << 8; rll = rll | *(bufp++); if ((bufp-buf+rll) != rxlen) { if (outlevel > O_SILENT) - report(stderr, _("RPA token 2 length error\n")); + report(stderr, GT_("RPA token 2 length error\n")); return(PS_RPA); } if (outlevel >= O_DEBUG) - report(stdout, _("Realm list: %s\n"),bufp); + report(stdout, GT_("Realm list: %s\n"),bufp); if (SetRealmService(bufp) != 0) { if (outlevel > O_SILENT) - report(stderr, _("RPA error in service@realm string\n")); + report(stderr, GT_("RPA error in service@realm string\n")); return(PS_RPA); } @@ -242,7 +242,7 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) if ((rxlen = DecBase64(buf)) == 0) { if (outlevel > O_SILENT) - report(stderr, _("RPA token 4: Base64 decode error\n")); + report(stderr, GT_("RPA token 4: Base64 decode error\n")); return(PS_RPA); } bufp = buf; @@ -253,7 +253,7 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) aulin = *(bufp++); if (outlevel >= O_DEBUG) { - report(stdout, _("User authentication (l=%d):\n"),aulin); + report(stdout, GT_("User authentication (l=%d):\n"),aulin); for (i=0; i<aulin; i++) report_build(stdout, "%02X ",bufp[i]); report_complete(stdout, "\n"); @@ -267,44 +267,44 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) { status = *(bufp++); if (outlevel >= O_DEBUG) - report(stdout, _("RPA status: %02X\n"),status); + report(stdout, GT_("RPA status: %02X\n"),status); } else status = 0; if ((bufp - buf) != rxlen) { if (outlevel > O_SILENT) - report(stderr, _("RPA token 4 length error\n")); + report(stderr, GT_("RPA token 4 length error\n")); return(PS_RPA); } if (status != 0) { if (outlevel > O_SILENT) if (status < 4) - report(stderr, _("RPA rejects you: %s\n"),_(stdec[status])); + report(stderr, GT_("RPA rejects you: %s\n"),GT_(stdec[status])); else - report(stderr, _("RPA rejects you, reason unknown\n")); + report(stderr, GT_("RPA rejects you, reason unknown\n")); return(PS_AUTHFAIL); } if (Aul != aulin) { report(stderr, - _("RPA User Authentication length error: %d\n"),aulin); + GT_("RPA User Authentication length error: %d\n"),aulin); return(PS_RPA); } if (Kusl != kuslin) { - report(stderr, _("RPA Session key length error: %d\n"),kuslin); + report(stderr, GT_("RPA Session key length error: %d\n"),kuslin); return(PS_RPA); } if (CheckUserAuth() != 0) { if (outlevel > O_SILENT) - report(stderr, _("RPA _service_ auth fail. Spoof server?\n")); + report(stderr, GT_("RPA _service_ auth fail. Spoof server?\n")); return(PS_AUTHFAIL); } if (outlevel >= O_DEBUG) { - report(stdout, _("Session key established:\n")); + report(stdout, GT_("Session key established:\n")); for (i=0; i<Kusl; i++) report_build(stdout, "%02X ",Kus[i]); report_complete(stdout, "\n"); @@ -335,7 +335,7 @@ int POP3_auth_rpa (unsigned char *userid, unsigned char *passphrase, int socket) } if (outlevel > O_SILENT) - report(stdout, _("RPA authorisation complete\n")); + report(stdout, GT_("RPA authorisation complete\n")); return(PS_SUCCESS); } @@ -364,7 +364,7 @@ int socket; int sockrc; if (outlevel >= O_DEBUG) - report(stdout, _("Get response\n")); + report(stdout, GT_("Get response\n")); #ifndef TESTMODE sockrc = gen_recv(socket, buf, sizeof(buf)); #else @@ -394,7 +394,7 @@ int socket; else ok = PS_SOCKET; if (outlevel >= O_DEBUG) - report(stdout, _("Get response return %d [%s]\n"), ok, buf); + report(stdout, GT_("Get response return %d [%s]\n"), ok, buf); buf[sockrc] = 0; return(ok); } @@ -457,7 +457,7 @@ int rxlen; if (**pptr != HDR) { if (outlevel > O_SILENT) - report(stderr, _("Hdr not 60\n")); + report(stderr, GT_("Hdr not 60\n")); return(0); } (*pptr)++; @@ -478,18 +478,18 @@ int rxlen; if (len==0) { if (outlevel>O_SILENT) - report(stderr, _("Token length error\n")); + report(stderr, GT_("Token length error\n")); } else if (((*pptr-save)+len) != rxlen) { if (outlevel>O_SILENT) - report(stderr, _("Token Length %d disagrees with rxlen %d\n"),len,rxlen); + report(stderr, GT_("Token Length %d disagrees with rxlen %d\n"),len,rxlen); len = 0; } else if (memcmp(*pptr,MECH,11)) { if (outlevel > O_SILENT) - report(stderr, _("Mechanism field incorrect\n")); + report(stderr, GT_("Mechanism field incorrect\n")); len = 0; } else (*pptr) += 11; /* Skip mechanism field */ @@ -526,7 +526,7 @@ unsigned char *bufp; else if ( ch=='+' ) new = 62; else if ( ch=='/' ) new = 63; else { - report(stderr, _("dec64 error at char %d: %x\n"), inp - bufp, ch); + report(stderr, GT_("dec64 error at char %d: %x\n"), inp - bufp, ch); return(0); } part=((part & 0x3F)*64) + new; @@ -541,7 +541,7 @@ unsigned char *bufp; } if (outlevel >= O_MONITOR) { - report(stdout, _("Inbound binary data:\n")); + report(stdout, GT_("Inbound binary data:\n")); for (i=0; i<cnt; i++) { report_build(stdout, "%02X ",bufp[i]); @@ -579,7 +579,7 @@ int len; if (outlevel >= O_MONITOR) { - report(stdout, _("Outbound data:\n")); + report(stdout, GT_("Outbound data:\n")); for (i=0; i<len; i++) { report_build(stdout, "%02X ",bufp[i]); @@ -645,12 +645,12 @@ int conv; if ( ((**pptr)!=delim) && ((**pptr)!=0) && ((*plen)==STRMAX) ) { if (outlevel > O_SILENT) - report(stderr, _("RPA String too long\n")); + report(stderr, GT_("RPA String too long\n")); *plen = 0; } if (outlevel >= O_DEBUG) { - report(stdout, _("Unicode:\n")); + report(stdout, GT_("Unicode:\n")); for (i=0; i<(*plen); i++) { report_build(stdout, "%02X ",buf[i]); @@ -712,11 +712,11 @@ int len; devrandom = fopen("/dev/urandom","rb"); if (devrandom == NULL && outlevel > O_SILENT) { - report(stdout, _("RPA Failed open of /dev/urandom. This shouldn't\n")); - report(stdout, _(" prevent you logging in, but means you\n")); - report(stdout, _(" cannot be sure you are talking to the\n")); - report(stdout, _(" service that you think you are (replay\n")); - report(stdout, _(" attacks by a dishonest service are possible.)\n")); + report(stdout, GT_("RPA Failed open of /dev/urandom. This shouldn't\n")); + report(stdout, GT_(" prevent you logging in, but means you\n")); + report(stdout, GT_(" cannot be sure you are talking to the\n")); + report(stdout, GT_(" service that you think you are (replay\n")); + report(stdout, GT_(" attacks by a dishonest service are possible.)\n")); } for(i=0; i<len; i++) @@ -727,7 +727,7 @@ int len; if (outlevel >= O_DEBUG) { - report(stdout, _("User challenge:\n")); + report(stdout, GT_("User challenge:\n")); for (i=0; i<len; i++) { report_build(stdout, "%02X ",buf[i]); @@ -885,7 +885,7 @@ unsigned char* out; if (outlevel >= O_DEBUG) { - report(stdout, _("MD5 being applied to data block:\n")); + report(stdout, GT_("MD5 being applied to data block:\n")); for (i=0; i<len; i++) { report_build(stdout, "%02X ",in[i]); @@ -898,7 +898,7 @@ unsigned char* out; MD5Final( out, &md5context ); if (outlevel >= O_DEBUG) { - report(stdout, _("MD5 result is: \n")); + report(stdout, GT_("MD5 result is: \n")); for (i=0; i<16; i++) { report_build(stdout, "%02X ",out[i]); |