View | Details | Raw Unified | Return to bug 15062
Collapse All | Expand All

(-)openldap-2.4.25.orig/debian/patches/smbk5pwd-makefile (-1 / +1 lines)
 Lines 10-16    Link Here 
10
 CC=gcc
10
 CC=gcc
11
 
11
 
12
 # Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
12
 # Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
13
 DEFS=-DDO_KRB5 -DDO_SAMBA
13
 DEFS=-DSUPPORT_K5KEY_SCHEME # -DDO_KRB5 -DDO_SAMBA
14
 
14
 
15
-HEIMDAL_INC=-I/usr/heimdal/include
15
-HEIMDAL_INC=-I/usr/heimdal/include
16
+HEIMDAL_INC=-I/usr/include
16
+HEIMDAL_INC=-I/usr/include
(-)openldap-2.4.25.orig/contrib/slapd-modules/smbk5pwd/Makefile (-1 / +1 lines)
 Lines 17-23    Link Here 
17
CC=gcc
17
CC=gcc
18
18
19
# Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
19
# Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
20
DEFS=-DDO_KRB5 -DDO_SAMBA
20
DEFS=-DSUPPORT_K5KEY_SCHEME # -DDO_KRB5 -DDO_SAMBA
21
21
22
HEIMDAL_INC=-I/usr/heimdal/include
22
HEIMDAL_INC=-I/usr/heimdal/include
23
SSL_INC=
23
SSL_INC=
(-)openldap-2.4.25.orig/contrib/slapd-modules/smbk5pwd/smbk5pwd.c (-8 / +17 lines)
 Lines 34-39    Link Here 
34
#include "config.h"
34
#include "config.h"
35
35
36
#ifdef DO_KRB5
36
#ifdef DO_KRB5
37
#define SUPPORT_K5KEY_SCHEME
38
#endif
39
40
#ifdef SUPPORT_K5KEY_SCHEME
37
#include <lber.h>
41
#include <lber.h>
38
#include <lber_pvt.h>
42
#include <lber_pvt.h>
39
#include <lutil.h>
43
#include <lutil.h>
 Lines 86-94    Link Here 
86
	unsigned	mode;
90
	unsigned	mode;
87
#define	SMBK5PWD_F_KRB5		(0x1U)
91
#define	SMBK5PWD_F_KRB5		(0x1U)
88
#define	SMBK5PWD_F_SAMBA	(0x2U)
92
#define	SMBK5PWD_F_SAMBA	(0x2U)
93
#define	SMBK5PWD_F_K5KEY	(0x4U)
89
94
90
#define SMBK5PWD_DO_KRB5(pi)	((pi)->mode & SMBK5PWD_F_KRB5)
95
#define SMBK5PWD_DO_KRB5(pi)	((pi)->mode & SMBK5PWD_F_KRB5)
91
#define SMBK5PWD_DO_SAMBA(pi)	((pi)->mode & SMBK5PWD_F_SAMBA)
96
#define SMBK5PWD_DO_SAMBA(pi)	((pi)->mode & SMBK5PWD_F_SAMBA)
97
#define SMBK5PWD_SUPPORT_K5KEY_SCHEME(pi)	((pi)->mode & SMBK5PWD_F_K5KEY)
92
98
93
#ifdef DO_KRB5
99
#ifdef DO_KRB5
94
	/* nothing yet */
100
	/* nothing yet */
 Lines 110-115    Link Here 
110
#ifdef DO_SAMBA
116
#ifdef DO_SAMBA
111
	| SMBK5PWD_F_SAMBA
117
	| SMBK5PWD_F_SAMBA
112
#endif
118
#endif
119
#ifdef SUPPORT_K5KEY_SCHEME
120
	| SMBK5PWD_F_K5KEY
121
#endif
113
;
122
;
114
123
115
static int smbk5pwd_modules_init( smbk5pwd_t *pi );
124
static int smbk5pwd_modules_init( smbk5pwd_t *pi );
 Lines 243-249    Link Here 
