~ubuntu-branches/ubuntu/hoary/heimdal/hoary-security

« back to all changes in this revision

Viewing changes to debian/patches-0.3e/014_cache

  • Committer: Bazaar Package Importer
  • Author(s): Brian May
  • Date: 2004-05-31 08:30:54 UTC
  • Revision ID: james.westby@ubuntu.com-20040531083054-vskpch8y0p1pv8lv
Tags: 0.6.2-3
* Use default realm configured by krb5-config for KDC (closes:
  #251725).
* Move push.8 man page from heimdal-servers to heimdal-clients
  (push binary is already in heimdal-clients).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- heimdal-0.3e/lib/krb5/cache.c.orig-heimdal  Tue Nov 14 18:41:58 2000
 
2
+++ heimdal-0.3e/lib/krb5/cache.c       Tue Nov 14 19:02:07 2000
 
3
@@ -89,11 +89,24 @@
 
4
 {
 
5
     krb5_error_code ret;
 
6
     krb5_ccache p;
 
7
+    krb5_cc_ops *q;
 
8
 
 
9
     p = malloc(sizeof(*p));
 
10
     if(p == NULL)
 
11
        return KRB5_CC_NOMEM;
 
12
-    p->ops = ops;
 
13
+
 
14
+    q = malloc(sizeof(*q));
 
15
+    if(q == NULL)
 
16
+        return KRB5_CC_NOMEM;
 
17
+    memcpy(q, ops, sizeof(*q));
 
18
+    q->prefix = strdup(ops->prefix);
 
19
+    if(q->prefix == NULL)
 
20
+    {
 
21
+        free(q);
 
22
+        return KRB5_CC_NOMEM;
 
23
+    }
 
24
+    
 
25
+    p->ops = q;
 
26
     *id = p;
 
27
     ret = p->ops->resolve(context, id, residual);
 
28
     if(ret)
 
29
@@ -141,11 +154,24 @@
 
30
                krb5_ccache *id)
 
31
 {
 
32
     krb5_ccache p;
 
33
+    krb5_cc_ops *q;
 
34
 
 
35
     p = malloc (sizeof(*p));
 
36
     if (p == NULL)
 
37
        return KRB5_CC_NOMEM;
 
38
-    p->ops = ops;
 
39
+
 
40
+    q = malloc(sizeof(*q));
 
41
+    if(q == NULL)
 
42
+        return KRB5_CC_NOMEM;
 
43
+    memcpy(q, ops, sizeof(*q));
 
44
+    q->prefix = strdup(ops->prefix);
 
45
+    if(q->prefix == NULL)
 
46
+    {
 
47
+        free(q);
 
48
+        return KRB5_CC_NOMEM;
 
49
+    }
 
50
+    
 
51
+    p->ops = q;
 
52
     *id = p;
 
53
     return p->ops->gen_new(context, id);
 
54
 }
 
55
@@ -248,6 +274,8 @@
 
56
 {
 
57
     krb5_error_code ret;
 
58
     ret = id->ops->close(context, id);
 
59
+    free(id->ops->prefix);
 
60
+    free((krb5_cc_ops *)id->ops);
 
61
     free(id);
 
62
     return ret;
 
63
 }