]> git.pld-linux.org Git - packages/zephyr.git/blob - zephyr-heimdal.patch
- parallel build is broken, rel 3
[packages/zephyr.git] / zephyr-heimdal.patch
1 --- zephyr-3.1.2/lib/ZMkAuth.c.orig     2013-10-28 05:21:44.000000000 +0100
2 +++ zephyr-3.1.2/lib/ZMkAuth.c  2021-03-05 21:41:58.211169636 +0100
3 @@ -126,10 +126,10 @@
4      keyblock = Z_credskey(creds);
5  
6      if (Z_keys_head &&
7 -       Z_keys_head->keyblock->enctype == keyblock->enctype &&
8 -       Z_keys_head->keyblock->length == keyblock->length &&
9 -       memcmp(Z_keys_head->keyblock->contents, keyblock->contents,
10 -              keyblock->length) == 0) {
11 +       Z_enctype(Z_keys_head->keyblock) == Z_enctype(keyblock) &&
12 +       Z_keylen(Z_keys_head->keyblock) == Z_keylen(keyblock) &&
13 +       memcmp(Z_keydata(Z_keys_head->keyblock), Z_keydata(keyblock),
14 +              Z_keylen(keyblock)) == 0) {
15         /*
16          * Optimization: if the key hasn't changed, replace the current entry,
17          * rather than make a new one.
18 --- zephyr-3.1.2/lib/ZDumpSession.c.orig        2013-10-28 05:21:44.000000000 +0100
19 +++ zephyr-3.1.2/lib/ZDumpSession.c     2021-03-05 22:11:03.011717241 +0100
20 @@ -42,7 +42,7 @@
21      for (key = Z_keys_head; key != NULL; key = key->next) {
22         num_keys++;
23         len += 4 + 4;  /* enctype, length */
24 -       len += key->keyblock->length;  /* contents */
25 +       len += Z_keylen(key->keyblock);  /* contents */
26      }
27  #endif
28  
29 @@ -56,10 +56,10 @@
30  #ifdef HAVE_KRB5
31      *((uint32_t *)ptr) = htonl(num_keys); ptr += 4;
32      for (key = Z_keys_tail; key != NULL; key = key->prev) {
33 -       *((uint32_t*) ptr) = htonl(key->keyblock->enctype); ptr += 4;
34 -       *((uint32_t*) ptr) = htonl(key->keyblock->length); ptr += 4;
35 -       memcpy(ptr, key->keyblock->contents, key->keyblock->length);
36 -       ptr += key->keyblock->length;
37 +       *((uint32_t*) ptr) = htonl(Z_enctype(key->keyblock)); ptr += 4;
38 +       *((uint32_t*) ptr) = htonl(Z_keylen(key->keyblock)); ptr += 4;
39 +       memcpy(ptr, Z_keydata(key->keyblock), Z_keylen(key->keyblock));
40 +       ptr += Z_keylen(key->keyblock);
41      }
42  #endif
43  
44 @@ -110,12 +110,12 @@
45             free(key);
46             return (EINVAL);
47         }
48 -       ret = krb5_init_keyblock(Z_krb5_ctx, enctype, keylength, &key->keyblock);
49 +       ret = Z_krb5_init_keyblock(Z_krb5_ctx, enctype, keylength, &key->keyblock);
50         if (ret) {
51             free(key);
52             return ret;
53         }
54 -       memcpy((char *)key->keyblock->contents, buffer, keylength);
55 +       memcpy((char *)Z_keydata(key->keyblock), buffer, keylength);
56         buffer += keylength; len -= keylength;
57         /* Just set recent times. It means we might not be able to
58            retire the keys, but that's fine. */
59 --- zephyr-3.1.2/lib/Zinternal.c.orig   2013-10-28 05:21:44.000000000 +0100
60 +++ zephyr-3.1.2/lib/Zinternal.c        2021-03-06 08:54:08.562681386 +0100
61 @@ -1420,3 +1420,30 @@
62  #endif
63  }
64  #endif
65 +
66 +#ifdef HAVE_KRB5
67 +krb5_error_code
68 +Z_krb5_init_keyblock(krb5_context context,
69 +       krb5_enctype type,
70 +       size_t size,
71 +       krb5_keyblock **key)
72 +{
73 +#ifdef HAVE_KRB5_CREDS_KEYBLOCK_ENCTYPE
74 +       return krb5_init_keyblock(context, type, size, key);
75 +#else
76 +       krb5_error_code ret;
77 +       krb5_keyblock *tmp, tmp_ss;
78 +       tmp = &tmp_ss;
79 +
80 +       *key = NULL;
81 +       Z_enctype(tmp) = type;
82 +       Z_keylen(tmp) = size;
83 +       Z_keydata(tmp) = malloc(size);
84 +       if (!Z_keydata(tmp))
85 +               return ENOMEM;
86 +       ret =  krb5_copy_keyblock(context, tmp, key);
87 +       free(Z_keydata(tmp));
88 +       return ret;
89 +#endif
90 +}
91 +#endif
92 --- zephyr-3.1.2/h/internal.h.orig      2013-10-28 05:21:44.000000000 +0100
93 +++ zephyr-3.1.2/h/internal.h   2021-03-06 08:52:45.043133850 +0100
94 @@ -205,4 +205,9 @@
95  #define Z_tktprinc(tkt)                ((tkt)->client)
96  #endif
97  
98 +#ifdef HAVE_KRB5
99 +krb5_error_code Z_krb5_init_keyblock(krb5_context, krb5_enctype, size_t,
100 +        krb5_keyblock **);
101 +#endif
102 +
103  #endif /* __INTERNAL_H__ */
104 --- zephyr-3.1.2/server/kstuff.c.orig   2013-10-28 05:21:44.000000000 +0100
105 +++ zephyr-3.1.2/server/kstuff.c        2021-03-06 08:55:24.682269010 +0100
106 @@ -701,33 +701,6 @@
107  
108      return checksum;
109  }
110 -#endif
111 -
112 -#ifdef HAVE_KRB5
113 -krb5_error_code
114 -Z_krb5_init_keyblock(krb5_context context,
115 -       krb5_enctype type,
116 -       size_t size,
117 -       krb5_keyblock **key)
118 -{
119 -#ifdef HAVE_KRB5_CREDS_KEYBLOCK_ENCTYPE
120 -       return krb5_init_keyblock(context, type, size, key);
121 -#else
122 -       krb5_error_code ret;
123 -       krb5_keyblock *tmp, tmp_ss;
124 -       tmp = &tmp_ss;
125 -
126 -       *key = NULL;
127 -       Z_enctype(tmp) = type;
128 -       Z_keylen(tmp) = size;
129 -       Z_keydata(tmp) = malloc(size);
130 -       if (!Z_keydata(tmp))
131 -               return ENOMEM;
132 -       ret =  krb5_copy_keyblock(context, tmp, key);
133 -       free(Z_keydata(tmp));
134 -       return ret;
135 -#endif
136 -}
137  
138  void
139  ZSetSession(krb5_keyblock *keyblock) {
140 --- zephyr-3.1.2/server/zserver.h.orig  2021-03-06 08:52:57.593065861 +0100
141 +++ zephyr-3.1.2/server/zserver.h       2021-03-06 08:53:00.516383357 +0100
142 @@ -37,8 +37,6 @@
143  extern krb5_keyblock *__Zephyr_keyblock;
144  #define ZGetSession() (__Zephyr_keyblock)
145  void ZSetSession(krb5_keyblock *keyblock);
146 -krb5_error_code Z_krb5_init_keyblock(krb5_context, krb5_enctype, size_t,
147 -        krb5_keyblock **);
148  #endif
149  
150  #ifdef HAVE_KRB4
This page took 0.150335 seconds and 3 git commands to generate.