243
}
252
}
244
#endif /* DO_SAMBA */
253
#endif /* DO_SAMBA */
245
254
246
#ifdef DO_KRB5
255
#ifdef SUPPORT_K5KEY_SCHEME
247
256
248
static int smbk5pwd_op_cleanup(
257
static int smbk5pwd_op_cleanup(
249
	Operation *op,
258
	Operation *op,
 Lines 389-395    Link Here 
389
	ber_dupbv( hash, (struct berval *)&k5key_scheme );
398
	ber_dupbv( hash, (struct berval *)&k5key_scheme );
390
	return LUTIL_PASSWD_OK;
399
	return LUTIL_PASSWD_OK;
391
}
400
}
392
#endif /* DO_KRB5 */
401
#endif /* SUPPORT_K5KEY_SCHEME */
393
402
394
static int smbk5pwd_exop_passwd(
403
static int smbk5pwd_exop_passwd(
395
	Operation *op,
404
	Operation *op,
 Lines 889-895    Link Here 
889
		const char		*name;
898
		const char		*name;
890
		AttributeDescription	**adp;
899
		AttributeDescription	**adp;
891
	}
900
	}
892
#ifdef DO_KRB5
901
#ifdef SUPPORT_K5KEY_SCHEME
893
	krb5_ad[] = {
902
	krb5_ad[] = {
894
		{ "krb5Key",			&ad_krb5Key },
903
		{ "krb5Key",			&ad_krb5Key },
895
		{ "krb5KeyVersionNumber",	&ad_krb5KeyVersionNumber },
904
		{ "krb5KeyVersionNumber",	&ad_krb5KeyVersionNumber },
 Lines 897-903    Link Here 
897
		{ "krb5ValidEnd",		&ad_krb5ValidEnd },
906
		{ "krb5ValidEnd",		&ad_krb5ValidEnd },
898
		{ NULL }
907
		{ NULL }
899
	},
908
	},
900
#endif /* DO_KRB5 */
909
#endif /* SUPPORT_K5KEY_SCHEME */
901
#ifdef DO_SAMBA
910
#ifdef DO_SAMBA
902
	samba_ad[] = {
911
	samba_ad[] = {
903
		{ "sambaLMPassword",		&ad_sambaLMPassword },
912
		{ "sambaLMPassword",		&ad_sambaLMPassword },
 Lines 913-920    Link Here 
913
	/* this is to silence the unused var warning */
922
	/* this is to silence the unused var warning */
914
	dummy_ad.name = NULL;
923
	dummy_ad.name = NULL;
915
924
916
#ifdef DO_KRB5
925
#ifdef SUPPORT_K5KEY_SCHEME
917
	if ( SMBK5PWD_DO_KRB5( pi ) && oc_krb5KDCEntry == NULL ) {
926
	if ( (SMBK5PWD_SUPPORT_K5KEY_SCHEME( pi ) || SMBK5PWD_DO_KRB5( pi )) && oc_krb5KDCEntry == NULL ) {
918
		krb5_error_code	ret;
927
		krb5_error_code	ret;
919
		extern HDB 	*_kadm5_s_get_db(void *);
928
		extern HDB 	*_kadm5_s_get_db(void *);
920
929
 Lines 976-982    Link Here 
976
985
977
		db = _kadm5_s_get_db( kadm_context );
986
		db = _kadm5_s_get_db( kadm_context );
978
	}
987
	}
979
#endif /* DO_KRB5 */
988
#endif /* SUPPORT_K5KEY_SCHEME */
980
989
981
#ifdef DO_SAMBA
990
#ifdef DO_SAMBA
982
	if ( SMBK5PWD_DO_SAMBA( pi ) && oc_sambaSamAccount == NULL ) {
991
	if ( SMBK5PWD_DO_SAMBA( pi ) && oc_sambaSamAccount == NULL ) {
 Lines 1071-1077    Link Here 
1071
1080
1072
	smbk5pwd.on_bi.bi_extended = smbk5pwd_exop_passwd;
1081
	smbk5pwd.on_bi.bi_extended = smbk5pwd_exop_passwd;
1073
    
1082
    
1074
#ifdef DO_KRB5
1083
#ifdef SUPPORT_K5KEY_SCHEME
1075
	smbk5pwd.on_bi.bi_op_bind = smbk5pwd_op_bind;
1084
	smbk5pwd.on_bi.bi_op_bind = smbk5pwd_op_bind;
1076
1085
1077
	lutil_passwd_add( (struct berval *)&k5key_scheme, k5key_chk, k5key_hash );
1086
	lutil_passwd_add( (struct berval *)&k5key_scheme, k5key_chk, k5key_hash );

Return to bug 15062