1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00
freebsd-ports/security/cyrus-sasl/files/patch-plugins::kerberos4.c
Tilman Keskinoz aaeff08d60 * Fix some problems with building the Kerberos IV and 5 mechs.
* Made the port to optionally not build the mechs, define
WITHOUT_[ANONYMOUS,CRAM,DIGEST,LOGIN,OTP,GSSAPI,PLAIN].

* The Kerberos IV case is special, as we can use the base kerberos 4x
(<=5.0-RELEASE), or use the security/krb4 port.
    WITH_KERBEROS4 - use security/krb4 port
        if <=5.0-RELEASE, use krb4 port only if /usr/lib/libkrb.a
	doesn't exist
    WITHOUT_KERBEROS4 - disables using the base systems /usr/lib/libkrb.a
	(<=5.0), if it exists and MAKE_KERBEROS4 defined in /etc/make.conf

* Changed the combined rcNG/rcOG scripts, so that the defaults are at the top
of the rc.d script and not in an external file to the script.

PR:		51505
Submitted by:	maintainer
2003-05-09 12:41:21 +00:00

49 lines
1.1 KiB
C

--- plugins/kerberos4.c.orig Wed Feb 26 22:20:04 2003
+++ plugins/kerberos4.c Wed Feb 26 22:30:25 2003
@@ -711,14 +730,18 @@
#ifdef __FreeBSD__
des_pcbc_encrypt((const unsigned char *)in,
(unsigned char *)in,
+ clientinlen,
+ text->init_keysched,
+ &text->session,
+ DES_DECRYPT);
#else
des_pcbc_encrypt((des_cblock *)in,
(des_cblock *)in,
-#endif
clientinlen,
text->init_keysched,
&text->session,
DES_DECRYPT);
+#endif
testnum=(in[0]*256*256*256)+(in[1]*256*256)+(in[2]*256)+in[3];
@@ -1255,18 +1278,22 @@
len++;
}
sout[len]=0;
+
#ifdef __FreeBSD__
des_pcbc_encrypt((const unsigned char *)sout,
- (unsigned char *)sout,
+ (unsigned char *)sout,
+ len,
+ text->init_keysched,
+ (des_cblock *)text->session,
+ DES_ENCRYPT);
#else
-
des_pcbc_encrypt((des_cblock *)sout,
(des_cblock *)sout,
-#endif
len,
text->init_keysched,
(des_cblock *)text->session,
DES_ENCRYPT);
+#endif
*clientout = params->utils->malloc(len);
memcpy((char *) *clientout, sout, len);