]> git.pld-linux.org Git - packages/heimdal.git/commitdiff
- use system libcom_err (patch from Debian)
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 7 Dec 2009 14:05:17 +0000 (14:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    heimdal-shared-libcom_err.patch -> 1.1

heimdal-shared-libcom_err.patch [new file with mode: 0644]

diff --git a/heimdal-shared-libcom_err.patch b/heimdal-shared-libcom_err.patch
new file mode 100644 (file)
index 0000000..51a43f1
--- /dev/null
@@ -0,0 +1,54 @@
+Index: heimdal-1.3.1.dfsg.1/cf/check-compile-et.m4
+===================================================================
+--- heimdal-1.3.1.dfsg.1.orig/cf/check-compile-et.m4   2009-12-01 11:08:56.987035686 +1100
++++ heimdal-1.3.1.dfsg.1/cf/check-compile-et.m4        2009-12-01 11:09:20.935033942 +1100
+@@ -67,7 +67,6 @@
+     const char *p;
+     p = error_message(0);
+     initialize_error_table_r(0,0,0,0);
+-    com_right_r(0, 0, 0, 0);
+   ]])],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"])
+   AC_MSG_RESULT(${krb_cv_com_err})
+   LIBS="${krb_cv_save_LIBS}"
+Index: heimdal-1.3.1.dfsg.1/lib/krb5/error_string.c
+===================================================================
+--- heimdal-1.3.1.dfsg.1.orig/lib/krb5/error_string.c  2009-12-01 11:09:25.759036334 +1100
++++ heimdal-1.3.1.dfsg.1/lib/krb5/error_string.c       2009-12-01 11:12:54.587035833 +1100
+@@ -217,29 +217,16 @@
+ const char * KRB5_LIB_FUNCTION
+ krb5_get_error_message(krb5_context context, krb5_error_code code)
+ {
++    const char *cstr;
+     char *str;
+-    HEIMDAL_MUTEX_lock(context->mutex);
+-    if (context->error_string &&
+-      (code == context->error_code || context->error_code == 0))
+-    {
+-      str = strdup(context->error_string);
+-      if (str) {
+-          HEIMDAL_MUTEX_unlock(context->mutex);
+-          return str;
+-      }
+-    }
+-    HEIMDAL_MUTEX_unlock(context->mutex);
+-
+-    if (code == 0)
+-      return strdup("Success");
+-    {
+-      const char *msg;
+-      char buf[128];
+-      msg = com_right_r(context->et_list, code, buf, sizeof(buf));
+-      if (msg)
+-          return strdup(msg);
+-    }
++    str = krb5_get_error_string(context);
++    if (str)
++      return str;
++
++    cstr = krb5_get_err_text(context, code);
++    if (cstr)
++      return strdup(cstr);
+     if (asprintf(&str, "<unknown error: %d>", (int)code) == -1)
+       return NULL;
This page took 0.05857 seconds and 4 git commands to generate.