aboutsummaryrefslogtreecommitdiffstats
path: root/doc/bitlbee.schema
blob: 3322e0578bd4ee25a5bb3708de844bf7dc473608 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
## LDAP Schema file for BitlBee
## Copyright (C) 2006 Jelmer Vernooij <jelmer@samba.org>
##
## We need the following object classes and related attributes:
##
## bitlBeeBuddy:
##  - nick
##  - handle

## each bitlBeeNick has zero or more bitlBeeAccount subentries
## and bitlBeeAccount entries contain zero or more bitlBeeBuddy entries

## The admin needs to setup the LDAP server to:
## - allow anonymous users to auth against bitlBeeNick objects on the 
##   password field
## - allow anonymous users to create new objects that start with nick=
## - allow read/write for a user that is authenticated only to his/her own 
##   object and subentries

##  - userid 
##  - userPassword
##  - setting (multiple values)
##  depends: top, account

attributetype ( 1.3.6.1.4.1.25873.2.1.1 NAME 'bitlBeeAutoConnect'
	DESC 'Autoconnect setting'
	EQUALITY booleanMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.25873.2.1.2 NAME 'bitlBeeAccountNo'
	DESC 'Account number'
	EQUALITY integerMatch
	SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )

objectclass ( 1.3.6.1.4.1.25873.2.2.3 NAME 'bitlBeeAccount' SUP account STRUCTURAL
	DESC 'BitlBee User Account '
	MUST ( userid, userPassword )
	MAY ( ) )

## bitlBeeAccount:
##  - accountNo 1.3.6.1.4.1.1466.115.121.1.27
##  - protocol (msn, oscar, jabber, yahoo, ...)
##  - username
##  - password
##  - server name
##  - autoconnect (true/false) 1.3.6.1.4.1.1466.115.121.1.7
##  depends: top

objectclass ( 1.3.6.1.4.1.25873.2.2.1 NAME 'bitlBeeIMAccount' SUP account STRUCTURAL
	DESC 'BitlBee IM Account '
	MUST ( bitlBeeAccountNo, userid, userPassword )
	MAY ( host, bitlBeeAutoconnect ) )

objectclass ( 1.3.6.1.4.1.25873.2.2.2 NAME 'bitlBeeSetting' SUP top STRUCTURAL
	DESC 'BitlBee Configuration Setting'
	MUST ( bitlBeeSettingName )
	MAY ( bitlBeeSettingValue ) )

objectclass ( 1.3.6.1.4.1.25873.2.2.3 NAME 'bitlBeeBuddy' SUP top STRUCTURAL
	DESC 'BitlBee Nick Mapping'
	MUST ( bitlBeeBuddyHandle )
	MAY ( ircNick ) )
p">[] = { "Wie dit leest is gek :-)", "ItllBeBitlBee", "One more boring password", "Hoi hoi", NULL }; static void check_codec(int l) { int i; for (i = 0; clear_tests[i]; i++) { tcase_fn_start(clear_tests[i], __FILE__, __LINE__); unsigned char *crypted; char *decrypted; int len; len = arc_encode(clear_tests[i], 0, &crypted, password, 12); len = arc_decode(crypted, len, &decrypted, password); fail_if(strcmp(clear_tests[i], decrypted) != 0, "%s didn't decrypt back properly", clear_tests[i]); g_free(crypted); g_free(decrypted); } } struct { unsigned char crypted[30]; int len; char *decrypted; } decrypt_tests[] = { /* One block with padding. */ { { 0x3f, 0x79, 0xb0, 0xf5, 0x91, 0x56, 0xd2, 0x1b, 0xd1, 0x4b, 0x67, 0xac, 0xb1, 0x31, 0xc9, 0xdb, 0xf9, 0xaa }, 18, "short pass" }, /* Two blocks with padding. */ { { 0xf9, 0xa6, 0xec, 0x5d, 0xc7, 0x06, 0xb8, 0x6b, 0x63, 0x9f, 0x2d, 0xb5, 0x7d, 0xaa, 0x32, 0xbb, 0xd8, 0x08, 0xfd, 0x81, 0x2e, 0xca, 0xb4, 0xd7, 0x2f, 0x36, 0x9c, 0xac, 0xa0, 0xbc }, 30, "longer password" }, /* This string is exactly two "blocks" long, to make sure unpadded strings also decrypt properly. */ { { 0x95, 0x4d, 0xcf, 0x4d, 0x5e, 0x6c, 0xcf, 0xef, 0xb9, 0x80, 0x00, 0xef, 0x25, 0xe9, 0x17, 0xf6, 0x29, 0x6a, 0x82, 0x79, 0x1c, 0xca, 0x68, 0xb5, 0x4e, 0xd0, 0xc1, 0x41, 0x8e, 0xe6 }, 30, "OSCAR is really creepy.." }, { "", 0, NULL } }; static void check_decod(int l) { int i; for (i = 0; decrypt_tests[i].len; i++) { tcase_fn_start(decrypt_tests[i].decrypted, __FILE__, __LINE__); char *decrypted; int len; len = arc_decode(decrypt_tests[i].crypted, decrypt_tests[i].len, &decrypted, password); fail_if(len == -1, "`%s' didn't decrypt properly", decrypt_tests[i].decrypted); fail_if(strcmp(decrypt_tests[i].decrypted, decrypted) != 0, "`%s' didn't decrypt properly", decrypt_tests[i].decrypted); g_free(decrypted); } } Suite *arc_suite(void) { Suite *s = suite_create("ArcFour"); TCase *tc_core = tcase_create("Core"); suite_add_tcase(s, tc_core); tcase_add_test(tc_core, check_codec); tcase_add_test(tc_core, check_decod); return s; }