diff options
| author | Chong Yidong | 2008-08-05 23:44:48 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-08-05 23:44:48 +0000 |
| commit | 5fe92a72fcd2b13ff6e40ced7afbb151a1a00ed8 (patch) | |
| tree | c213ded16d9027401fadd8fd130d9f16123467b3 /lib-src | |
| parent | 39b8bb9b73f53dcb2ba3498a1d01edb35a378f89 (diff) | |
| download | emacs-5fe92a72fcd2b13ff6e40ced7afbb151a1a00ed8.tar.gz emacs-5fe92a72fcd2b13ff6e40ced7afbb151a1a00ed8.zip | |
(socket_connection): Add conditionals for HAVE_KRB5_ERROR_TEXT and
HAVE_KRB5_ERROR_E_TEXT to support compilation with MIT Kerberos and
Heimdal, respectively.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/pop.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c index 76cd2fb5792..ffc7879b863 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -1254,11 +1254,12 @@ socket_connection (host, flags) | |||
| 1254 | krb5_free_principal (kcontext, server); | 1254 | krb5_free_principal (kcontext, server); |
| 1255 | if (rem) | 1255 | if (rem) |
| 1256 | { | 1256 | { |
| 1257 | strcpy (pop_error, KRB_ERROR); | ||
| 1258 | strncat (pop_error, error_message (rem), | ||
| 1259 | ERROR_MAX - sizeof (KRB_ERROR)); | ||
| 1260 | #if defined HAVE_KRB5_ERROR_TEXT | ||
| 1257 | if (err_ret && err_ret->text.length) | 1261 | if (err_ret && err_ret->text.length) |
| 1258 | { | 1262 | { |
| 1259 | strcpy (pop_error, KRB_ERROR); | ||
| 1260 | strncat (pop_error, error_message (rem), | ||
| 1261 | ERROR_MAX - sizeof (KRB_ERROR)); | ||
| 1262 | strncat (pop_error, " [server says '", | 1263 | strncat (pop_error, " [server says '", |
| 1263 | ERROR_MAX - strlen (pop_error) - 1); | 1264 | ERROR_MAX - strlen (pop_error) - 1); |
| 1264 | strncat (pop_error, err_ret->text.data, | 1265 | strncat (pop_error, err_ret->text.data, |
| @@ -1267,12 +1268,17 @@ socket_connection (host, flags) | |||
| 1267 | strncat (pop_error, "']", | 1268 | strncat (pop_error, "']", |
| 1268 | ERROR_MAX - strlen (pop_error) - 1); | 1269 | ERROR_MAX - strlen (pop_error) - 1); |
| 1269 | } | 1270 | } |
| 1270 | else | 1271 | #elif defined HAVE_KRB5_ERROR_E_TEXT |
| 1272 | if (err_ret && err_ret->e_text && strlen(*err_ret->e_text)) | ||
| 1271 | { | 1273 | { |
| 1272 | strcpy (pop_error, KRB_ERROR); | 1274 | strncat (pop_error, " [server says '", |
| 1273 | strncat (pop_error, error_message (rem), | 1275 | ERROR_MAX - strlen (pop_error) - 1); |
| 1274 | ERROR_MAX - sizeof (KRB_ERROR)); | 1276 | strncat (pop_error, *err_ret->e_text, |
| 1277 | ERROR_MAX - strlen (pop_error) - 1); | ||
| 1278 | strncat (pop_error, "']", | ||
| 1279 | ERROR_MAX - strlen (pop_error) - 1); | ||
| 1275 | } | 1280 | } |
| 1281 | #endif | ||
| 1276 | if (err_ret) | 1282 | if (err_ret) |
| 1277 | krb5_free_error (kcontext, err_ret); | 1283 | krb5_free_error (kcontext, err_ret); |
| 1278 | krb5_auth_con_free (kcontext, auth_context); | 1284 | krb5_auth_con_free (kcontext, auth_context); |