Compare commits

..

1982 Commits

Author SHA1 Message Date
B. Petersen e5434f3b2c update playstore logo 2019-12-17 20:35:21 +01:00
cyBerta 8588732dda Merge pull request #1166 from deltachat/adaptive-icon
add adaptive icon
2019-12-17 17:43:24 +01:00
B. Petersen 6fc040317d adapt gplay icon 2019-12-17 17:29:28 +01:00
B. Petersen 74338a2700 add adaptive icon 2019-12-17 17:24:49 +01:00
björn petersen 7d6bf861a1 Merge pull request #1164 from deltachat/changelog-1.0
update changelog
2019-12-17 13:33:44 +01:00
B. Petersen 89a25bdc48 reorder 2019-12-17 12:21:30 +01:00
B. Petersen 919fd8a4f1 be more specific about rust 2019-12-17 12:01:35 +01:00
B. Petersen 4a72fa777a update contributor list 2019-12-17 11:55:40 +01:00
B. Petersen 3baa2b4d25 update changelog 2019-12-17 11:47:35 +01:00
B. Petersen 86f2a95884 bump version to 1.0.0 2019-12-17 11:23:46 +01:00
B. Petersen b724a54710 update deltachat-core-rust submodule 2019-12-17 00:22:16 +01:00
B. Petersen f94a569e9a bump version 2019-12-16 15:55:46 +01:00
B. Petersen 9f805e679f update translations 2019-12-16 15:07:18 +01:00
B. Petersen f5ecae3a3c update deltachat-core-rust submodule 2019-12-16 15:03:42 +01:00
cyBerta 3b8ad268d0 Merge pull request #1162 from deltachat/doze-device-message
move doze reminder to device-chat
2019-12-16 14:34:29 +01:00
B. Petersen 2434daa173 add a try/catch block around the reminder-stuff. there is the PowerManager envolved that may create all kind of problems. so i like to be sure-careful here, also as the code is run frequently and may cause problems only on very few devices. 2019-12-16 14:30:14 +01:00
B. Petersen 4226d23f2d move doze reminder to device-chat 2019-12-16 14:02:52 +01:00
B. Petersen 5713fce830 bump version 2019-12-15 23:44:23 +01:00
B. Petersen f4815bb19f update deltachat-core-rust submodule 2019-12-15 23:34:53 +01:00
B. Petersen f8b40c919f bump version 2019-12-14 01:46:13 +01:00
björn petersen 9fe1107512 Merge pull request #1159 from deltachat/set-avatar-file-extension
fix avatar extension
2019-12-14 01:26:42 +01:00
B. Petersen 91a318fa50 set file extension for selfavatar 2019-12-14 01:19:16 +01:00
B. Petersen f4c97ec6f5 cleanup avatar code 2019-12-14 01:14:20 +01:00
B. Petersen 183efe6493 update deltachat-core-rust submodule 2019-12-14 00:32:08 +01:00
björn petersen ac11fe965d Merge pull request #1157 from deltachat/remove-no-profile-hint
remove hint that user-avatars are not implemented
2019-12-13 14:58:06 +01:00
B. Petersen 64e5c6d48c remove hint that user-avatars are not implemented 2019-12-12 02:00:50 +01:00
B. Petersen a5beea8607 bump version 2019-12-10 21:55:40 +01:00
B. Petersen a47669f185 update deltachat-core-rust submodule 2019-12-10 21:44:20 +01:00
B. Petersen 83c5ddbcf7 update deltachat-core-rust submodule 2019-12-10 17:00:23 +01:00
B. Petersen 5525a0749b update deltachat-core-rust submodule 2019-12-10 14:50:55 +01:00
B. Petersen f770e9e87e bump version 2019-12-10 14:50:32 +01:00
B. Petersen 89f984ef21 update translations 2019-12-10 14:22:39 +01:00
B. Petersen 9aae9183c2 update deltachat-core-rust submodule 2019-12-10 14:19:53 +01:00
B. Petersen 24967d7acc update deltachat-core-rust submodule 2019-12-10 14:09:40 +01:00
B. Petersen 536f1c1496 update deltachat-core-rust submodule 2019-12-09 14:57:26 +01:00
björn petersen 36dac2f490 Merge pull request #1149 from deltachat/release-checklist-2
Release Checklist: don't push the stable link anymore; linking git crypt guide
2019-12-06 11:51:21 +01:00
missytake ee1405ce87 don't push the stable link anymore; linking git crypt guide 2019-12-06 11:01:41 +01:00
B. Petersen a569694b4d bump version 2019-12-06 01:33:29 +01:00
B. Petersen 4dbc50696d update translations 2019-12-06 01:32:00 +01:00
björn petersen 58f53b30eb Merge pull request #1146 from deltachat/release-checklist
Release Checklist: fix upload to dl.delta.chat
2019-12-06 01:29:19 +01:00
B. Petersen 0c6f163ce9 update deltachat-core-rust submodule 2019-12-06 01:25:31 +01:00
B. Petersen 6711c028f8 update translations 2019-12-05 22:21:17 +01:00
björn petersen f96f1a43a3 Merge pull request #1147 from deltachat/tweak-welcome-activity
tweak welcoming screen
2019-12-05 22:05:51 +01:00
B. Petersen 3549c5591d remove pager with weird descriptions, tweak welcome layout 2019-12-05 01:04:21 +01:00
missytake 53e55ececc no version number needed, use wildcard instead. assumes that the wildcard only fits one file... 2019-12-05 00:08:33 +01:00
missytake ddf25ab3d7 Release Checklist: fix upload to dl.delta.chat 2019-12-04 23:58:51 +01:00
B. Petersen a5b0a322a5 update translations 2019-12-04 21:48:03 +01:00
B. Petersen 948c4e7cd9 add another short-worded name for some menu entries, update translations 2019-12-04 15:14:26 +01:00
B. Petersen de299790e8 add short-worded names for some menu entries 2019-12-04 13:40:52 +01:00
B. Petersen 30e4464e36 fix locale key 2019-12-04 12:19:39 +01:00
B. Petersen 8199ff51ba bump version 2019-12-04 11:32:54 +01:00
B. Petersen b5aceae8cf update translations 2019-12-04 10:34:09 +01:00
björn petersen 46b1b64a96 Merge pull request #1142 from deltachat/remove-wallpaper-permission
remove unused SET_WALLPAPER permission
2019-12-04 10:27:00 +01:00
björn petersen 9dc2d8552d Merge pull request #1143 from deltachat/fix-forward
remove unneeded flag
2019-12-04 10:26:46 +01:00
björn petersen 8fc75efb12 Merge pull request #1144 from deltachat/locale-stuff
adapt locale things
2019-12-04 10:26:31 +01:00
B. Petersen d2ff6b8a03 update deltachat-core-rust submodule 2019-12-04 10:15:56 +01:00
B. Petersen d903954689 make device messages translatable, adapt empty-chat-hints 2019-12-04 00:13:53 +01:00
B. Petersen d3d313b087 when a query is given to getChatlist(), DC_GCL_NO_SPECIALS is not needed 2019-12-03 22:47:34 +01:00
B. Petersen bd12f07319 update deltachat-core-rust submodule 2019-12-03 17:10:51 +01:00
B. Petersen c045d524e4 add galego translation 2019-12-03 17:04:22 +01:00
B. Petersen 52ae2fbd20 fix translation key 2019-12-03 17:01:26 +01:00
B. Petersen 17ad11c162 update translations 2019-12-03 16:51:23 +01:00
B. Petersen 786c6cd46f remove unused SET_WALLPAPER permission 2019-12-03 16:21:25 +01:00
björn petersen 9f832b4af3 Merge pull request #1121 from deltachat/add-device-msgs
add device msgs
2019-12-03 11:39:44 +01:00
B. Petersen 4e23597d05 adapt new number of initial chats 2019-12-03 11:39:10 +01:00
B. Petersen 7d4e45bc9b do not show device-message system-notification 2019-12-03 11:39:10 +01:00
B. Petersen a054acd3c9 check device-messages after configure and on each chatlist-opening 2019-12-03 11:39:10 +01:00
B. Petersen ab30d47398 update deltachat-core-rust submodule 2019-12-03 11:31:48 +01:00
cyBerta b693078566 Merge pull request #1139 from deltachat/provider-info-api
add provider-info api
2019-12-02 12:56:25 +01:00
B. Petersen 27546ef72c update deltachat-core-rust submodule 2019-12-01 12:17:54 +01:00
B. Petersen 1b9e2c4da3 add provider-info api 2019-11-30 20:42:19 +01:00
B. Petersen a60b0e413a update deltachat-core-rust submodule 2019-11-29 15:12:33 +01:00
björn petersen 97b564e158 Merge pull request #1138 from deltachat/delta_login
implement openpgp4fpr url scheme handling
2019-11-29 15:09:14 +01:00
cyberta a01fc96547 implement openpgp4fpr url scheme handling 2019-11-28 21:06:10 +01:00
B. Petersen 5a7d24b394 fix language keys not to use minus-characters 2019-11-28 14:06:50 +01:00
björn petersen 948f016eb2 Merge pull request #1125 from OzancanKaratas/master
Language updates
2019-11-28 13:51:40 +01:00
B. Petersen b3e456f499 add arabic to language selector 2019-11-28 13:41:35 +01:00
björn petersen c209726584 Merge pull request #1135 from BoFFire/i18n
Adding arabic translation
2019-11-28 13:18:20 +01:00
ButterflyOfFire 24c276e908 Adding arabic translation 2019-11-28 10:42:51 +01:00
ButterflyOfFire 1d795a2573 Initial creation of arabic translation
Initial creation of arabic translation
2019-11-28 10:41:46 +01:00
cyberta 6560b1332f rename Profile photo to Profile picture 2019-11-27 16:27:13 +03:00
Ozancan Karataş e7e8950302 Revert some strings 2019-11-27 16:26:25 +03:00
cyberta 7117303e6f replace string reference dc_app_name by app_name 2019-11-27 05:38:14 +03:00
Ozancan Karataş 1f934f2ae4 Fix potential iOS localization error removing translatable=false flag 2019-11-27 05:31:39 +03:00
Ozancan Karataş fb7d80f2a6 Delete dc_app_name, use app_name 2019-11-27 01:53:24 +03:00
Ozancan Karataş a20090ee38 enter the following digits 2019-11-27 01:49:12 +03:00
B. Petersen 2851326821 update deltachat-core-rust submodule 2019-11-26 23:13:22 +01:00
Ozancan Karataş f14963409a Use correct string simular with Android 2019-11-26 20:24:35 +03:00
Ozancan Karataş 931f18e5f1 Delete contact "contact_name"? 2019-11-26 19:44:54 +03:00
cyBerta 89c703528d Merge pull request #1131 from deltachat/lefherz-patch-1
Upload apk to download.delta.chat
2019-11-26 17:29:59 +01:00
cyBerta 57d6747c6f Merge pull request #1129 from deltachat/fix-64bit-qr-scan
fix qr-code scanning on 64bit andoird
2019-11-26 17:27:48 +01:00
Emil Lefherz bb19003f5a Upload apk to download.delta.chat 2019-11-26 15:33:07 +01:00
B. Petersen 99b4c1fbe0 update translations 2019-11-26 15:24:04 +01:00
björn petersen 5df7735bc1 Merge pull request #1127 from BoFFire/i18n
Updating french translation.
2019-11-26 15:11:06 +01:00
B. Petersen 4e50beed09 return cptr as 64bit (long) instead of 32bit (int), make checkQrCPtr private 2019-11-25 23:22:31 +01:00
ButterflyOfFire 21ed53a47c Fixing update french transkation
Updating french translation.
2019-11-25 17:48:58 +01:00
ButterflyOfFire 57746931c9 Updating french translation
Updating french translation
2019-11-25 17:44:27 +01:00
B. Petersen 69c9771e16 bump version 2019-11-24 20:07:17 +01:00
B. Petersen 931b68a2b7 update translations 2019-11-24 19:59:15 +01:00
B. Petersen 95ef79fc62 update deltachat-core-rust submodule 2019-11-24 19:29:10 +01:00
B. Petersen 7efff754ce update deltachat-core-rust submodule 2019-11-24 16:28:55 +01:00
Ozancan Karataş 30e1518c8e String compatibility 2019-11-23 17:57:01 +03:00
B. Petersen 938a62de38 update deltachat-core-rust submodule 2019-11-23 11:27:21 +01:00
Ozancan Karataş c81a7d8583 Use “enable” instead of “on” 2019-11-22 17:17:08 +03:00
Ozancan Karataş 76137501b8 Undone some old strings 2019-11-22 17:02:49 +03:00
Ozancan Karataş 5feadcc1cf Remove corresponding, use “setup code” 2019-11-22 16:19:25 +03:00
Ozancan Karataş 1522e0a3d5 Add InfoPlist.strings translations 2019-11-22 16:10:52 +03:00
Ozancan Karataş 2f53a920b9 Don't include quote if not a locator 2019-11-22 16:04:30 +03:00
Ozancan Karataş eee2503a54 Reuse some old strings, fix some typos 2019-11-22 02:37:38 +03:00
Ozancan Karataş 050773f569 Set up the untranslatable strings 2019-11-21 17:11:46 +03:00
Allan Nordhøy e2d5bbfe02 Report an _I_ssue… 2019-11-21 16:39:16 +03:00
Allan Nordhøy 64bab6d65e can't, that it, , 2019-11-21 16:39:16 +03:00
Allan Nordhøy 25d11cd9e7 __Turn off_ Delta Chat\'s built-in emoji support 2019-11-21 16:39:16 +03:00
Allan Nordhøy 1689aa6776 typed _on_ the other device 2019-11-21 16:39:16 +03:00
Allan Nordhøy 558cc8e757 Language reworked 2019-11-21 16:39:16 +03:00
björn petersen 5bc077ea5c Merge pull request #1123 from deltachat/adapt-to-new-api
adapt to new api
2019-11-20 00:10:50 +01:00
B. Petersen 6487443ab8 adapt to new api 2019-11-20 00:10:09 +01:00
B. Petersen f6a5cb2487 update deltachat-core-rust submodule 2019-11-19 23:30:22 +01:00
cyBerta 8fe65a32d4 Merge pull request #1120 from deltachat/tweak-welcome
simplify routing to welcome-activity
2019-11-19 09:43:57 +01:00
B. Petersen a88ef140df prefer overall-overview over micro-simplicitly when routing through intents 2019-11-18 00:20:44 +01:00
B. Petersen 4d61d8419a update deltachat-core-rust submodule 2019-11-17 22:20:21 +01:00
B. Petersen 91a4fe6460 update translations 2019-11-15 22:22:57 +01:00
cyBerta 0a0ff7e3eb Merge pull request #1115 from deltachat/fix-ring
adapt to ndk r20b
2019-11-15 17:22:30 +01:00
B. Petersen 546a5dfbb3 support sdk20-18 (android4.4-4.3, kitkat and partly jelly bean) 2019-11-14 20:52:36 +01:00
B. Petersen ce2b7287d9 fix wrapper compiler warning 2019-11-14 20:48:23 +01:00
B. Petersen 638a8e5205 adapt to ndk r20b 2019-11-14 20:47:26 +01:00
B. Petersen dfe17dc336 update readme 2019-11-14 12:50:14 +01:00
B. Petersen 1f8361d7b9 update deltachat-core-rust submodule 2019-11-13 11:57:14 +01:00
björn petersen ef460e800b Merge pull request #1113 from deltachat/fix_map_after_androidx_migration
fix map
2019-11-11 16:08:43 +01:00
cyberta a7889a0287 allow addition of group members' location that haven't sent their location yet while watching the map view 2019-11-11 15:29:57 +01:00
cyberta 6b4f90c52f adapt package for BottomSheetBehavior 2019-11-11 13:06:05 +01:00
cyBerta 4eec0331ca Merge pull request #1108 from deltachat/streamline-notifications
streamline background notifications
2019-11-11 12:33:19 +01:00
B. Petersen 5bd218e304 update deltachat-core-rust submodule 2019-11-10 23:10:18 +01:00
B. Petersen cca1abe070 update translations 2019-11-10 22:22:16 +01:00
björn petersen e3f3844e3f Merge pull request #1110 from OzancanKaratas/master
Android localizable string editions
2019-11-10 22:19:04 +01:00
Ozancan Karataş 5a6d5dfbe4 Quote 2-Step Verification 2019-11-11 00:16:36 +03:00
Ozancan Karataş 317ce0c4b1 Quoted Less secure apps 2019-11-11 00:00:15 +03:00
Ozancan Karataş 8d32c47eb0 Use lower case 2019-11-10 23:21:52 +03:00
Ozancan Karataş 2fc092d0e4 Fix typos, use correct writing rules, use Android interface texts 2019-11-10 17:22:53 +03:00
Ozancan Karataş a118e2342e Update service names by getting from Google 2019-11-10 16:55:21 +03:00
Ozancan Karataş 8c2f6a3333 Compatibility for other lowercased strings 2019-11-10 16:43:01 +03:00
B. Petersen 83d7cdaa1e remove probably unneeded afterForegroundWakeLock() - jobs/fetch have their own wakelocks 2019-11-09 17:10:02 +01:00
B. Petersen d3af3f437b wait for threads being executed once 2019-11-09 17:10:02 +01:00
B. Petersen b16a1b6daa threads should already be running on NetworkStateReceiver.onReceive() 2019-11-09 17:10:02 +01:00
B. Petersen 4b8cec18c0 prototype FetchWork class and use WorkManager 2019-11-09 17:10:02 +01:00
B. Petersen bbad6ee584 remove TimerReceiver 2019-11-08 19:38:28 +01:00
B. Petersen ee65fd1192 remove unused PersistentAlarmManagerListener 2019-11-08 19:38:28 +01:00
B. Petersen 4fb30fa241 update deltachat-core-rust submodule 2019-11-08 19:38:09 +01:00
björn petersen 859fb5c734 Merge pull request #1109 from deltachat/androidx
upgrade to androidx support libraries
2019-11-08 01:30:35 +01:00
B. Petersen 22166fc784 adapt hack #1077 (removes the padding from the settings screens) to androidx 2019-11-08 01:29:06 +01:00
B. Petersen fb235b7639 upgrade to androidx support libraries 2019-11-08 01:22:28 +01:00
björn petersen 12a138e85c Merge pull request #1107 from deltachat/clippy2
adapt to device-messages api
2019-11-06 15:10:06 +01:00
B. Petersen 856d1e285b update deltachat-core-rust submodule 2019-11-06 14:48:58 +01:00
B. Petersen 7571aac0cc adapt to device-messages api 2019-11-06 00:19:11 +01:00
B. Petersen 8b5a2255ee bump version 2019-11-05 17:17:27 +01:00
B. Petersen 8269149030 update translations 2019-11-05 17:09:23 +01:00
B. Petersen 3e0b8815db update deltachat-core-rust submodule 2019-11-05 17:06:22 +01:00
B. Petersen 1621524d70 layout 2019-11-01 14:24:49 +01:00
cyBerta ea29d93a06 Merge pull request #1100 from deltachat/cleanup-strings
do not pass unused string to core and avoid a warning in the log
2019-11-01 12:13:47 +01:00
B. Petersen e4ea08d3ba do not pass unused string to core and avoid a warning in the log 2019-11-01 11:29:44 +01:00
B. Petersen 5005aa8149 update translations 2019-11-01 10:18:10 +01:00
björn petersen 4677d8849d Merge pull request #1096 from deltachat/hostname_certificate_validation
Hostname / certificate validation
2019-11-01 01:19:49 +01:00
B. Petersen da8c3c50f8 wording 2019-11-01 01:19:25 +01:00
cyberta 5c22c2f8db use camelCase for java variables 2019-11-01 01:09:08 +01:00
cyberta eb26c5c275 fix deprecation warning in RegistrationActivity 2019-11-01 01:09:08 +01:00
cyberta c7e7d00512 implement certificate check settings for imap/smtp (#1047) 2019-11-01 01:09:08 +01:00
B. Petersen 8a6b9e7f62 update deltachat-core-rust submodule 2019-10-31 12:52:40 +01:00
B. Petersen 52c8daa9e1 bump version 2019-10-31 10:54:50 +01:00
B. Petersen 31532f86c1 update deltachat-core-rust submodule 2019-10-31 10:39:13 +01:00
B. Petersen 8729357c23 bump version 2019-10-30 16:50:17 +01:00
B. Petersen fc6a19e0a7 echo starting/ending time in ndk-make.sh 2019-10-30 16:46:05 +01:00
B. Petersen c398c0d175 update deltachat-core-rust submodule 2019-10-30 16:17:35 +01:00
B. Petersen 0989240c89 update deltachat-core-rust submodule 2019-10-30 16:04:02 +01:00
B. Petersen 790ea4ecf2 typo 2019-10-30 12:23:40 +01:00
B. Petersen 935a794987 bump version, changelog 2019-10-30 12:13:32 +01:00
B. Petersen dbac064965 re-enable empty-server controls 2019-10-30 11:22:39 +01:00
B. Petersen 56a84d8b22 add a tool to cleanup core 2019-10-30 10:44:43 +01:00
B. Petersen 3908e197c9 update deltachat-core-rust submodule 2019-10-30 00:46:01 +01:00
B. Petersen d137c52de0 update translations 2019-10-29 21:12:47 +01:00
björn petersen 7dbde03db9 Merge pull request #1090 from deltachat/fix_playback_64bit
update audio playing capabilitys to signals current state
2019-10-29 19:38:27 +01:00
björn petersen 5db6808a82 Merge pull request #1095 from deltachat/fix_hard_coded_string
fix hardcoded string in welcome screen
2019-10-29 17:19:48 +01:00
cyberta 082418b597 fix hardcoded string in welcome screen 2019-10-29 16:51:03 +01:00
cyBerta d84ca194fe Merge pull request #1092 from deltachat/use-translations
use translations for 'automatic' and 'off'
2019-10-29 12:31:47 +01:00
cyberta 3cf61bc6af remove proximitiy listener for audio slides for now 2019-10-29 12:13:00 +01:00
B. Petersen d02ae3dca8 use translations for 'automatic' and 'off' 2019-10-29 11:31:37 +01:00
björn petersen 601f255f05 Merge pull request #1091 from link2xt/certck_strings
Add strings for certificate checks configuration
2019-10-29 11:21:30 +01:00
Alexander Krotov c789aa02c4 Add strings for certificate checks configuration 2019-10-29 04:14:55 +03:00
cyberta 709a0c8e56 update audio playing capabilitys to signals current state (based on 80deb301e54c766acd3bfc7edbec400b03a44c4d). Fixes #1088 2019-10-29 01:34:30 +01:00
cyBerta 1fdc721276 Merge pull request #1077 from deltachat/remove-settings-padding
apply a hack that removes the padding from the settings screens
2019-10-23 14:14:49 +02:00
björn petersen 4442fc67a5 Merge pull request #1081 from deltachat/fix-warnings
fix warnings
2019-10-23 10:49:10 +02:00
B. Petersen dd806f1c0c prefetch-loop-arrays does not work with -Os and is not worth thinking about for the wrapper 2019-10-23 03:45:50 +02:00
B. Petersen 84d0f38364 target bad pointer type warnings 2019-10-23 03:39:26 +02:00
B. Petersen a3fd0e6880 target const-warnings 2019-10-23 03:38:50 +02:00
B. Petersen 967dcc946a disable int<->pointer conversion warnings (were disabled implicitly before pr #1080) 2019-10-23 03:37:07 +02:00
björn petersen 9690eba7af Merge pull request #1080 from link2xt/gcc-warnings
jni/Android.mk: enable compiler warnings
2019-10-23 03:13:09 +02:00
B. Petersen 6c1d7473a2 bump version 2019-10-23 02:42:31 +02:00
Alexander Krotov 46df20b8f7 jni/Android.mk: enable compiler warnings 2019-10-23 03:42:15 +03:00
björn petersen ebdd17405b Merge pull request #1079 from deltachat/add-missing-includes
add missing includes to jni
2019-10-23 02:40:59 +02:00
B. Petersen 2feedb9444 add missing includes to jni, without them, args default to int which fails on 64bit. for whatever reason, the android compiler does not throw a warning. 2019-10-23 02:28:02 +02:00
B. Petersen f607e18ce3 apply a hack that removes the padding from the settings screens 2019-10-23 00:48:24 +02:00
björn petersen 59004444bf Merge pull request #1076 from deltachat/simpify-settings
simplify settings
2019-10-22 22:44:58 +02:00
B. Petersen a2a3cf8aa8 show led-color standardized in the value row
right-aligned settings look a bit odd on newer android versions,
the default is a second row with the value.

also, the led is subject to change
as it probably won't be directly editable in the notification channels -
so, do not continue to maintain an explicit class for that.
2019-10-22 22:24:17 +02:00
B. Petersen b4d9b1f7dc simplify SignalPreference to Preference 2019-10-22 22:18:22 +02:00
B. Petersen 5fbdf1c2a9 simplify ListPreferenceWithSummary to ListPreference; the right-aligned settings look a bit odd on newer android versions because of the padding left. we just use the standard controls now. 2019-10-22 22:18:22 +02:00
björn petersen 4e5e413dfb Merge pull request #1075 from deltachat/adapt-preferences
Adapt preferences
2019-10-22 20:59:05 +02:00
B. Petersen 0e38854a5f simplify preference divider 2019-10-22 19:47:38 +02:00
B. Petersen 33e04c13cf simplify autocrypt summary layout 2019-10-22 19:42:24 +02:00
B. Petersen c4000c263d bump version, changelog 2019-10-22 19:29:33 +02:00
B. Petersen 4176c8c191 update translations 2019-10-22 18:47:26 +02:00
B. Petersen 81bf005b1b update deltachat-core-rust submodule 2019-10-22 18:13:09 +02:00
cyBerta 5e1f279301 Merge pull request #1072 from deltachat/fix-utf8
fix utf8 issues for android4
2019-10-21 10:45:48 +00:00
B. Petersen 7701354044 hack around utf-8 issues on android4 2019-10-20 15:48:31 +02:00
B. Petersen 212be90951 move GetStringUTFChars() to a function 2019-10-20 15:00:23 +02:00
B. Petersen 3d4a90d29d update deltachat-core-rust submodule 2019-10-20 14:28:53 +02:00
björn petersen c5b927f7b6 Merge pull request #1042 from darkestDark/master
Changed Notification level for Android8+
2019-10-15 18:24:58 +02:00
B. Petersen 54514e8a33 update translations 2019-10-15 18:14:30 +02:00
B. Petersen 5498f91074 update deltachat-core-rust submodule 2019-10-15 17:43:14 +02:00
björn petersen 83e0fa271c Merge pull request #1070 from deltachat/fix_leaking_receiver
Fix leaking receiver
2019-10-15 17:40:02 +02:00
björn petersen cbc94393c4 Merge pull request #1069 from deltachat/tweak_build_gradle
Tweak build gradle
2019-10-15 17:38:52 +02:00
cyberta 4e09b86cbd unregister braodcast receiver onDestroy()fix 2019-10-15 16:29:42 +02:00
cyberta 19f6f063ac workaround fetch issue with jitpack repository (https://github.com/jitpack/jitpack.io/issues/4002 2019-10-15 15:47:34 +02:00
cyberta 8aaa20e173 adapt support libraries to target/compile sdk version 2019-10-15 15:43:57 +02:00
cyBerta a31add664e Merge pull request #1067 from deltachat/targetSdkVersion-28
upgrade targetSdkVersion
2019-10-14 11:10:18 +00:00
B. Petersen 2dd3a4a10a ask for normal permission FOREGROUND_SERVICE in the manifest 2019-10-12 00:06:42 +02:00
B. Petersen 6af9bf407d do not crash on calling startForeground() with missing FOREGROUND_SERVICE permission 2019-10-11 23:18:56 +02:00
B. Petersen 2a8ccbd99c CLIP_SAVE_FLAG for save() does no longer exist, not totally sure, but i think calling save() without parameters is equal to CLIP_SAVE_FLAG|MATRIX_SAVE_FLAG. we'll see :) 2019-10-11 18:46:42 +02:00
B. Petersen 8d67aa04f2 upgrade targetSdkVersion, adapt compileSdkVersion 2019-10-11 18:00:36 +02:00
björn petersen e58e013c4e Merge pull request #1060 from deltachat/remove-get-subtitle
remove calls to dc_chat_get_subtitle()
2019-10-11 17:58:08 +02:00
björn petersen fc8bc31877 Merge pull request #1062 from deltachat/add-bcc-self-switch
add a switch to set the bcc_self option
2019-10-11 17:57:37 +02:00
björn petersen 75bcd000dd Merge pull request #1063 from deltachat/update-contribute-docs
update contribute docs
2019-10-11 17:57:18 +02:00
B. Petersen 70fc1b8078 reorder Application.mk, build.gradle 2019-10-11 17:28:32 +02:00
B. Petersen 0f4adc8c5f update deltachat-core-rust submodule 2019-10-11 17:10:31 +02:00
B. Petersen 3d56bf6601 reorder ndk-make.sh script 2019-10-11 17:10:15 +02:00
B. Petersen c43eadec47 update contribute docs 2019-10-11 11:40:02 +02:00
B. Petersen 76a481b913 add a switch to set the bcc_self option 2019-10-11 00:29:38 +02:00
B. Petersen 12b12087a1 remove getSubtitle() hack 2019-10-10 21:47:10 +02:00
B. Petersen 8b02990d78 remove potentially unreliable call to getSubtitle for avatar hashing 2019-10-10 18:07:19 +02:00
B. Petersen 65c2517e5e docs 2019-10-10 12:05:53 +02:00
B. Petersen f6b8faa732 update translations 2019-10-10 11:19:09 +02:00
B. Petersen af7334024c update deltachat-core-rust submodule 2019-10-10 11:17:28 +02:00
B. Petersen 1515a31e7c bump version 2019-10-10 01:48:25 +02:00
B. Petersen aece8fe5b9 update deltachat-core-rust submodule 2019-10-10 01:19:33 +02:00
björn petersen d43f36d8f3 Merge pull request #1059 from deltachat/set-stock-translations
adapt to new translations api
2019-10-10 00:07:16 +02:00
B. Petersen 497b867364 update stock-strings on new system-language 2019-10-10 00:06:57 +02:00
B. Petersen f67315f404 update stock-strings on selecting a new language 2019-10-09 23:38:39 +02:00
B. Petersen c2dd7b7e95 let deltachat-core release strings previously returned 2019-10-09 23:24:04 +02:00
B. Petersen 6e07439c33 set stock translations usign new api 2019-10-09 23:15:21 +02:00
B. Petersen 15dfb829a5 update deltachat-core-rust submodule 2019-10-09 21:15:24 +02:00
björn petersen 7cdac59584 Merge pull request #1057 from deltachat/remove-dead-code
remove dead code
2019-10-08 17:21:18 +02:00
B. Petersen d011546903 remove dead code 2019-10-08 13:22:49 +02:00
B. Petersen b5f2d35f5c typo 2019-10-07 18:24:44 +02:00
B. Petersen 827a7c320d update changelog 2019-10-07 17:57:22 +02:00
B. Petersen 86f1470968 bump version 2019-10-07 16:54:44 +02:00
B. Petersen 7923130a88 update translations 2019-10-07 16:41:28 +02:00
B. Petersen 75cab09f94 update deltachat-core-rust submodule 2019-10-07 15:44:26 +02:00
B. Petersen c01f62da52 update translations 2019-10-06 23:22:24 +02:00
B. Petersen c43324e7cc upadte translations 2019-10-06 23:11:38 +02:00
B. Petersen 9412eaba51 add a script to update english source files. 2019-10-06 23:10:29 +02:00
B. Petersen 1802783afa update translation source 2019-10-06 22:54:59 +02:00
B. Petersen 75da4f7878 update translations 2019-10-06 22:05:51 +02:00
B. Petersen 4bc2880000 update translations 2019-10-06 13:43:39 +02:00
B. Petersen 6fd9d01591 reword 2019-10-06 13:42:22 +02:00
björn petersen 5250309fec Merge pull request #1054 from deltachat/add-hint
add hint that empty-server is currently not implemented
2019-10-06 00:21:29 +02:00
björn petersen 76f5144e90 Merge pull request #1053 from deltachat/hack-plurals
hack plurals string for 'N member(s)'
2019-10-06 00:21:13 +02:00
björn petersen f45b19850a Merge pull request #1052 from deltachat/group-icon
remove group icon from chatlist
2019-10-06 00:20:58 +02:00
björn petersen 5cfbfd5d5e Merge pull request #1051 from deltachat/adapt-to-new-api
call dc_perform_mvbox|sentbox_jobs()
2019-10-06 00:20:45 +02:00
B. Petersen fd1b687a36 add hint that empty-server is currently not implemented 2019-10-05 21:38:11 +02:00
B. Petersen bdccf84bf5 hack plurals string for 'N member(s)' 2019-10-05 20:20:29 +02:00
B. Petersen e7871a66e3 remove group icon from chatlist 2019-10-05 19:32:30 +02:00
B. Petersen 2a06910bf1 call dc_perform_mvbox|sentbox_jobs() 2019-10-05 19:15:56 +02:00
B. Petersen 52bcbc344e update deltachat-core-rust submodule 2019-10-05 18:35:12 +02:00
B. Petersen 28d6d10c0b tweak ndk-make 2019-10-05 18:35:00 +02:00
björn petersen 523e056d51 Merge pull request #1046 from deltachat/tunedown-update-hint
show the update-warning in a less annoying color
2019-10-05 18:31:20 +02:00
björn petersen 8e4b863b8a Merge pull request #1049 from deltachat/show-addr-on-forward
show email address on forwarding
2019-10-05 18:31:00 +02:00
B. Petersen c6e3d3c12c show email address on forwarding
when forwarding a message to a one-to-one-chat,
it is useful to see the email address
as there may be various chats with the same user having the same name.
2019-10-05 12:32:10 +02:00
B. Petersen 1f0ed3de3f show the update-warning in a less annoying color 2019-10-03 02:32:38 +02:00
B. Petersen 9e5975a533 update deltachat-core-rust submodule 2019-10-03 01:13:37 +02:00
B. Petersen f1e01bdf61 update translations 2019-10-03 01:12:50 +02:00
björn petersen c907861780 Merge pull request #1045 from deltachat/add_desktop_translations
Add untranslated strings from desktop
2019-10-03 00:45:48 +02:00
B. Petersen 30d6bf5477 change order 2019-10-03 00:45:14 +02:00
jikstra 6d6f40ea7d Add untranslated strings from desktop 2019-10-03 00:17:02 +02:00
B. Petersen 32cd31d847 bump version 2019-10-02 22:44:39 +02:00
B. Petersen b9c7a2f860 update translations 2019-10-02 22:42:02 +02:00
B. Petersen fb80299a21 doc 2019-10-02 22:38:51 +02:00
B. Petersen 9a53db26c4 fix minor stuff lost on the rust merge 2019-10-02 22:36:22 +02:00
B. Petersen 1e37d23182 disable dc_empty_server() for now 2019-10-02 22:17:15 +02:00
B. Petersen 817a6c6e6b update README to rust build instructions 2019-10-02 22:14:55 +02:00
B. Petersen 5a3a854565 delete old submodule 2019-10-02 22:07:30 +02:00
björn petersen 8812d86132 Merge pull request #947 from deltachat/rust-core
rust core
2019-10-02 22:00:40 +02:00
B. Petersen 5a502bd286 resolve-conflict 2019-10-02 21:58:42 +02:00
B. Petersen 2d8db42ded add x86_64 target 2019-10-02 21:50:16 +02:00
B. Petersen 6a9a160f08 update core-update script 2019-10-02 20:57:13 +02:00
B. Petersen e92d91ec3a update deltachat-core-rust submodule 2019-10-02 20:56:38 +02:00
B. Petersen baf9357840 switch rust-linker to clang 2019-10-02 20:52:58 +02:00
B. Petersen 6946aacf49 Update messenger-backend submodule. 2019-10-01 22:40:43 +02:00
björn petersen 4e8874bcdd Merge pull request #1041 from deltachat/refine1
refine android store text a little -
2019-10-01 20:46:42 +02:00
darkestDark 86a11618b8 Changed Nnotification level for Android8+
Enable heads-up notification and fix notification delay on android 9
2019-09-29 11:55:37 +02:00
B. Petersen f9a9348ec0 fix minor typos 2019-09-25 01:35:34 +02:00
björn petersen 21f118d60b Merge pull request #1024 from deltachat/issue-1005
Mailto still partly broken #1005
2019-09-25 01:24:12 +02:00
holger krekel 69589e1892 refine android store text a little -- strike repetetive mentioning of "privacy by design". 2019-09-24 16:46:05 +02:00
B. Petersen 896ebdb80f update deltachat-core-rust submodule 2019-09-24 01:23:30 +02:00
B. Petersen 8b7d544c34 update translations 2019-09-17 16:09:42 +02:00
B. Petersen bca941c685 update translation source 2019-09-17 15:55:36 +02:00
B. Petersen 85785a336a remove deprecated strings (eg. language names) 2019-09-17 15:47:41 +02:00
B. Petersen 9b8afa872b update translations 2019-09-17 15:34:01 +02:00
B. Petersen a61d3eaac0 fix broken link 2019-09-17 13:36:07 +02:00
B. Petersen 60392fd33c tweak add-language.sh 2019-09-05 12:38:48 +02:00
B. Petersen 60b73cd688 plurals are not provided by the core anymore 2019-09-05 12:08:21 +02:00
B. Petersen 50a88779dd update translations 2019-08-27 11:36:56 +02:00
B. Petersen a4cae868ef add Hungarian language 2019-08-25 16:04:53 +02:00
B. Petersen 4c339eec17 make add-language-script more compatible 2019-08-25 15:48:30 +02:00
B. Petersen b3d946ca56 update translations 2019-08-25 14:35:08 +02:00
daniel.boehrs 76a5c824ad Mailto still partly broken #1005 2019-08-16 14:47:08 +02:00
B. Petersen ee66f09f7b adapt to new dc_array_get_raw() api 2019-08-14 23:36:39 +02:00
björn petersen 894746b630 Merge pull request #1011 from deltachat/notification_text_body_order
change text body order back to latest text body on top
2019-08-08 14:57:49 +02:00
cyBerta d37970abc7 change text body order back to latest text body on top 2019-08-08 13:15:34 +02:00
björn petersen eccbb21ced Merge pull request #1016 from deltachat/tweak-keyboard-flags
allow multi-line-messages when system-emojis are enabled
2019-08-08 13:12:36 +02:00
björn petersen ba6d04b6c4 Merge pull request #1014 from deltachat/issue-1012
Disable password visibility toggle if isConfigured #1012
2019-08-08 13:11:59 +02:00
B. Petersen f31f86d616 allow multi-line-messages when system-emojis are enabled, closes #1015 2019-08-07 12:25:15 +02:00
daniel.boehrs fee12bc07b Disable password visibility toggle if isConfigured #1012 2019-08-02 11:31:29 +02:00
cyBerta fd0e07c9ee Merge pull request #1002 from Ampli-fier/master
Added border definitions to preference divider
2019-07-22 11:18:09 +02:00
björn petersen b1004d138a Merge pull request #1003 from deltachat/issue-996
Sharing from special app crashed #996
2019-07-12 15:37:43 +02:00
B. Petersen ffb205f6af still default to getStringExtra() 2019-07-12 12:34:42 +02:00
daniel.boehrs 747dbd5aa8 Sharing from special app crashed #996 2019-07-12 11:09:11 +02:00
Ampli-fier 9295ebdcc6 Added top and bottom border 2019-07-11 19:23:00 +02:00
Ampli-fier 34b943a03d Added border, Changed background color
Added top and bottom border. Aligned the background color with other elements (e.g. menu, PLUS-button).
2019-07-11 19:21:47 +02:00
B. Petersen 76ce26e7b9 update checklist 2019-07-09 23:12:37 +02:00
cyBerta c4a03497dd bump version 2019-07-09 19:35:45 +02:00
cyBerta e49125adfa fix broken png file 2019-07-09 18:47:37 +02:00
cyBerta 0b957a3b6c update gradle wrapper and gradle plugin version 2019-07-09 18:46:52 +02:00
cyBerta d243e9a52c bump version 2019-07-09 17:08:43 +02:00
cyBerta 4b4737e884 update translations 2019-07-09 17:08:15 +02:00
cyBerta edb6937e9a Merge pull request #1000 from deltachat/update-checklist
update checklist
2019-07-09 16:00:03 +02:00
B. Petersen 728fc2fe5c update checklist 2019-07-09 15:54:32 +02:00
cyBerta 4362341a71 Merge pull request #987 from deltachat/crop_signal
update image editing functionality to latest signal code
2019-07-09 13:11:31 +02:00
cyBerta c053dd404d add requiresApi annotation to ScribbleActivity 2019-07-09 12:17:04 +02:00
B. Petersen f51670df5f adapt scribble-sticker-select to dark layout of scribble-activity 2019-07-09 01:25:56 +02:00
B. Petersen 109e134c45 remove special transition, this does not solve the animation problem 2019-07-08 23:45:46 +02:00
B. Petersen 8cb7a8e8ac new image editor requires at least android 4.4 kitkat 2019-07-08 23:35:11 +02:00
cyBerta 647bcd6be0 remove transition property from conversation title view - we don't use view transitions atm 2019-07-08 20:00:55 +02:00
cyBerta c9a0c903ee set explicitly transition between ConversationActivity and ScribbleActivity 2019-07-08 20:00:07 +02:00
cyBerta 321302d271 assure that image editing controls are not overlapped by the soft navigation bar 2019-07-08 18:16:15 +02:00
cyBerta 397f1df89c left-align tools, right-align confirmation checkmark in image editing controls 2019-07-08 17:28:14 +02:00
björn petersen de878de314 Merge pull request #998 from deltachat/remove_quick_reply_fallback
remove quick reply fallback #983
2019-07-08 17:20:56 +02:00
cyBerta 79e82448b4 remove option to lock aspect ratio 2019-07-08 17:04:14 +02:00
cyBerta c0744d4280 remove quick reply fallback #983 2019-07-08 16:00:31 +02:00
cyBerta f104256d13 Merge pull request #993 from deltachat/cleanup
cleanup swipe and contact request behavior
2019-07-08 12:07:36 +02:00
cyBerta 0bc6b54090 Merge pull request #995 from deltachat/fix-notify
fix notifications
2019-07-08 11:25:49 +02:00
B. Petersen 6e980cb316 check against null-pointer return from RingtoneManager.getRingtone(), tackles #984 2019-07-06 00:58:42 +02:00
B. Petersen a50beb6754 unify start-chat dialogs 2019-07-05 18:34:16 +02:00
B. Petersen ad11db6889 not-now in contact-request removes request (tap outside cancels) 2019-07-05 18:19:22 +02:00
B. Petersen 6744e81f4a remove swipe-to-archive and swipe-to-unarchive 2019-07-05 16:51:15 +02:00
cyBerta ebdef1935a improve back button behavior for editing images 2019-07-03 14:04:09 +02:00
cyBerta c2fa11a010 remove system UI visibility flags from ScribbleActivity 2019-07-03 13:10:16 +02:00
cyBerta 323268db00 rearrange icons for image cropping 2019-07-03 13:03:41 +02:00
cyBerta c601f69e07 fix image editor media constraints 2019-07-03 00:50:12 +02:00
cyBerta 77ab87dbf1 increase crop indicator width 2019-07-03 00:47:13 +02:00
cyBerta 986f9d4b36 reduce inital image size for image editing to avoid too severe performance issues 2019-07-03 00:46:40 +02:00
cyBerta 45f65306d5 add save drawable 2019-07-02 19:06:59 +02:00
cyBerta 5e8e4d7575 update image editing functionality to latest signal code - crop images before sending #664 2019-07-01 23:46:57 +02:00
B. Petersen 4027e84ff8 make check-translations.sh work on bsd 2019-06-29 12:01:24 +02:00
B. Petersen b4ec22a233 changelog 2019-06-27 17:50:05 +02:00
B. Petersen 9a9c3b41d3 bump version 2019-06-27 17:37:54 +02:00
B. Petersen e51bd02fd4 changelog 2019-06-27 17:37:43 +02:00
holger krekel a7f08ea904 Merge pull request #982 from deltachat/warn-outlook
add a warning when using outlook/hotmail addresses
2019-06-27 14:27:10 +02:00
B. Petersen 5bec913c62 add a warning when using outlook/hotmail addresses 2019-06-27 13:11:14 +02:00
B. Petersen da244ab98f Update messenger-backend submodule. 2019-06-27 01:46:39 +02:00
B. Petersen acc1807aed remove dead code 2019-06-27 00:51:48 +02:00
björn petersen 7caabf0fe9 Merge pull request #979 from deltachat/fix-show-option
init the show-emails-option with the correct value
2019-06-26 23:14:39 +02:00
B. Petersen b33a7bef5d init the show-emails-option with the correct value 2019-06-26 23:08:41 +02:00
B. Petersen 27187673e1 update translations 2019-06-26 22:42:54 +02:00
B. Petersen 3204232fbd Update messenger-backend submodule. 2019-06-26 22:35:44 +02:00
björn petersen 84364b09ab Merge pull request #978 from Ampli-fier/master
Code cleanup for saving the Log to file
2019-06-26 22:35:17 +02:00
Ampli-fier 811ea4fd23 Code cleanup for saving the Log to file 2019-06-26 22:06:47 +02:00
björn petersen a50d43d24f Merge pull request #973 from deltachat/group_creation_contact_list
don't allow to remove yourself from the multiselect contact list,
2019-06-26 16:25:46 +02:00
cyBerta 41dc94387b don't allow to remove yourself from the multiselect contact list, fixes #833 2019-06-26 16:03:27 +02:00
cyBerta b820086895 Merge pull request #976 from deltachat/enlarge-input-field
make input field 25% larger :)
2019-06-26 15:42:37 +02:00
björn petersen 0dc5173467 Merge pull request #971 from deltachat/share_to_single_contact
share to single contacts (#900)
2019-06-26 15:04:29 +02:00
B. Petersen c8243cd1e8 make input field 25% larger :) 2019-06-26 14:47:33 +02:00
cyBerta 978c4b4f0b fix to show custom avatar images if available 2019-06-26 11:50:47 +02:00
B. Petersen 9b389bcfb1 update translations 2019-06-25 23:13:15 +02:00
cyBerta 2b41c25434 assure that after sharing multiple files sharing state gets properly reset 2019-06-25 23:00:47 +02:00
cyBerta 6af9d59829 share to single contacts (#900) 2019-06-25 23:00:46 +02:00
B. Petersen 89866ec121 Update messenger-backend submodule. 2019-06-25 22:56:32 +02:00
björn petersen c5263e38f4 Merge pull request #972 from deltachat/keybaord_aware_layout_bugfix
keyboard aware layout bugfix (not working back button fix)
2019-06-25 22:55:53 +02:00
B. Petersen f9e9dd9d22 update translations 2019-06-25 22:20:17 +02:00
björn petersen 6ca4d52114 Merge pull request #967 from deltachat/empty-server-folder
add controls to empty folder on server
2019-06-25 22:18:36 +02:00
B. Petersen cddb89717f make translatable 2019-06-25 22:17:33 +02:00
björn petersen d22be18f33 Merge pull request #963 from Ampli-fier/master
Added saving the log to file
2019-06-25 16:23:20 +02:00
B. Petersen dddd02882f wording, show delete-all-checks in red 2019-06-25 16:18:20 +02:00
B. Petersen c0d2f75c6d use camel-case for variables 2019-06-25 14:58:15 +02:00
Ampli-fier ce00d379f4 Logfile name including date and time 2019-06-24 19:09:53 +02:00
cyBerta 78c298eaa5 rename variables 2019-06-24 15:48:07 +02:00
cyBerta d9392fb36f update source code to java 8 standards in InputAwareLayout 2019-06-24 15:43:29 +02:00
cyBerta b18039a8ae fix KeyboardAwareInputLayout update mechanism (#959) 2019-06-24 15:42:22 +02:00
cyBerta a3b96a7cec workaround for #959 (buggy KeyAwareInputLayout update mechanism leads to false back button behavior) 2019-06-24 12:58:00 +02:00
cyBerta 5efe4decee Merge pull request #968 from deltachat/disable-self-avatar
add a hint that self-avatar is not completely working as expected
2019-06-24 10:52:34 +02:00
B. Petersen b186a3fbd4 clearify that e-mails will be deleted as well 2019-06-23 00:43:11 +02:00
B. Petersen c8d9e9d9bf add a hint that self-avatar is not completely working as expected 2019-06-22 01:17:52 +02:00
B. Petersen 83abb060ba make delete-from-server working 2019-06-22 01:07:54 +02:00
B. Petersen 1996422d02 add controls to empty folder on server 2019-06-21 20:01:39 +02:00
björn petersen 706eb63e4e Merge pull request #964 from deltachat/gallery_ordering
change order of inserted document/gallery items (#960)
2019-06-21 15:17:18 +02:00
cyBerta 6106f921cc change order of inserted document/gallery items (#960) 2019-06-21 11:19:00 +02:00
Ampli-fier f254e1c829 Added saving the log to file 2019-06-20 22:35:27 +02:00
björn petersen f4e3511da7 Merge pull request #961 from deltachat/move_import_export
move backup option to settings/chats (#957)
2019-06-20 18:06:20 +02:00
B. Petersen 058ea5e89b style 2019-06-20 18:04:56 +02:00
B. Petersen 9c9966831c call removeObservers() on correct destructor 2019-06-20 17:57:43 +02:00
B. Petersen ffdc367ead revert string renaming 2019-06-20 17:43:38 +02:00
B. Petersen 1dc1f8b46c update translations 2019-06-20 16:48:46 +02:00
Ampli-fier 377de120fd Use camelCase syntax 2019-06-20 16:30:29 +02:00
cyBerta 25feafb18a revert pref string constants 2019-06-20 15:59:50 +02:00
björn petersen 7a724eb352 Merge pull request #958 from deltachat/header_decoration
fix layout issues with list item decorations (e.g. date labels) on...
2019-06-20 13:33:37 +02:00
cyBerta 5722f9938c invalidate sticky header cache only on screen orientation changes 2019-06-20 13:28:42 +02:00
cyBerta 01ad992f71 fix layout issues with list item decorations (e.g. date labels) on screen orientation change #825 2019-06-20 13:28:41 +02:00
cyBerta 29c002b034 move backup option to settings -> chats (#957) 2019-06-18 16:57:07 +02:00
B. Petersen 4338d25b40 add traditional chinese 2019-06-18 15:08:23 +02:00
B. Petersen 25b8a12a61 update translations 2019-06-18 14:59:44 +02:00
B. Petersen 6004058f62 wording, sorting languages 2019-06-18 14:57:47 +02:00
cyBerta edd7e36a5c Merge pull request #955 from deltachat/show-contact-profile
access member-profiles from chat-profine
2019-06-18 10:33:44 +02:00
B. Petersen 9699214781 in chat-profile-contact-list, open contact-profile on tap (instead of asking to start a new chat directly) 2019-06-18 00:28:43 +02:00
björn petersen 18e09b0225 Merge pull request #954 from deltachat/android4_bugfixes
Android4 bugfixes
2019-06-18 00:27:44 +02:00
cyBerta ec107bf5d4 fix for #949, show webp attachments sent from Android 4.x devices 2019-06-17 20:43:50 +02:00
cyBerta 0cfd44990c fix voice message handling for messages sent from Android 4.X devices #916 2019-06-17 19:42:41 +02:00
cyBerta 0b99c90a33 fix potential NPE if large sets of location markers get initialized 2019-06-17 14:20:00 +02:00
cyBerta 0e5ed5b395 fix layout issue in TimeSlider view, relates to #887 2019-06-17 14:18:27 +02:00
cyBerta f43ecf8549 add missing padding to settings screen #894 2019-06-17 12:12:20 +02:00
björn petersen f138ec50bb Merge pull request #952 from deltachat/send-large-videos
allow sending large files and videos
2019-06-16 20:59:05 +02:00
björn petersen 0cb4bf8625 Merge pull request #948 from deltachat/fix-attach-music-issue
Fix attach music issue
2019-06-16 20:58:42 +02:00
björn petersen d063e1dc33 Merge pull request #950 from deltachat/issue-937
mailto links with a body but no subject #937
2019-06-16 20:55:07 +02:00
B. Petersen 6c21116879 allow sending large files; recoding might make them smaller 2019-06-15 22:20:41 +02:00
daniel.boehrs 7cd60d9fcd mailto links with a body but no subject #937 2019-06-14 10:38:26 +02:00
B. Petersen 341e41f986 add chinese/mandarin 2019-06-13 23:06:01 +02:00
B. Petersen ce681e4f31 update translations 2019-06-13 22:37:39 +02:00
B. Petersen 10ab6b4c39 add missing audio-file-names 2019-06-10 21:18:36 +02:00
B. Petersen 8b244d9d6e do not crash on missing audio-file-names 2019-06-10 21:18:28 +02:00
B. Petersen defee46a3b update submodule 2019-06-08 17:45:53 +02:00
B. Petersen a728ef8200 add script to build dcc-rs for arm64-v8a, armeabi-v7a, x86; remove armeabi 2019-06-08 17:42:13 +02:00
B. Petersen a7a2088419 adapt some path and remove unused functions 2019-06-08 17:42:12 +02:00
dignifiedquire 54e41c23c3 setup basic deltachat-core-rust 2019-06-08 17:42:12 +02:00
B. Petersen 38771be6a7 update translations 2019-06-08 16:38:59 +02:00
B. Petersen d4215c4fe5 update strings 2019-06-08 16:35:47 +02:00
björn petersen d6af236ae8 Merge pull request #945 from deltachat/issue-885
Let manually downloaded and not updated APKs expire #885
2019-06-08 02:31:36 +02:00
B. Petersen d200233748 simplify the strings to maintain by the translators 2019-06-08 02:31:06 +02:00
B. Petersen 7b194ae179 catch all exceptions; the code is running all the time and has the potential to be a total showstopper 2019-06-08 02:21:24 +02:00
B. Petersen 951121cdb7 add installer-package-name to debug-log 2019-06-08 02:17:33 +02:00
björn petersen 47cfed887e Merge pull request #946 from deltachat/input-button-sizes
Input button sizes
2019-06-08 02:02:08 +02:00
B. Petersen b19be862be tweak emoji button 2019-06-08 02:01:45 +02:00
B. Petersen c6eaf428e7 make emoji, camera, audio buttons higher 2019-06-08 01:53:22 +02:00
B. Petersen edc151d93e make tapping area of emoji-toggle wider 2019-06-08 01:40:19 +02:00
björn petersen 5ce9562a8c Merge pull request #944 from deltachat/actionbar_button_sizes
Actionbar button sizes
2019-06-08 01:26:05 +02:00
björn petersen 06495006a0 Merge pull request #943 from deltachat/no-scroll-down
do not scroll down on list updates
2019-06-08 00:59:54 +02:00
B. Petersen f2085ee2c2 style 2019-06-08 00:53:42 +02:00
daniel.boehrs e7a5030d92 Let manually downloaded and not updated APKs expire #885 2019-06-07 11:03:47 +02:00
cyBerta 5b549fc939 adapt padding for back button in ConversationActivity and ProfileActivity 2019-06-06 18:55:44 +02:00
cyBerta 95c9920a4d adapt padding for search icon in chat overview 2019-06-06 18:52:20 +02:00
cyBerta a6e7d84fba keep scroll position y offset 2019-06-06 13:37:10 +02:00
B. Petersen 315b966022 do not scroll around on list updates 2019-06-06 03:15:31 +02:00
björn petersen fd9ef333c2 Merge pull request #940 from deltachat/unread_message_marker
show new message marker #447
2019-06-06 01:10:25 +02:00
B. Petersen 89a9a296ab tweak layout of message marker to not collide with different background 2019-06-06 01:08:59 +02:00
B. Petersen 6ac5c64218 wording: the marker shows new messages, not necessarily unread messages 2019-06-06 00:58:47 +02:00
B. Petersen bfc79ea604 do not hide the new-messages-marker on new incoming messages 2019-06-06 00:30:48 +02:00
cyBerta 96814700cb show new message marker #447 2019-06-05 18:24:36 +02:00
björn petersen b74c654451 Merge pull request #941 from deltachat/notification_review
Notification review
2019-06-05 18:10:31 +02:00
cyBerta c4183af72c run notification creation, deletion etc. always in background 2019-06-05 17:28:02 +02:00
cyBerta 4c5f717d1d change notification channel base name... 2019-06-05 16:21:04 +02:00
cyBerta 0511f05085 minor clean up 2019-06-05 15:43:59 +02:00
cyBerta 92caedff09 change base notification channel id in order to avoid channel setting migration issues 2019-06-04 18:02:43 +02:00
cyBerta b919f323b5 Delete notifications when chat gets deleted. Guarantee thread safty 2019-06-04 17:09:47 +02:00
cyBerta b4cdb8553a respect android system settings (e.g. 'do not disturb') regarding the notification sounds 2019-06-04 14:46:30 +02:00
Lars-Magnus Skog ffc11fcd4a Merge pull request #939 from deltachat/catch-all-exceptions
do not crash on loading failures
2019-05-30 01:23:36 +02:00
B. Petersen 187f2f2e39 do not crash on loading failures 2019-05-30 01:21:26 +02:00
björn petersen 7a51205a80 Merge pull request #935 from deltachat/notification_refactoring
Notification refactoring
2019-05-29 23:58:11 +02:00
cyBerta a15f0392ae Merge pull request #932 from deltachat/target-838
try to stop location-engine more gracefully
2019-05-29 15:57:30 +02:00
cyBerta 68bf57d3e3 fix #453: show last selected notification sound in options dialog, adopt vibrate dialog 2019-05-29 13:45:38 +02:00
cyBerta f209fa6772 remove unneded interface 2019-05-29 13:03:45 +02:00
cyBerta 451ea1dbad Don't use notification's / notification channel's sound and vibration functionality at all.
Instead we're handling sound and vibration alerts separately. It allows us to dynamically
change the 'signal' flag  turning on and off sounds on Android O+ without posting into different
channels for loud and silent notifications. This way we keep the grouped notification view
instead of falling back to the pre API 23 summary notificatoin view.
2019-05-29 12:07:37 +02:00
cyBerta 3efb33441c add images to notifications if available 2019-05-28 17:29:16 +02:00
cyBerta 7f6823a650 silence notification channels if needed 2019-05-28 15:40:27 +02:00
cyBerta 9c3aca2fb0 fix some lint issues 2019-05-28 10:44:09 +02:00
cyBerta 35138022e9 notification refactoring 2019-05-28 01:11:40 +02:00
B. Petersen 46240ef094 cleanup location-manager init-process 2019-05-26 17:15:43 +02:00
B. Petersen 46c8073160 call stopLocationEngine() explicitly when stop shareing location for the last chat 2019-05-26 17:07:18 +02:00
björn petersen 9ff568969d Merge pull request #931 from deltachat/delete-unused-files
cleanup: delete unused java-source-files and resource-files
2019-05-26 00:38:11 +02:00
björn petersen 068a6a2b09 Merge pull request #930 from deltachat/add-missing-cancel-buttons
unify some alerts
2019-05-26 00:37:51 +02:00
B. Petersen c0b2f9a50e cleanup: remove boilerplate in MuteDialog and ShareLocationDialog 2019-05-26 00:35:22 +02:00
B. Petersen f0b5a895ec cleanup: remove unused JobSerializer and EncryptionKeys classes 2019-05-26 00:28:24 +02:00
B. Petersen 8a8e22c04b cleanup: remove unused AttachmentId class 2019-05-26 00:08:10 +02:00
B. Petersen f95acd0578 cleanup: delete unused java-source-files and resource-files 2019-05-26 00:02:24 +02:00
B. Petersen 1dbeda68bd always ask before starting a chat from new-chat-activity; otherwise it is not forseeable what happens on a tab 2019-05-25 17:13:16 +02:00
B. Petersen a9072171da add cancel-buttons to mute- and vibrate-dialogs 2019-05-25 14:40:23 +02:00
björn petersen dfcb1befb5 Merge pull request #926 from deltachat/still-tweak-profile
still tweak profile
2019-05-25 13:36:07 +02:00
B. Petersen d3214cf470 simplify edit-view 2019-05-25 13:26:40 +02:00
B. Petersen fcd98ae928 streamline edit name/image menu 2019-05-25 13:26:40 +02:00
B. Petersen e91bead522 remove dead code 2019-05-25 13:26:40 +02:00
B. Petersen 62ac442a16 remove old entry points for the profile 2019-05-25 13:26:40 +02:00
B. Petersen 5028ae6e82 use profile fast-animation only for the chat-profile, not for contact-profiles in groups 2019-05-25 13:26:40 +02:00
B. Petersen 1edf6c4db3 edit on click on avatar 2019-05-25 13:26:40 +02:00
B. Petersen 3b5c51b410 add avatar to new profile 2019-05-25 13:26:40 +02:00
björn petersen fb341f7217 Merge pull request #925 from deltachat/tweak-chat-title
tweak chat-title
2019-05-24 16:20:31 +02:00
B. Petersen 55aff7465f tweak chat-title: larger avatar, larger title, smaller subtitle, correct padding 2019-05-24 16:06:06 +02:00
björn petersen cbb9cdc9ba Merge pull request #924 from deltachat/issue-817
Wrong group picture shown in group settings #817
2019-05-24 14:18:55 +02:00
björn petersen 2949f8554c Merge pull request #923 from deltachat/simplify-profile3
more profile tweaks
2019-05-24 14:10:18 +02:00
daniel.boehrs 9faa6deb62 Wrong group picture shown in group settings #817 2019-05-24 13:51:03 +02:00
B. Petersen 67b1dea4c1 move edit-name-etc to normal menu, the avatar is displayed anyway 2019-05-24 11:22:37 +02:00
B. Petersen 1fb81d69dd tweak profile menu 2019-05-24 00:45:24 +02:00
B. Petersen c13ed8c785 update az, ca, nl and tr translations 2019-05-24 00:25:39 +02:00
björn petersen f47686bff9 Merge pull request #921 from deltachat/simplify-profile2
tweak simplified profile
2019-05-24 00:13:52 +02:00
B. Petersen 074ae9f4a3 use a simple fade animation to bind the profile closer to the chat 2019-05-23 20:03:13 +02:00
B. Petersen f59687d6af cleanup, move several options to the more visible menu 2019-05-23 18:39:07 +02:00
B. Petersen a17cfccba4 remove members in new profile 2019-05-23 16:05:15 +02:00
B. Petersen de63f101a2 implement member-add to new profile 2019-05-23 14:35:32 +02:00
B. Petersen 0ea15b738f single-click on a member can be used to start a chat 2019-05-23 13:34:57 +02:00
B. Petersen 43d122fdfe implement profile functions: open shared-chat, vibrate 2019-05-23 12:41:33 +02:00
B. Petersen 670eeb01e2 implement profile functions: mute, sound 2019-05-23 01:22:39 +02:00
B. Petersen 308b92412e implement profile functions: new-chat, block-contact 2019-05-23 00:55:41 +02:00
B. Petersen 4988f94f76 update profile on changes 2019-05-23 00:43:11 +02:00
B. Petersen ecbbe30259 remove unused inverted-avatars 2019-05-22 22:51:01 +02:00
B. Petersen 87ae0e9d37 fix redraw error 2019-05-22 22:45:44 +02:00
cyBerta c946cc4261 Merge pull request #917 from deltachat/simplify-profile
simplify profile
2019-05-22 15:55:22 +02:00
B. Petersen 979d3368d1 make basic contact options work 2019-05-22 14:52:57 +02:00
B. Petersen 1bdf106f84 add buttons to settings 2019-05-22 14:07:26 +02:00
B. Petersen 5aa23f0346 simplify sticky-headers 2019-05-22 12:14:57 +02:00
B. Petersen b4268b12ed check for null 2019-05-22 12:09:31 +02:00
B. Petersen 9c60c387f4 show shared chats in profile-settings 2019-05-22 00:02:27 +02:00
B. Petersen 995de4a5ba remove padding from profile-member-list 2019-05-21 18:40:52 +02:00
B. Petersen ef245874ba add member-headers to profile-settings 2019-05-21 18:20:38 +02:00
B. Petersen bb70e26d38 simplify ViewHolder 2019-05-21 17:02:54 +02:00
B. Petersen 57322bf769 prepare profile-settings-adapter to display different items 2019-05-21 17:02:54 +02:00
B. Petersen 73b9c6777c improve placeholder text 2019-05-21 17:02:54 +02:00
B. Petersen f786854aac basically show the member list 2019-05-21 17:02:54 +02:00
B. Petersen d10ef0f931 multi-edit documents from profile 2019-05-21 17:02:54 +02:00
B. Petersen d7090d4509 adapt gallery columns for landscape mode 2019-05-21 17:02:54 +02:00
B. Petersen b6f61edaa0 show title beside music-files 2019-05-20 22:56:32 +02:00
B. Petersen fcc9608330 show document info in profile 2019-05-20 20:31:39 +02:00
B. Petersen 24f4ed44a8 refine staging area for documents and audio 2019-05-20 20:31:39 +02:00
B. Petersen 31031e0b92 unique colors for attachments 2019-05-20 20:31:39 +02:00
B. Petersen 72d37f2aa8 made one-column document-layout 2019-05-20 20:31:39 +02:00
B. Petersen d15a5d04e3 make profile-docs generally work 2019-05-20 20:31:39 +02:00
B. Petersen 37ae163238 move Profile*Fragment to separate files 2019-05-20 20:31:39 +02:00
B. Petersen bbe633961b more generic BucketedThreadMediaLoader 2019-05-20 20:31:39 +02:00
B. Petersen e16b4a7af9 rename Media*Adapter to Profile*Adapter 2019-05-20 20:31:39 +02:00
B. Petersen 009ee65e16 cleanup 2019-05-20 20:31:39 +02:00
B. Petersen 73ed163c23 add settings resource, flatten fragment hierarchy 2019-05-20 20:31:39 +02:00
B. Petersen d2849bb852 rename media_overview_*-resources to profile_*-resources 2019-05-20 20:31:39 +02:00
B. Petersen 7cc7b26796 cleanup unused tabs 2019-05-20 20:31:39 +02:00
B. Petersen c277a9f6fc rename MediaOverview to Profile 2019-05-20 20:31:39 +02:00
B. Petersen 413093cdea harden tab ids 2019-05-20 20:31:39 +02:00
B. Petersen 6b880244b8 refactor ProfileActivity extras 2019-05-20 20:31:39 +02:00
B. Petersen d80e930e19 rename MediaOverviewActivity to ProfileActivity 2019-05-20 20:31:39 +02:00
B. Petersen a712d0e268 open profile on click of chat title 2019-05-20 20:31:39 +02:00
B. Petersen 3057e6c7d7 remove dead code wrt system-avatar/system-name in profile settings 2019-05-20 20:31:39 +02:00
cyBerta 6161768b80 Merge pull request #920 from deltachat/tweak-notifications
tweak notifications
2019-05-20 19:53:28 +02:00
B. Petersen 32e34e5955 play soundOut for outgoing messages 2019-05-20 18:11:10 +02:00
B. Petersen 46f768ca28 remove superfluous headline 2019-05-20 18:10:49 +02:00
B. Petersen 17153fe4e2 add missing soundfiles 2019-05-20 18:10:01 +02:00
björn petersen 5030119a83 Merge pull request #915 from deltachat/notification_fixes
Notification fixes
2019-05-20 15:21:03 +02:00
cyBerta ada024f614 play 'plop' sound on send button click 2019-05-20 14:14:29 +02:00
cyBerta 8dd8a1d771 add 'plop' sound for in-chat incoming messages 2019-05-20 14:01:27 +02:00
björn petersen b401345962 Merge pull request #918 from deltachat/issue-910
close search-keyboard on click on ok #910
2019-05-17 13:59:53 +02:00
daniel.boehrs d0237741d5 close search-keyboard on click on ok #910 2019-05-17 12:27:31 +02:00
cyBerta 45570353e9 silence incoming notifications within the first minute after app start (relates to #451) 2019-05-16 12:50:24 +02:00
cyBerta f1a0bb3ecf remove dead code in MessageNotifier 2019-05-16 11:48:56 +02:00
cyBerta 28fbb354b3 don't show info messages as notifications 2019-05-16 11:32:21 +02:00
cyBerta 2b37b3355c do not show unread message notifications on app start (relates to #451) 2019-05-16 11:30:43 +02:00
cyBerta 7886e8b699 replace mute for one year with option to mute forever (#814) 2019-05-15 18:22:22 +02:00
cyBerta af319888d9 * do send notification signal if app is in background
* show last message in the notification summary
* change order of notification items (newest at the top)
2019-05-15 18:22:22 +02:00
cyBerta dc3eb272f9 update notification bar on entering a chat (fixes #725) 2019-05-15 18:22:22 +02:00
björn petersen 006bf07a13 Merge pull request #914 from deltachat/revert-mp4-upgrade
revert the mp4-parser-upgrade
2019-05-15 16:49:53 +02:00
B. Petersen d74d0ece20 revert the upgrade from 1.0 to 1.1, recoding does not work otherwise 2019-05-15 14:56:24 +02:00
björn petersen 1c746ab9fd Merge pull request #913 from deltachat/fwdAndShare_fixes
Fwd and share fixes
2019-05-15 13:27:18 +02:00
cyBerta 06e62903ef fix sharing multiple files (#901) 2019-05-15 12:56:34 +02:00
cyBerta 84bdc42c7c * fix back button behavior for sharing and forwarding (#903)
* fix title in archived chats while sharing content
2019-05-15 12:56:33 +02:00
cyBerta 0ea7181b58 * fix sharing of text/urls (fixes #908)
* share single files as drafts
2019-05-15 12:56:33 +02:00
cyBerta 85427d3c01 Merge pull request #912 from deltachat/resort-preferences
resort some advanced options
2019-05-15 10:29:03 +02:00
cyBerta 18087a7613 Merge pull request #911 from deltachat/tweak-video
Tweak video
2019-05-15 02:24:43 +02:00
B. Petersen 20ab00d302 use different video-quality depending on the media-quality setting 2019-05-15 01:38:58 +02:00
B. Petersen 2e494948e5 use different voice-message-quality depending on the media-quality setting 2019-05-15 01:29:26 +02:00
B. Petersen be73649703 move 'advanced/outgoing image quality' to 'chats and media/outgoing media quality' 2019-05-15 01:13:44 +02:00
B. Petersen d1e902b1a3 move 'show classic emails'-option from 'advanced' to 'chats and media' 2019-05-15 00:57:57 +02:00
B. Petersen 41e2def76f skip insufficient pre-check of video-format 2019-05-15 00:35:27 +02:00
B. Petersen 29226b2330 update mp4parser from 1.0.6 to 1.1.22 2019-05-15 00:24:01 +02:00
cyBerta 76cfe5f197 Merge pull request #883 from deltachat/record-video
record & recode video
2019-05-14 12:56:11 +02:00
björn petersen dda3cf9e84 Merge pull request #904 from deltachat/issue-756
show a hint that qr-verification cannot be done without network #756
2019-05-14 11:04:40 +02:00
B. Petersen 226d8492f7 simplify thumbnails 2019-05-13 21:44:38 +02:00
B. Petersen a59f6fd69b be conservative in sending videos 2019-05-13 21:44:38 +02:00
B. Petersen 13c1c7a4f2 unify video-play-button 2019-05-13 21:44:38 +02:00
B. Petersen 3925c4c02e do not recode if filesize and bitrate are already reasonable 2019-05-13 21:44:38 +02:00
B. Petersen 3606838d93 set video information on prearing also if recoding does not take place 2019-05-13 21:44:38 +02:00
B. Petersen 6d4dddae81 cleanup 2019-05-13 21:44:38 +02:00
B. Petersen e367675dd2 create thumbnails for staging-area 2019-05-13 21:44:38 +02:00
B. Petersen a44abd307a flush() explicitly before close() - although, the docs says other, there is a difference eg. on android7/motog and data are not ready without flush() when read from another thread 2019-05-13 21:44:38 +02:00
B. Petersen 9d255bc343 implement alternative method to get recorded videos 2019-05-13 21:44:38 +02:00
B. Petersen a0b7aa4066 calculate correct video thumbnail size 2019-05-13 21:44:38 +02:00
B. Petersen 9f3278eccf avoid division by zero 2019-05-13 21:44:38 +02:00
B. Petersen 5b5bfedcfd add a different animation for 'prepare' 2019-05-13 21:44:38 +02:00
B. Petersen 582f2d0626 prepare video before recoding starts 2019-05-13 21:44:38 +02:00
B. Petersen a959b173fa add DcChat.prepareMsg() 2019-05-13 21:44:38 +02:00
B. Petersen 7333c8a27a enable audio in recoded videos 2019-05-13 21:44:38 +02:00
B. Petersen d73d392ed4 recode video data 2019-05-13 21:44:38 +02:00
B. Petersen 7a33ad98d3 upgrade app to MultiDex as we have now more than 65k functions 2019-05-13 21:44:38 +02:00
B. Petersen b1de21af60 call VideoRecoder class, do not allow VideoRecording if recoding is not available 2019-05-13 21:44:38 +02:00
B. Petersen 3e41bf3533 add recoder 2019-05-13 21:44:38 +02:00
B. Petersen e0f5a17115 more conversative cache 2019-05-13 21:44:38 +02:00
B. Petersen 328901f724 show video thumbnails 2019-05-13 21:44:38 +02:00
B. Petersen 853a10253c remove unused isInProgress and isPendingDownload from slides 2019-05-13 21:44:38 +02:00
B. Petersen 0d11e11da4 remove unsused showControls parameter 2019-05-13 21:44:38 +02:00
B. Petersen 608180df58 drop complicated is-thumbnail-preview calculation that is discarded at the end 2019-05-13 21:44:38 +02:00
B. Petersen 885b8e2295 send videos files in original coding 2019-05-13 21:44:38 +02:00
B. Petersen ce8c30348f start video recording activity 2019-05-13 21:44:38 +02:00
B. Petersen 4535714a4c add record-video-button to attach-type-selector 2019-05-13 21:44:38 +02:00
holger krekel 1ac6e82300 Merge pull request #909 from deltachat/no-minify
disable minify and proguard for now
2019-05-13 19:04:58 +02:00
B. Petersen efc9919f1b disable minify and proguard for now 2019-05-13 18:30:48 +02:00
holger krekel c012bf7710 Merge pull request #907 from deltachat/cache-dir
use cacheDir if externalCacheDir is not available
2019-05-12 19:59:11 +02:00
B. Petersen 588f8a41fd use cacheDir if externalCacheDir is not available 2019-05-11 18:02:35 +02:00
daniel.boehrs 7b18c4e137 show a hint that qr-verification cannot be done without network #756 2019-05-10 14:20:53 +02:00
björn petersen 7c8ef69467 Merge pull request #895 from deltachat/forward_and_share
search during forwarding, forward to archives, forward to new contacts
2019-05-10 13:48:39 +02:00
cyBerta da6893b728 reset forwarding or sharing on system back button pressed 2019-05-09 16:55:14 +02:00
cyBerta d2638f5554 don't allow message search queries while forwarding or sharing 2019-05-09 16:47:51 +02:00
cyBerta 0bfea03707 handle sharing analogous to forwarding:
* search for contacts, share to new contacts, share to archives
* hide option menu while sharing/forwarding
* use action bar back icon to cancel sharing/forwarding
2019-05-09 14:14:45 +02:00
cyBerta bd650bf21a #891 add new forwarding mechanism to MediaPreviewActivity 2019-05-09 14:14:45 +02:00
cyBerta 26949980db #891 search during forwarding, forward to archives, forward to new contacts 2019-05-09 14:14:45 +02:00
holger krekel 1d342e1002 Merge pull request #897 from comradekingu/patch-7
Fix typos and words in Readme
2019-05-09 00:15:33 +02:00
Allan Nordhøy 0741eb6a38 Fix typos and words in Readme 2019-05-08 14:49:13 +02:00
B. Petersen fbe33cd8a3 bump version 2019-05-07 17:38:44 +02:00
B. Petersen 169d3d9326 Update messenger-backend submodule. 2019-05-07 17:18:21 +02:00
B. Petersen 16b29b1a50 update translations 2019-05-07 11:52:59 +02:00
björn petersen 429175859c Merge pull request #890 from deltachat/simplify-blob-provider
simplify PersistentBlobProvider
2019-05-05 22:49:10 +02:00
B. Petersen 310c616a63 simplify PersistentBlobProvider 2019-05-05 22:37:48 +02:00
B. Petersen a15b482296 update translations 2019-05-02 15:30:04 +02:00
B. Petersen 6d3c01e9ba add catalan language, thanks Calbasi for pushing this forward 2019-05-02 15:26:48 +02:00
B. Petersen d1f9dd6511 refine scrips 2019-05-02 15:05:32 +02:00
B. Petersen 88650df039 changelog 2019-05-01 21:31:12 +02:00
B. Petersen f9cb6b81f5 bump version 2019-05-01 21:24:53 +02:00
B. Petersen 11524c7482 tweak menu 2019-05-01 21:20:35 +02:00
cyBerta aef2c09653 Merge pull request #876 from Ampli-fier/master
Enhance log with scroll and zoom possibility
2019-05-01 19:23:13 +02:00
cyBerta 69988538e6 Merge pull request #884 from deltachat/refine-provider
do not check location-provider we've not requested
2019-05-01 19:18:35 +02:00
cyBerta f075518dde Merge pull request #886 from deltachat/disable-mapbox-telemetry
init mapbox only as needed and disable mapbox-telemetry
2019-05-01 19:17:15 +02:00
B. Petersen b364a9dab6 init mapbox only as needed and disable telemetry 2019-05-01 17:40:52 +02:00
B. Petersen c60ab862a8 do not check location-provider we've not requested 2019-05-01 16:30:22 +02:00
B. Petersen bbbeb27a66 add missing import statement (wondering why it compiles on the first try? cache?) 2019-05-01 12:53:09 +02:00
björn petersen 918cd0dfbd Merge pull request #878 from deltachat/poi_improvements
Poi improvements
2019-05-01 12:40:37 +02:00
björn petersen 44abdbb8a6 Merge pull request #881 from deltachat/mapbox_location_component
show own device location independent of location streaming
2019-05-01 12:15:24 +02:00
cyBerta 3b5721e118 show own device location independent of location streaming 2019-04-30 21:27:19 +02:00
cyBerta 53c068c57d differentiate pois from other markers by a dotted outline 2019-04-30 16:22:38 +02:00
cyBerta b096abc3a4 fix disappearing marker 2019-04-30 14:52:13 +02:00
cyBerta 1fa41f5b4c add labels to the bottom of pois and last position markers 2019-04-30 14:47:47 +02:00
cyBerta 0a549fb039 rudimental implementation to delete POIs 2019-04-27 22:26:49 +02:00
Ampli-fier 16e53a98d6 Enhance log with scroll and zoom possibility 2019-04-27 22:16:41 +02:00
cyBerta ee4b40d749 Change wording for sending new POIs 2019-04-27 21:43:10 +02:00
björn petersen 43812a929f Merge pull request #875 from deltachat/update_release_checklist
update release checklist
2019-04-27 21:28:12 +02:00
cyBerta 85656614bc do not show add poi view on global map 2019-04-27 21:23:50 +02:00
cyBerta 11f8b581a6 update release checklist 2019-04-27 20:54:23 +02:00
cyBerta 604497a436 bump version 2019-04-27 00:28:27 +02:00
cyBerta 48cb764361 bump version 2019-04-27 00:15:08 +02:00
björn petersen bca8a5d0e6 Merge pull request #874 from deltachat/no_network_provider
No network provider
2019-04-26 23:10:59 +02:00
cyBerta 64a9f85a34 check if mapview is destroyed before removing markers 2019-04-26 22:23:38 +02:00
cyBerta d2076d406f disable Network provider to avoid crazy marker traces 2019-04-26 22:22:52 +02:00
björn petersen 0c913f4ef1 Merge pull request #873 from deltachat/add_pois
Add pois
2019-04-26 22:02:33 +02:00
cyBerta 3060678d64 send POI messages from map 2019-04-26 21:13:30 +02:00
cyBerta 8cbe052761 fix info window - chat linking 2019-04-26 21:13:30 +02:00
cyBerta 66b4b9325b fix marker sizes 2019-04-26 21:13:30 +02:00
cyBerta e55a230220 create UI to add POI markers 2019-04-26 21:13:30 +02:00
B. Petersen ea0d3bed37 Update messenger-backend submodule. 2019-04-26 21:11:45 +02:00
B. Petersen 16571bcf72 readme 2019-04-26 19:09:28 +02:00
björn petersen 149367c71e Merge pull request #872 from deltachat/issue-854
Attachments with spaces in file name are not handled correctly #854
2019-04-26 16:01:27 +02:00
B. Petersen 1c3336a5c0 Update messenger-backend submodule. 2019-04-26 15:58:23 +02:00
daniel.boehrs 0571278d43 attachments with spaces in file name are not handled correctly #854 2019-04-26 13:51:13 +02:00
cyBerta 11dc495c54 Merge pull request #871 from deltachat/issue-867
Bad behavior by forwarding a message #867
2019-04-26 12:25:57 +02:00
cyBerta f794e79085 Merge pull request #870 from deltachat/independent-markers
add api for independent markers
2019-04-26 12:22:58 +02:00
daniel.boehrs d04a1bf917 Bad behavior by forwarding a message #867 2019-04-26 11:40:52 +02:00
B. Petersen 8fd09d1009 add api for independent markers 2019-04-26 00:32:27 +02:00
björn petersen e27a1f9741 Merge pull request #864 from deltachat/experimental_async_loading
[WIP] Experimental async loading
2019-04-25 12:47:13 +02:00
cyBerta f8e3693560 Merge pull request #869 from deltachat/location-icon
add location icon beside message time
2019-04-25 12:31:53 +02:00
cyBerta 1931ba1456 save last map center and zoom level for each map 2019-04-24 21:55:07 +02:00
cyBerta 6e61b282ef move callback interfaces to corresponding async tasks 2019-04-24 21:55:06 +02:00
cyBerta a886a264f9 chose random longitude at min zoom level if there is no known last position 2019-04-24 21:55:06 +02:00
cyBerta 2435161b87 avoid InvalidLatLngBoundsException if map has no markers 2019-04-24 21:55:06 +02:00
cyBerta b87fed0cbb adapt loop iteration according to ConcurrentHashMap 2019-04-24 21:55:05 +02:00
cyBerta 455519556a remove dead code 2019-04-24 21:55:05 +02:00
cyBerta 07caaa9f37 clean up 2019-04-24 21:55:05 +02:00
cyBerta 6912196961 collect map data asynchronously 2019-04-24 21:55:04 +02:00
björn petersen 740bfaf427 Merge pull request #866 from deltachat/tweak-log
tweak log view
2019-04-24 21:40:06 +02:00
B. Petersen aa14ed5107 add location icon beside message time 2019-04-24 20:43:33 +02:00
B. Petersen d5bce6512e Update messenger-backend submodule. 2019-04-24 20:42:29 +02:00
B. Petersen 25885c5cfb larger font, non-monospaced to avoid getting wider and break more lines 2019-04-23 10:39:51 +02:00
B. Petersen 94e1b3d3cf smaller padding to save some space 2019-04-23 10:13:25 +02:00
B. Petersen 9155c97568 bump version 2019-04-22 22:39:33 +02:00
björn petersen f15be3402d Merge pull request #865 from deltachat/fix-for-android4
avoid using ?attr in combination with <solid>
2019-04-22 22:31:11 +02:00
B. Petersen 0f59350be8 avoid using ?attr in combination with <solid> 2019-04-22 22:26:54 +02:00
björn petersen a574a735b2 Merge pull request #861 from Ampli-fier/master
Logcat with date+time for all Android versions
2019-04-21 02:03:56 +02:00
Ampli-fier c7391e021c Logcat with threadtime 2019-04-21 00:33:19 +02:00
Ampli-fier 0d2a6deb64 Logcat with date+time for all Android versions 2019-04-20 23:48:22 +02:00
B. Petersen 442dbe4050 doc 2019-04-20 01:37:06 +02:00
B. Petersen 10ffdc2f2b changelog 2019-04-20 01:04:12 +02:00
B. Petersen fb4744bb88 bump version 2019-04-20 00:33:53 +02:00
björn petersen 49c1392641 Merge pull request #860 from deltachat/fix-lights
catch color parsing errors
2019-04-20 00:25:31 +02:00
B. Petersen dd7a67a909 catch color parsing errors 2019-04-20 00:07:47 +02:00
B. Petersen 561e6ca1be bump version 2019-04-19 18:59:12 +02:00
B. Petersen 3b6422d50a update translations 2019-04-19 18:54:55 +02:00
B. Petersen 8b40477a0d Update messenger-backend submodule. 2019-04-19 17:43:04 +02:00
björn petersen 6cc93027a8 Merge pull request #856 from deltachat/tweak-location-icon
move location-icon to upper right corner and make it a bit larger
2019-04-19 13:02:09 +02:00
B. Petersen 7eaeb9f603 move location-icon to upper right corner and make it a bit larger 2019-04-19 12:26:03 +02:00
B. Petersen 68ba826def Update messenger-backend submodule. 2019-04-19 02:16:12 +02:00
björn petersen d5d6eef0a7 Merge pull request #853 from deltachat/show-location-states
show current state of the location-streaming in chatlist and chat
2019-04-19 02:15:32 +02:00
B. Petersen afd8431220 playing around with location-streaming-state as floating icon 2019-04-19 02:14:50 +02:00
björn petersen e87fff7c0c Merge pull request #852 from deltachat/location_updates
Location updates
2019-04-19 01:52:36 +02:00
B. Petersen bf040dfe62 remove one-time location-streaming; it's not implemented and it's unclear ux-wise 2019-04-19 00:23:41 +02:00
Ampli-fier c4a9d8f6e2 remove unused glide modues 2019-04-18 23:11:45 +02:00
Ampli-fier 6a1181de5e Undo of: Removed unknown attribute 'position' 2019-04-18 22:49:57 +02:00
Ampli-fier ee9c92f555 Revert "remove unused glide modues"
This reverts commit dcfe4c3e5b.
2019-04-18 22:32:18 +02:00
Ampli-fier c4e3f98266 Removed unknown attribute 'position' 2019-04-18 22:05:24 +02:00
B. Petersen 5a644af56f show current state of the location-streaming in chatlist and chat 2019-04-18 17:17:35 +02:00
cyBerta 2ef1ad1eb2 adapt info window offset for character markers 2019-04-18 15:10:59 +02:00
cyBerta 86d5226bf9 white marker characters 2019-04-18 15:03:06 +02:00
cyBerta 54fb81dc7f fix map filtering, map shows location updates again 2019-04-18 15:01:48 +02:00
B. Petersen 431b72cae6 update translations 2019-04-18 14:33:45 +02:00
björn petersen 929784978c Merge pull request #851 from deltachat/tweak-glide
remove unused glide modues
2019-04-18 14:31:38 +02:00
B. Petersen dcfe4c3e5b remove unused glide modues 2019-04-18 01:33:52 +02:00
B. Petersen 7326677be0 Revert "Update messenger-backend submodule."
This reverts commit 2cf2505524.
2019-04-18 01:14:09 +02:00
björn petersen 85eb7eb896 Merge pull request #850 from deltachat/ime-action-label
set landscape full-screen-editor button-label
2019-04-18 01:01:04 +02:00
B. Petersen 2cf2505524 Update messenger-backend submodule. 2019-04-18 00:49:21 +02:00
björn petersen 4b2ef6b407 Merge pull request #843 from deltachat/location_streaming_2
Location streaming 2
2019-04-18 00:46:16 +02:00
B. Petersen 310f76a7a4 use marker string as-is, it's already truncated in core; do not use length() to check for marker as this won't work for non-ascii 2019-04-18 00:45:51 +02:00
B. Petersen c558853bad set landscape full-screen-editor button-label 2019-04-17 23:41:50 +02:00
cyBerta f5cc75723a add markers with single characters to map 2019-04-17 19:42:17 +02:00
Ampli-fier e62d5d9537 Merge pull request #848 from deltachat/tweak-dark-three
Tweak dark three
2019-04-17 13:29:27 +02:00
B. Petersen 5d6b26e2a2 make scroll-to-bottom more visible, thanks @Ampli-fier 2019-04-17 11:26:11 +02:00
B. Petersen 3ad1d920ff tweak search-separator 2019-04-17 11:17:53 +02:00
B. Petersen 620e1e3757 tweak close-attach-area-button 2019-04-17 11:17:53 +02:00
B. Petersen a949e24d5e tweak scroll-to-bottom-button 2019-04-17 11:17:53 +02:00
B. Petersen e7405b59f7 tweak send button 2019-04-17 11:17:53 +02:00
B. Petersen a8d5f17058 Update messenger-backend submodule. 2019-04-16 22:56:43 +02:00
B. Petersen a164c8f44c add script to push sources to transifex 2019-04-16 22:51:54 +02:00
björn petersen f11d96a50d Merge pull request #847 from Ampli-fier/master
Grammar
2019-04-16 22:45:15 +02:00
Ampli-fier a75e7506aa Grammar 2019-04-16 21:47:19 +02:00
Ampli-fier ea93f1b1c2 Merge pull request #845 from deltachat/tweak-dark-mode
tweak background
2019-04-16 20:31:52 +02:00
B. Petersen 792a2a4997 add DcArray.getMarker() 2019-04-16 19:49:26 +02:00
cyBerta ba7f7b42ff fix merge conflicts 2019-04-16 18:25:56 +02:00
cyBerta 4904757868 fix some slider flakieness for cancellation motion events 2019-04-16 18:16:32 +02:00
cyBerta 6da6028409 allow last position icons to overlap 2019-04-16 18:14:19 +02:00
cyBerta 0370dbe2d7 rename parameter 2019-04-16 17:59:55 +02:00
B. Petersen 2942ff1aad gray scale and flip background, self-bubbles in neutral color 2019-04-16 16:38:46 +02:00
björn petersen 58e0a6a9fc Merge pull request #842 from Ampli-fier/master
Dark Theme improvements part 2
2019-04-16 15:52:31 +02:00
B. Petersen 87c53bae1b add português do brasil 2019-04-16 15:19:09 +02:00
B. Petersen 2b44505485 unify language names to 'locale only' 2019-04-16 14:39:24 +02:00
B. Petersen aee7befa85 update translations 2019-04-16 14:20:56 +02:00
cyBerta 9c43f8ef5d #837 simplify location history slider 2019-04-16 11:22:28 +02:00
cyBerta 085959a6c4 MapDataManager: don't update whole list if no point was added (after onResume) 2019-04-16 11:22:28 +02:00
cyBerta 5e2e6c644e replaces FeatureTreeSet by LinkedLists, reduces layers, improves performance of map 2019-04-16 11:22:27 +02:00
cyBerta b20878d2bc #837 simplify location history slider 2019-04-16 09:13:10 +02:00
cyBerta 1de13e0834 MapDataManager: don't update whole list if no point was added (after onResume) 2019-04-16 08:39:54 +02:00
B. Petersen c153f97b17 Update messenger-backend submodule. 2019-04-16 01:32:35 +02:00
Ampli-fier 11bfd53cf8 Rotate dark background by 180 deg 2019-04-15 23:11:39 +02:00
Ampli-fier 42cf825e98 Cleanup of color usages, better colors for dark theme 2019-04-15 23:09:26 +02:00
björn petersen 2781636d3d Merge pull request #840 from deltachat/disable-leak-canary
disable leak canaray for now
2019-04-15 19:06:58 +02:00
cyBerta 7c9d2df76a replaces FeatureTreeSet by LinkedLists, reduces layers, improves performance of map 2019-04-15 16:50:03 +02:00
B. Petersen 2feecdeb7f disable LeakCanaray until the known leaks are fixed, see #841 2019-04-15 15:17:48 +02:00
björn petersen 1142117bef Merge pull request #831 from deltachat/add-japanese
japanese translation
2019-04-15 14:58:49 +02:00
björn petersen 17845bce7f Merge pull request #828 from Ampli-fier/master
Dark Theme improvements
2019-04-14 00:59:43 +02:00
B. Petersen 0961cffaac initial japanese translation, thanks @RACER1 2019-04-13 15:43:49 +02:00
Ampli-fier 6742895fec Localizable strings for buttons in background selection 2019-04-13 15:36:51 +02:00
B. Petersen 2aea46660c comment 2019-04-13 15:18:16 +02:00
Ampli-fier 8192e35c41 simplify else if statement 2019-04-13 15:15:10 +02:00
cyBerta 232868636f Merge pull request #824 from cracker0dks/patch-1
Update strings.xml
2019-04-12 15:35:11 +02:00
cyBerta c934b2c177 Merge pull request #818 from deltachat/issue-805
Forwarding image from image viewer doesn't work #805
2019-04-12 15:34:08 +02:00
cyBerta 8f23935f77 Merge pull request #830 from deltachat/issue-821
Empty notification for voice and image messages #821
2019-04-12 15:31:12 +02:00
cyBerta ecc9522b92 Merge pull request #829 from deltachat/location_streaming_stabilization
Location streaming stabilization
2019-04-12 15:26:53 +02:00
daniel.boehrs e2a2786e3e Empty notification for voice and image messages #821 2019-04-12 14:58:45 +02:00
cyBerta 8cd2f8f1b4 remove unused imports 2019-04-12 11:42:45 +02:00
cyBerta d96e87c1ef adapt info popup linking to chats after reducing the number of layers for info windows 2019-04-12 01:30:40 +02:00
cyBerta c5a9984ccd refactor filtering, add option to hide traces 2019-04-12 01:13:17 +02:00
cyBerta 868994ba10 add LeakCanary for memory leak detection in debug builds 2019-04-12 00:22:39 +02:00
cyBerta 6b327e690b avoid possible OutOfMemory Errors by lazy generating info popups 2019-04-12 00:21:00 +02:00
cyBerta f78293a3ae fix app crashes on fast layout changes 2019-04-11 14:18:06 +02:00
Ampli-fier 22c4d063c4 Default background image for dark theme 2019-04-10 20:14:07 +02:00
Ampli-fier af4aee1d54 Better colour for PLUS-button in dark theme 2019-04-10 19:24:09 +02:00
Ampli-fier 4a184de91e Switch conversation list divider on Theme changes 2019-04-10 19:15:14 +02:00
cyBerta 31e3a9c1d0 show last positions within the last 24h 2019-04-09 15:37:24 +02:00
cyBerta 3ef7c73511 fix padding for TimeRangeSlider 2019-04-09 14:57:42 +02:00
Cracker f950a8e3b6 Update strings.xml
fix string
2019-04-09 11:56:18 +02:00
holger krekel 46fc0226c4 Merge pull request #822 from deltachat/p-graphics
rework inbox-hello and inbox-zero screens
2019-04-07 16:20:08 +02:00
B. Petersen 4efde95974 add image from @jankass, should be fine for now 2019-04-07 15:42:35 +02:00
B. Petersen 3ce7872e02 adding text and image with some sense 2019-04-06 21:51:07 +02:00
B. Petersen 96a5971f3d simplify inbox-zero screen and make it more helpful 2019-04-06 18:46:05 +02:00
B. Petersen ee6b90c990 create own inbox-hello and inbox-zero images 2019-04-05 22:00:11 +02:00
björn petersen 11cff9be6e Merge pull request #819 from adbenitez/patch-1
Update release-checklist.md
2019-04-05 17:30:33 +02:00
Asiel Díaz Benítez 92dbd3e2e5 Update release-checklist.md
just some little play with case and fixed 2 typos
2019-04-05 11:10:12 -04:00
daniel.boehrs 20c0d34d25 Forwarding image from image viewer doesn't work #805 2019-04-05 14:11:43 +02:00
B. Petersen 39ab44fb55 Update messenger-backend submodule. 2019-04-05 13:14:35 +02:00
björn petersen fe7e5b1bd3 Merge pull request #811 from deltachat/theme-dark-theme
fix dark theme
2019-04-05 12:08:16 +02:00
B. Petersen 631fa8a1d8 tweak member-delete icon for dark-theme 2019-04-05 11:03:32 +02:00
B. Petersen ea0e45cead tweak swiping in dark mode 2019-04-05 02:42:13 +02:00
B. Petersen 8abc5bd50e tweak deak-mode input panel 2019-04-05 02:24:26 +02:00
B. Petersen a228b7c128 tweak background selection, avoid select-button being at the position as 'close' 2019-04-05 01:52:34 +02:00
B. Petersen 9911e9c0fc default background in dark-theme defaults to black 2019-04-05 01:33:04 +02:00
B. Petersen cbf5405ee0 tweak dark mode settings 2019-04-05 01:10:28 +02:00
B. Petersen 0343b9a732 fix cursor and control colors in dark mode 2019-04-05 01:01:06 +02:00
B. Petersen 28b2541c92 tweak contact list 2019-04-04 16:27:17 +02:00
B. Petersen 500ef4e6d2 make all contact lists readable in dark mode 2019-04-03 11:15:09 +02:00
B. Petersen 691c8756fc tint dark-mode fab-button 2019-04-02 19:21:02 +02:00
B. Petersen f238344d0b set cursor more nicely 2019-04-02 18:56:10 +02:00
B. Petersen cb6ef5193f tint the advanced-expand-button correctly 2019-04-02 18:43:21 +02:00
B. Petersen afaffa8880 themed qr scan/show activities 2019-04-02 13:53:01 +02:00
B. Petersen edecccd163 fix dark mode for LogView 2019-04-02 13:37:38 +02:00
B. Petersen 915ac6b8af use theme colors for RegistrationActivity 2019-04-02 11:52:26 +02:00
B. Petersen 1826f23264 Update messenger-backend submodule. 2019-03-31 13:49:43 +02:00
björn petersen 24fcd640b7 Merge pull request #802 from deltachat/backgroundEmojiTextViewCreation
fix #793 partially: allow to create EmojiTextViews in background if ...
2019-03-31 13:48:47 +02:00
cyBerta 0e38fbe021 cleanup 2019-03-31 13:38:51 +02:00
cyBerta 4707efb26a fix #793 partially: allow to create EmojiTextViews in background if statically declared in xml 2019-03-31 13:38:50 +02:00
björn petersen 85cba6cb49 Merge pull request #799 from deltachat/speedup
speed up
2019-03-31 13:31:34 +02:00
B. Petersen efed65c8f4 fix rotating pending-icon 2019-03-31 13:12:21 +02:00
Angelo Fuchs 163cd51aec Maintainance: Move Test outside of regular source codes to avoid confusion. Test srcs are now referenced in build.gradle as own section. Still needs proper goal. 2019-03-31 10:16:30 +02:00
B. Petersen 41031f428c comment 2019-03-30 22:58:15 +01:00
B. Petersen c3cd6337af save on loading 2019-03-30 01:58:10 +01:00
B. Petersen b5b9073d2c less db queries for avatars 2019-03-30 01:28:12 +01:00
B. Petersen c39140442b save db query for drawing group-icon 2019-03-30 00:46:47 +01:00
B. Petersen d81cd18d57 simplify Recipient object, load message for notifications only once, less locking in Recipients object 2019-03-30 00:28:30 +01:00
B. Petersen 880f0c20e4 quicker location-streaming-needed check 2019-03-29 18:55:37 +01:00
B. Petersen 2d37c82cbe allow simple Recipient listeners 2019-03-29 17:35:42 +01:00
B. Petersen c1ff85cc10 remove phone-number-checks 2019-03-29 17:35:42 +01:00
B. Petersen 0604f797d0 check already loaded object in Recipient 2019-03-29 17:35:42 +01:00
B. Petersen 3eb5ddf961 remove unneeded recipient-resolve 2019-03-29 17:35:42 +01:00
B. Petersen c7ed32852d do not load participant list without need 2019-03-29 17:35:42 +01:00
B. Petersen e48d0f4029 simplify delivery-icon 2019-03-29 17:35:42 +01:00
B. Petersen 979d2c663d remove dead quote code 2019-03-29 17:35:42 +01:00
B. Petersen 16a57df9d6 update translations 2019-03-29 02:36:56 +01:00
B. Petersen 6f0a7d0254 Update messenger-backend submodule. 2019-03-29 02:35:19 +01:00
björn petersen 819895e2f1 Merge pull request #794 from deltachat/tweaks
some minor tweaks
2019-03-28 17:29:08 +01:00
cyBerta 470448dd2d Merge pull request #791 from deltachat/map_filtering_2
Map filtering 2
2019-03-28 16:01:35 +01:00
B. Petersen f22247dc70 tweak profile dialog 2019-03-28 01:40:17 +01:00
B. Petersen f141dba12d tweak soft keyboard 2019-03-28 01:20:03 +01:00
B. Petersen b5f94deb81 show correct initial value for 'show classic emails' 2019-03-28 00:53:22 +01:00
cyBerta 39c7103cf6 review fix in slider 2019-03-26 18:45:45 +01:00
cyBerta 97c47153ec fix rounding issue in slider, some more minor performance improvements 2019-03-26 18:34:48 +01:00
cyBerta 1b43a3fe3f map bottom should not be hidable 2019-03-26 18:34:48 +01:00
cyBerta 37974f2ce8 implement filtering, move time label above the slider, minor performance optimizations 2019-03-26 18:34:48 +01:00
cyBerta f57b72d072 avoid IllegalStateExceptions but show an error in the logs if chat id is 0 of a message linked to a marker 2019-03-26 18:34:48 +01:00
cyBerta dfd8d67480 if slider has max position, show 'Last Position', implement longpress for moving both thumb views, initial filter implementation 2019-03-26 18:34:48 +01:00
cyBerta 06525bcaf6 replace hard coded string in bottom sheet 2019-03-26 18:34:48 +01:00
cyBerta f68853e7ec open bottom sheet with time range slider on icon click 2019-03-26 18:34:48 +01:00
cyBerta d41323e69e beautify slider element. 2019-03-26 18:34:48 +01:00
cyBerta 869fb5c16b clean up dead code 2019-03-26 18:34:48 +01:00
cyBerta 58c59146bd implement bottom sheet and a slider for filtering tracks 2019-03-26 18:34:48 +01:00
cyBerta b0aff19ae0 hide global map menu entry if necessary 2019-03-26 18:34:48 +01:00
björn petersen 089554e098 Merge pull request #790 from deltachat/disable-invite
disable invite activity for now
2019-03-26 18:07:19 +01:00
B. Petersen a41116472f disable invite activity for now 2019-03-26 16:51:07 +01:00
B. Petersen 75eaa54481 Update messenger-backend submodule. 2019-03-23 20:43:03 +01:00
björn petersen b4630845c5 Merge pull request #781 from deltachat/location-menu
minor menu tweakings
2019-03-23 20:42:28 +01:00
B. Petersen 3c3a67ea0a let 'settings' be the last menu entry, hide 'global map' entry if location-streaming is disabled 2019-03-23 20:00:48 +01:00
björn petersen 4a9cfcd5b0 Merge pull request #777 from deltachat/global_map_view
Initial implementation of a global map view
2019-03-23 19:02:28 +01:00
cyBerta 5f08c555c4 use core ability to fetch all locations for a contact using chatId = 0 2019-03-23 18:49:38 +01:00
björn petersen a39d0c3250 Merge pull request #775 from deltachat/issue-732
Group with 1 member not shown as group #732
2019-03-23 18:42:28 +01:00
björn petersen 6b7283bcba Merge pull request #776 from deltachat/issue-463
Low quality contact picture #463
2019-03-23 18:38:30 +01:00
cyBerta 7f702825f6 use first name in info window as sender 2019-03-23 12:22:26 +01:00
cyBerta 1ea0ba0097 change use core location ids for point feature 2019-03-23 11:36:42 +01:00
cyBerta d88cae015d fix live location updates for own locations 2019-03-23 11:16:40 +01:00
cyBerta 3fe0adfb8d Merge branch 'master' into global_map_view 2019-03-23 01:55:13 +01:00
cyBerta b679766581 Merge pull request #780 from deltachat/tweak-locations
adapt to new core-api
2019-03-23 01:45:19 +01:00
B. Petersen 4d2211e0d4 adapt to new core-api 2019-03-23 01:35:53 +01:00
B. Petersen 0b28d24e0a Update messenger-backend submodule. 2019-03-23 01:23:42 +01:00
cyBerta fc9971fa15 reduce size of location markers that don't have a messageId 2019-03-23 00:42:23 +01:00
cyBerta f596b3beb4 show display name of sender in info window 2019-03-22 23:51:23 +01:00
cyBerta 7897b39206 move getChatIds() to ApplicationDcContext 2019-03-22 22:53:57 +01:00
cyBerta 2ee94c9ba4 cleanup and test FeatureTreeSet 2019-03-22 22:21:30 +01:00
cyBerta cb5b12d5a8 initial implementation of a global map view 2019-03-22 17:26:56 +01:00
daniel.boehrs 2c46d6e052 Low quality contact picture #463 2019-03-22 13:27:57 +01:00
daniel.boehrs c34d28d230 Group with 1 member not shown as group #732 2019-03-22 12:53:24 +01:00
B. Petersen 60c8313816 Update messenger-backend submodule. 2019-03-21 22:47:59 +01:00
cyBerta 915076a277 Merge pull request #774 from deltachat/check-for-null-pointer
on startup, always show errors if ForegroundDetector is not yet present
2019-03-21 20:47:54 +01:00
B. Petersen 3356b98059 check if ForegroundDetector is available before using it on logging errors 2019-03-21 20:26:39 +01:00
B. Petersen 12dca831a2 Update messenger-backend submodule. 2019-03-21 15:04:08 +01:00
B. Petersen c279ecefd1 Update messenger-backend submodule. 2019-03-21 14:51:14 +01:00
Angelo Fuchs 43f82c28fd Merge pull request #755 from deltachat/location-streaming
Location streaming basic implementation
2019-03-21 14:35:57 +01:00
cyBerta b811b5d313 prepare usage of a map fragment instead of a map view 2019-03-21 14:19:41 +01:00
cyBerta 00c02f49b2 start location streaming service on app start if necessary, stop streaming service after 'share once' if no other chat has streaming enabled, use DcHelper 2019-03-21 10:36:26 +01:00
cyBerta c90d1ccec2 use one source and layer to show all markers, show info window for last location 2019-03-21 09:43:21 +01:00
cyBerta 535b47b98c Merge branch 'master' into location-streaming 2019-03-21 07:50:05 +01:00
cyBerta acff990289 fix npe if no position data is yet available 2019-03-15 14:31:22 +01:00
B. Petersen 17b7b7da9a start a testing checklist 2019-03-15 14:11:21 +01:00
cyBerta 5d47838aff open conversation on map info window click 2019-03-15 14:10:30 +01:00
björn petersen 924ad365a0 Merge pull request #766 from deltachat/issue-754
Unused "New chat" option on groups's profile #754
2019-03-15 13:46:44 +01:00
björn petersen 0a71e21a55 Merge pull request #767 from deltachat/issue-753
[UI] Selecting all contacts but counter still not updated #753
2019-03-15 13:38:45 +01:00
cyBerta 325d8acbf6 check if there's a thumbnail file actually available 2019-03-15 13:29:08 +01:00
cyBerta e0202ebfd7 remove unused space in map bubble view for image only messages 2019-03-15 13:18:06 +01:00
cyBerta f29cb1d27b show thumbnails for attached images in map 2019-03-15 13:08:28 +01:00
cyBerta 7d80926069 show truncated message body text in bubble on map 2019-03-15 11:37:17 +01:00
cyBerta 77431b6dd2 reduce unused space in map bubble layout 2019-03-15 10:32:19 +01:00
cyBerta 3f73551f54 zoom map to bounding box that includes all points shown on the map 2019-03-15 10:30:24 +01:00
daniel.boehrs 959e007e39 [UI] Selecting all contacts but counter still not updated #753 2019-03-15 09:16:29 +01:00
daniel.boehrs 5370d35f44 Unused "New chat" option on groups's profile #754 2019-03-15 08:50:08 +01:00
B. Petersen d50718f95b bump version 2019-03-14 12:53:11 +01:00
B. Petersen 39a651278e Update messenger-backend submodule. 2019-03-14 11:31:30 +01:00
cyBerta 77358c5636 draw info windows always on top 2019-03-14 01:36:57 +01:00
cyBerta ea3da82e2c avoid npe's in GenerateInfoWindowTask 2019-03-14 01:31:59 +01:00
cyBerta 7edba7afe6 invert info window id generation 2019-03-14 01:31:25 +01:00
cyBerta 7c378bcb66 delete all locations on long press as dev option 2019-03-14 00:38:42 +01:00
cyBerta 462390636f don't send invalid locations to core 2019-03-14 00:11:40 +01:00
cyBerta 03cde21eb9 Avoid null Location updates 2019-03-13 23:45:58 +01:00
cyBerta a553b33783 initial info window implementation 2019-03-13 23:39:40 +01:00
B. Petersen 8f7d44ccd5 Update messenger-backend submodule. 2019-03-13 17:55:56 +01:00
B. Petersen 91620a6f0d update translations 2019-03-13 17:31:30 +01:00
cyBerta 55973ef857 Merge branch 'master' into location-streaming 2019-03-13 13:03:34 +01:00
cyBerta 48b3f26ec8 Merge branch 'location-streaming' of https://github.com/deltachat/deltachat-android into location-streaming 2019-03-12 16:24:51 +01:00
cyBerta 276ed3de7c update core submodule 2019-03-12 16:23:08 +01:00
cyBerta 63366eecf3 add logic to select markers, prerequisite for showing an info overlay 2019-03-12 16:22:42 +01:00
björn petersen ec2adce39e Merge pull request #761 from deltachat/update-application-language
also update locale of ApplicationContext
2019-03-11 20:26:48 +01:00
B. Petersen 65655a6138 added deleteAllLocations() to jni 2019-03-11 15:12:10 +01:00
Daniel 3eb6a56e5b Merge pull request #765 from deltachat/fix-mailto-links
fix handling mailto:-share-links
2019-03-11 13:27:18 +01:00
Daniel fb2ce839a9 Merge pull request #763 from deltachat/fix-share-crash
fix crash when sharing link, closes #762
2019-03-11 13:25:39 +01:00
B. Petersen 2ace2a5bdf fix handling mailto:-share-links, closes #764 2019-03-10 17:14:19 +01:00
B. Petersen 5e73a679b6 fix crash when sharing link, closes #762 2019-03-10 16:29:53 +01:00
björn petersen b5a9e910b0 Merge pull request #759 from deltachat/issue-434
sharing files does not work #434
2019-03-09 18:52:36 +01:00
B. Petersen d6a94fd544 wording: make clear, images are not recoded 2019-03-09 18:52:15 +01:00
daniel.boehrs 0c5e1b95f5 sharing files does not work #434 2019-03-09 18:37:01 +01:00
B. Petersen 2b67413b62 also update locale of ApplicationContext as this is neeed eg. by the core 2019-03-09 18:15:47 +01:00
B. Petersen 60aab2998a update translations 2019-03-09 17:42:21 +01:00
B. Petersen 47b87ac203 force pulling new translations, skip all evil caches 2019-03-09 17:40:34 +01:00
B. Petersen 37bbc41639 add a script to check for some basic translation syntax errors 2019-03-09 17:38:12 +01:00
B. Petersen e39c569aa1 update translations 2019-03-09 17:07:00 +01:00
B. Petersen 0913fc2f1b update translations 2019-03-09 16:30:22 +01:00
björn petersen 6fa0598169 Merge pull request #758 from deltachat/logfromonboarding
log should be reachable during onboarding #744
2019-03-09 16:00:13 +01:00
B. Petersen fdcf2786a8 tweak layout, re-use existing string 2019-03-09 15:56:07 +01:00
florian.haar 450966cce6 og should be reachable during onboarding #744 2019-03-09 15:36:48 +01:00
cyBerta f2f04e214b add timestamp, msgId, accuracy info to each point 2019-03-08 11:35:32 +01:00
cyBerta 44219ca6f2 cleanup in MapActivity 2019-03-08 11:34:18 +01:00
cyBerta 81732320cc Merge branch 'location-streaming' of https://github.com/deltachat/deltachat-android into location-streaming 2019-03-08 02:01:37 +01:00
cyBerta 1f332f2b8c add MapDataManager, updates points and lines drawn on the map 2019-03-08 02:00:24 +01:00
B. Petersen 6bab6db32c add kml to standards.md 2019-03-07 21:11:22 +01:00
B. Petersen 6d76fabe91 add advanced switch to enable location-streaming, defaults to 'off' 2019-03-07 14:00:16 +01:00
cyBerta 9843debd21 Merge branch 'location-streaming' of https://github.com/deltachat/deltachat-android into location-streaming 2019-03-07 13:11:20 +01:00
cyBerta 9268b38d47 update submodule 2019-03-07 13:10:23 +01:00
cyBerta 0cb23b3dc5 show own location icon on a map, tweak location update filtering 2019-03-07 13:10:23 +01:00
B. Petersen 998e903e0d adapt to location-rendering-api 2019-03-07 13:10:23 +01:00
cyBerta 70613cc8e1 start/stop location streaming from attachment window, use location related core bindings 2019-03-07 13:10:22 +01:00
cyBerta 8fede3312a add location off icon 2019-03-07 13:10:22 +01:00
cyBerta 5f9646a028 improve location sharing alert title 2019-03-07 13:10:22 +01:00
cyBerta be8a718b3f implement share location button, share location timespan, rename threadId to chatId 2019-03-07 13:10:21 +01:00
B. Petersen 3e28cbed05 DcContext.setLocation() returns the state 2019-03-07 13:10:21 +01:00
B. Petersen 964ab18730 add location-sending functions 2019-03-07 13:10:21 +01:00
cyBerta 71d6972d0f move map and android related code to org.thoughtcrime.securesms 2019-03-07 13:10:20 +01:00
cyBerta b0534c44f6 initial location service implementation, adds a map activity 2019-03-07 13:10:20 +01:00
cyBerta ea6144d963 updates gradle syntax, integrates map dependency and removes gradleWitness until 'implementation' is supported 2019-03-07 13:10:19 +01:00
cyBerta de4fa329e6 Merge pull request #751 from deltachat/image-compression
add an experimental feature for high image compression
2019-03-07 13:08:33 +01:00
cyBerta c52a5c87bf update submodule 2019-03-07 00:53:16 +01:00
cyBerta 1e4c2996b2 Merge branch 'location-streaming' of https://github.com/deltachat/deltachat-android into location-streaming 2019-03-07 00:49:58 +01:00
cyBerta c08bc7ccfe show own location icon on a map, tweak location update filtering 2019-03-07 00:48:44 +01:00
B. Petersen ee8480787c adapt to location-rendering-api 2019-03-06 21:48:07 +01:00
cyBerta 59716c2909 start/stop location streaming from attachment window, use location related core bindings 2019-03-06 20:33:19 +01:00
cyBerta 88f267f748 add location off icon 2019-03-06 20:21:05 +01:00
cyBerta 98f4600df3 improve location sharing alert title 2019-03-06 20:20:22 +01:00
cyBerta 0794bc1ac9 Merge branch 'location-streaming' of https://github.com/deltachat/deltachat-android into location-streaming 2019-03-06 17:26:19 +01:00
cyBerta 8b8e383db8 implement share location button, share location timespan, rename threadId to chatId 2019-03-06 17:25:01 +01:00
B. Petersen 0106c4ebcc DcContext.setLocation() returns the state 2019-03-06 15:34:50 +01:00
B. Petersen 8b35cf1023 add location-sending functions 2019-03-06 15:24:32 +01:00
cyBerta a8e5e51ab9 move map and android related code to org.thoughtcrime.securesms 2019-03-06 12:31:48 +01:00
cyBerta 726d59c162 initial location service implementation, adds a map activity 2019-03-06 12:16:52 +01:00
cyBerta ecae4a14bb updates gradle syntax, integrates map dependency and removes gradleWitness until 'implementation' is supported 2019-03-05 21:12:55 +01:00
B. Petersen 1b6b2ec955 Update messenger-backend submodule. 2019-03-05 20:52:54 +01:00
björn petersen ab5363bab6 Merge pull request #752 from deltachat/fixformatstore
fix formatting for gplay store
2019-03-05 10:58:36 +01:00
holger krekel 829eca72ec fix formatting for gplay store 2019-03-04 07:26:25 +01:00
B. Petersen 867e2aa5d2 add an experimental feature for high image compression 2019-03-02 15:56:59 +01:00
björn petersen c920ef5329 Merge pull request #742 from deltachat/email-interactions
email interactions
2019-03-02 13:05:52 +01:00
B. Petersen 6be0c34ec4 introduce an option 'Show classic email' 2019-03-02 13:03:19 +01:00
B. Petersen c6d76cdf46 more visible divider 2019-02-28 10:31:46 +01:00
B. Petersen 0758977961 remove superfluous default parameter from getConfig() 2019-02-28 10:31:46 +01:00
B. Petersen 867362ac4f force redraw of stacked contact requests 2019-02-28 10:31:46 +01:00
B. Petersen 6a3887cbda abort contect requeste on archive/delete 2019-02-28 10:31:46 +01:00
björn petersen 770cebb255 Merge pull request #746 from deltachat/disable-disk-cache
disable glide disk cache
2019-02-28 10:24:11 +01:00
B. Petersen 9d0493a1ff disable glide disk cache 2019-02-28 00:00:34 +01:00
björn petersen ebc1b0a8e6 Merge pull request #745 from deltachat/add-dev-icon
use a different icon for dev-releases
2019-02-27 12:54:21 +01:00
björn petersen 24773f7613 Merge pull request #741 from chklump/Repair_open_files
Open files via intent didn't work for old android versions.
2019-02-27 00:34:17 +01:00
B. Petersen 92ff795aba add separate icon for the build-type 'debug' 2019-02-26 14:33:58 +01:00
holger krekel 72a2418903 Merge pull request #737 from deltachat/tweak-onboarding
tweak onboarding
2019-02-25 21:56:51 +01:00
holger krekel 4e461e1169 Merge pull request #736 from deltachat/addversion
add version to X-Mailer
2019-02-25 21:55:23 +01:00
B. Petersen 30c1e88a64 wording 2019-02-25 19:18:31 +01:00
B. Petersen d5fa605796 comment 2019-02-24 11:24:39 +01:00
chklump a4d9cb8d88 Add FLAG_ACTIVITY_NEW_TASK to intent in function openForViewOrShare for SDK version 23 and below. 2019-02-23 22:07:56 +01:00
B. Petersen 76daa92441 unify quantity strings; always include %d in 'one' because translators will need to use %d for languages where 'one' does not only mean 1 - and if %d is missing in the source strings, tool may not offer it 2019-02-23 14:12:39 +01:00
B. Petersen f3fa39016d unify colors and headlines 2019-02-22 19:17:38 +01:00
B. Petersen 14addb3984 tweak onboarding screen 2019-02-22 19:05:36 +01:00
björn petersen 00d4749826 Merge pull request #718 from deltachat/issue685
#685 date alignment in media gallery
2019-02-22 17:18:13 +01:00
Angelo Fuchs 682b1101a5 closes #685 by strictly defining points in time
- today is from 00:00.00 this morning until the end of time
- yesterday is from yesterday 00:00.00 until today
- the other ones also mean pretty much exactly what you would expect
them to mean.
- this week and this month both can be empty because they are already
covered by today, yesterday etc. This is by design.
2019-02-22 16:59:51 +01:00
Angelo Fuchs 9622270923 #685 dates are now aligned along date changes at 00:00.00 2019-02-22 16:59:50 +01:00
B. Petersen 5a94ee4e22 add version to X-Mailer 2019-02-22 16:57:15 +01:00
björn petersen 6080563916 Merge pull request #724 from deltachat/issue-716
mailto:-links without address should work as "share" #716
2019-02-22 16:48:46 +01:00
björn petersen 458cc8825b Merge pull request #706 from deltachat/issue-649
Lock pattern security issues #649
2019-02-22 16:39:39 +01:00
daniel.boehrs a91eea93ab Manual handling for mailto URIs 2019-02-22 15:43:58 +01:00
daniel.boehrs 103e6efdbd mailto:-links without address should work as "share" #716 2019-02-22 15:43:57 +01:00
B. Petersen 446b1b6c64 wording 2019-02-22 15:41:24 +01:00
B. Petersen 8df079eaf8 alter view root visibility only when screen-lock is enabled. this is for performance and general compatibility reasons, no special screenlock-code should run if screen-lock is disalbed.. 2019-02-22 15:29:47 +01:00
daniel.boehrs d649f74a6e Only hide UI if ScreenLock is enabled 2019-02-22 14:30:24 +01:00
daniel.boehrs 60fde960ce Lock pattern security issues #649 2019-02-22 14:30:24 +01:00
B. Petersen 64a4d03a6c re-add dev icon (to be used automatically for the beta versions) 2019-02-22 01:43:13 +01:00
B. Petersen 33cef9d9b9 add Lithuanian translation 2019-02-21 23:53:39 +01:00
B. Petersen 5f9c626b14 fix translations 2019-02-21 23:48:14 +01:00
B. Petersen b6fd0b86bf update translations 2019-02-21 23:08:27 +01:00
B. Petersen 63c9b00f51 Update messenger-backend submodule. 2019-02-21 23:00:42 +01:00
björn petersen eddee76ee2 Merge pull request #728 from deltachat/oauth2
implement OAuth2
2019-02-21 22:59:15 +01:00
B. Petersen f51bb4dde5 wording 2019-02-21 16:21:57 +01:00
björn petersen e8e54853f3 Merge pull request #735 from LenzGr/patch-1
Updated README.md
2019-02-21 15:59:16 +01:00
Lenz Grimmer 57837f736b Updated README.md
Provide direct download links to prevent users from having
to go through too many hops in order to obtain the package.
2019-02-21 15:49:18 +01:00
B. Petersen 83f86b8edf add OAuth2 to standards.md 2019-02-20 23:21:04 +01:00
B. Petersen b8a1646823 application-id in delta-chat-auth-scheme is optional 2019-02-20 23:11:57 +01:00
B. Petersen be6a556b87 remove static version prefix 2019-02-20 15:18:34 +01:00
B. Petersen daa5fde02a wording, handle accidential clicks outside confirmation dialog. 2019-02-20 14:54:43 +01:00
B. Petersen a7978430d1 get OAuth2 token back 2019-02-19 22:36:19 +01:00
B. Petersen 5b8c2ffb95 comment 2019-02-19 14:14:33 +01:00
B. Petersen 9bc231a1db do login when oauth2 returns 2019-02-19 00:50:00 +01:00
B. Petersen ad696464c1 add authorisation method popup to RegistrationActivity 2019-02-19 00:06:22 +01:00
B. Petersen bb4b72eab1 use correct redirect_uri 2019-02-18 22:55:12 +01:00
B. Petersen 1fa18be37d launch OAuth2 in browser if appropiate 2019-02-18 14:59:56 +01:00
B. Petersen caf9090594 add getOauth2Url() 2019-02-18 14:59:55 +01:00
B. Petersen db85e9479c implement DC_EVENT_HTTP_POST 2019-02-18 14:59:55 +01:00
björn petersen 8731346326 Merge pull request #729 from deltachat/deadfiles
remove dead references in gradle
2019-02-18 14:59:02 +01:00
B. Petersen 40bab74eb5 remove dead references in gradle 2019-02-18 13:11:35 +01:00
björn petersen f1c9e49f1f Merge pull request #723 from deltachat/reorder-gradle-repositories
Use Googles repositories first
2019-02-15 15:53:17 +01:00
daniel.boehrs c08116e133 Use google repositories first 2019-02-15 11:27:59 +01:00
björn petersen 1d1e57d9ca Merge pull request #721 from deltachat/fixnotification
fix crash wrt notifications
2019-02-14 23:33:11 +01:00
Angelo Fuchs 36b501e01a wording 2019-02-14 19:32:53 +01:00
B. Petersen 8f07d86087 wording 2019-02-14 18:22:37 +01:00
B. Petersen 40bfa15dea update notifications of visible thread in bg, fixes #720 2019-02-14 18:17:08 +01:00
B. Petersen a5ccd9da79 wording 2019-02-14 18:07:30 +01:00
björn petersen f146c1c966 Merge pull request #717 from deltachat/improve_gplay_text
rework description
2019-02-14 13:25:13 +01:00
holger krekel e522ae74ab another go, another refined motto and some text changes ;) 2019-02-14 11:48:24 +01:00
holger krekel b8c547f2f1 mostly take over Lenz's refinements 2019-02-13 18:45:10 +01:00
holger krekel 862a03b3a0 another version, just chatted with mor 2019-02-13 17:30:36 +01:00
björn petersen 728f909db9 Merge pull request #682 from deltachat/notification_issue_451
Notification issue 451
2019-02-13 16:33:05 +01:00
Angelo Fuchs 0d6a225991 changed 'silo' to 'centralization'
Silo is not widely used for this concept.
As "privacy by design" didn't fit after that I replaced it with "no ads"
2019-02-13 15:12:44 +01:00
holger krekel 1110b80184 fix merge accident 2019-02-13 15:00:22 +01:00
Lenz Grimmer 624f98b817 Update store/text.md
Co-Authored-By: hpk42 <holger@merlinux.eu>
2019-02-13 14:59:19 +01:00
Lenz Grimmer 9ed573f5f8 Update store/text.md
Co-Authored-By: hpk42 <holger@merlinux.eu>
2019-02-13 14:59:03 +01:00
B. Petersen 2104cae3a1 comment 2019-02-13 14:54:56 +01:00
holger krekel 5ea8216e78 better sound 2019-02-13 14:54:37 +01:00
holger krekel e742db722c yet 1-2 more points 2019-02-13 14:53:20 +01:00
holger krekel 3456cafb38 rework key points some more 2019-02-13 14:50:43 +01:00
holger krekel fc29c2902f * change short description
* address @lenzgr 's review comments
2019-02-13 14:44:36 +01:00
holger krekel f7cd7860a0 more rewording 2019-02-13 14:39:14 +01:00
holger krekel f564c9f2fc some fixes, typo fixing and a para on encryption 2019-02-13 14:30:27 +01:00
holger krekel 77c98a18cd worked on key points if we want them 2019-02-13 13:53:30 +01:00
holger krekel 503952a915 some refinements 2019-02-13 13:36:27 +01:00
holger krekel 8456051d2f rework description 2019-02-13 13:19:32 +01:00
B. Petersen 3324acd590 disable gcar for now, bump version 2019-02-13 12:03:33 +01:00
B. Petersen e501b86472 do not bother with battery-optimisation just after first start 2019-02-12 17:13:20 +01:00
B. Petersen 21be2fd69c add most recent translations to changelog 2019-02-12 16:41:03 +01:00
B. Petersen 613afa2597 comment 2019-02-12 16:22:17 +01:00
B. Petersen 5e738ef248 bump version 2019-02-12 15:43:31 +01:00
B. Petersen 478330d7e9 update translations 2019-02-12 15:34:09 +01:00
B. Petersen 742a1203df Update messenger-backend submodule. 2019-02-12 15:01:41 +01:00
B. Petersen 19da5cde8a comment 2019-02-12 13:52:28 +01:00
B. Petersen 52c9f8dd33 add application id to log 2019-02-12 13:51:52 +01:00
B. Petersen 7797f9b8a6 add gplay flavour, tackles #697 2019-02-12 13:18:33 +01:00
B. Petersen 195437d8d2 remove dead code from gradle wrt BUILD_TIMESTAMPS used in signal for expiring builds 2019-02-12 02:26:58 +01:00
B. Petersen 19e1b4bba9 update dependency verification 2019-02-12 02:06:14 +01:00
B. Petersen 805a66ea2e Update messenger-backend submodule. 2019-02-12 00:10:45 +01:00
B. Petersen ecb4c0ca33 comment, update store files 2019-02-11 16:30:16 +01:00
B. Petersen fa5a714a1a readme: update year 2019-02-10 23:30:02 +01:00
björn petersen e0e907e537 Merge pull request #711 from deltachat/notification-settings
allow changing led, vibration, sound on NotificationChannels
2019-02-10 17:37:38 +01:00
B. Petersen 72fc8b7b63 create NotificationChannel only if it does not exist 2019-02-10 16:49:46 +01:00
B. Petersen 1afbc3ecf1 allow chaning led, vibration, sound even when using NotificationChannels, closes #709 2019-02-10 16:32:22 +01:00
B. Petersen 30d5cd3c81 update translations 2019-02-10 16:27:43 +01:00
B. Petersen 56468347a7 update translations, add azerbaijani 2019-02-10 16:16:42 +01:00
B. Petersen 08d00ccf62 update translations, german 'du' -> 'die' 2019-02-10 16:08:35 +01:00
björn petersen 40e5efddbc Merge pull request #705 from deltachat/linkify
avoid ClassNotFoundException
2019-02-10 15:40:24 +01:00
björn petersen 0b970709f4 Merge pull request #696 from chklump/master
First attempt to display initial duration for audio attachements.
2019-02-10 15:12:27 +01:00
björn petersen 7c5f90d572 Merge pull request #712 from chklump/Issue_698
Group Create Issues #698
2019-02-10 15:07:08 +01:00
B. Petersen cd5aa0b9c1 update translations 2019-02-10 14:56:25 +01:00
B. Petersen 376208f9a6 Update messenger-backend submodule. 2019-02-10 14:44:06 +01:00
chklump 9a78bfe878 Fix for #698 part 2: "Me" not part of the group when clicked on "QR invite code" and no one joined. 2019-02-10 13:09:10 +01:00
chklump 16a8b21eec Fix for #698 part 1: Crash when creating new group with empty name. 2019-02-10 13:09:04 +01:00
chklump 544f19315b First attempt to display initial duration for audio attachements. 2019-02-10 00:52:23 +01:00
chklump 97e83ff7af Merge branch 'master' of https://github.com/deltachat/deltachat-android 2019-02-10 00:43:36 +01:00
björn petersen c8e19d44f2 Merge pull request #707 from deltachat/ignore-battery-optimize
ask ignoring battery-optimize, adapt to targetSdk=26
2019-02-09 15:45:16 +01:00
B. Petersen 15a2951b20 use min. importance for permanent foreground notification so that no sound is played on oreo, fixes #710 2019-02-09 02:22:56 +01:00
B. Petersen c9fc1c506f move reminder text to strings.xml 2019-02-09 01:44:32 +01:00
B. Petersen 46ac343181 define a notification channel, closes #708 2019-02-09 01:33:22 +01:00
B. Petersen 4866b5ea40 use unique icon for the permanent notification 2019-02-09 01:20:50 +01:00
B. Petersen 4d6892b991 ask the the user to disable battery-optimize if eligible; check the system setting before adding the permanent notification 2019-02-09 01:14:06 +01:00
B. Petersen d501f17525 request permission to ask the user to ignore battery-optimize 2019-02-08 17:18:10 +01:00
B. Petersen 122693d14c avoid ClassNotFoundException eg. on oreo caused by Linkify.MAP_ADDRESSES which is included in ALL 2019-02-08 13:51:25 +01:00
björn petersen 45db3b84fb Merge pull request #704 from deltachat/No_feedback_when_blocking_contact_699
No feedback when blocking contact #699
2019-02-08 13:19:56 +01:00
björn petersen c207e161b5 Merge pull request #702 from deltachat/targetSdk26
change targetSdkVersion from 25 to 26
2019-02-08 13:08:35 +01:00
björn petersen 21b875df96 Merge pull request #703 from deltachat/issue-464
Can't share with pattern set #464
2019-02-08 13:06:03 +01:00
florian.haar 35c7fc44b1 No feedback when blocking contact #699 2019-02-08 12:53:04 +01:00
daniel.boehrs 7a9d2b8e53 Can't share with pattern set #464 2019-02-08 10:40:08 +01:00
B. Petersen ba5c190072 start foreground service according to android o 2019-02-08 00:58:16 +01:00
B. Petersen de28157ebb change targetSdkVersion from 25 to 26 2019-02-08 00:14:17 +01:00
björn petersen ee5858506b Merge pull request #661 from deltachat/mapping_repositories_and_dependencies
Mapping Dependencies and Repositories
2019-02-08 00:02:47 +01:00
Angelo Fuchs 9b6d79ec07 cleaned up repository section a bit. 2019-02-07 23:53:08 +01:00
Angelo Fuchs 3fc848e5d4 comments on usage #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs 39b144b40c nothing is gridlayouted. #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs 08659f0450 cardview is not used. #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs 58d599d236 unused library #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs ca50dda682 some expaination what does what #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs 5e85045d49 removed a library and replaced it with its dependency (that we actually use). #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs d5ecebf304 unused library. #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs 5711b52de6 this color picker is used nowhere. #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs 83f2513a39 we don't pick numbers, we don't need a number picker. #656 2019-02-07 23:53:08 +01:00
Angelo Fuchs decdba5e67 working on #656 mapped out jitpack and the only dependency we get from there. 2019-02-07 23:12:13 +01:00
B. Petersen 1d0ce7ddec add purple explicitly 2019-02-07 23:11:30 +01:00
björn petersen b9bcf28955 Merge pull request #689 from deltachat/typo
fix forground typo
2019-02-07 22:46:40 +01:00
björn petersen ae97adc582 Merge pull request #695 from deltachat/qroverlay
re-add qr-code overlay logo
2019-02-06 16:08:10 +01:00
björn petersen 8d0772362f Merge pull request #694 from deltachat/tweakbuttons
tweak buttons
2019-02-06 14:05:55 +01:00
chklump ea20bf20c6 First attempt to display initial duration for audio attachements. 2019-02-02 19:21:39 +01:00
B. Petersen 2be7b9bb15 re-add qr-code overlay logo 2019-02-02 17:18:30 +01:00
B. Petersen 8456f807d5 unify color names 2019-02-02 15:53:29 +01:00
B. Petersen 6c24f9fc97 tweak button and fab colors according to the lite-color also used on desktop 2019-02-02 15:53:28 +01:00
björn petersen 44075917b7 Merge pull request #690 from deltachat/687_remove_protobuf_files
#687 remove protobuf files
2019-02-02 15:48:23 +01:00
björn petersen 9c4f670fa9 Merge pull request #693 from violoncelloCH/fix/441/disable_autocorrection_server_input
disable autocorrection on server input fields
2019-02-02 15:42:48 +01:00
B. Petersen b33b7c0c8a fix typo 2019-02-01 20:55:23 +01:00
Jonas Sulzer 8aeeb5b3fd disable autocorrection on server input fields
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
2019-02-01 19:43:27 +01:00
björn petersen 15f37c8531 Merge pull request #686 from deltachat/purple_led
allowing the LED color to be purple.
2019-02-01 01:44:05 +01:00
cyBerta a421d148f3 #687 remove protobuf files 2019-02-01 01:28:18 +01:00
cyBerta 3dd9a247dd #451 hide incoming heads-up notifications as long as a thread is visible 2019-02-01 00:52:10 +01:00
Angelo Fuchs 135bc1c96c led default color now purple. 2019-02-01 00:14:22 +01:00
Angelo Fuchs d53ec6add8 allowing the LED color to be purple. 2019-01-31 17:01:33 +01:00
B. Petersen 2941d6926b fix string 2019-01-30 10:52:01 +01:00
B. Petersen f0d27b0a9f update translations 2019-01-30 09:01:14 +01:00
Angelo Fuchs 4e031e260c reducing the importance of notifications while a chat is displayed #451 2019-01-29 14:34:46 +01:00
Angelo Fuchs a6b35b2a87 removed obsolete code #451 2019-01-29 14:02:52 +01:00
Angelo Fuchs 37cf7e5a91 Merge pull request #680 from deltachat/groupicon closes #669
fix group-indicator display on searching for contacts and messages
2019-01-29 13:44:58 +01:00
B. Petersen 5f3fadf606 fix group-indicator display on searching for contacts and messages, closes #669 2019-01-29 00:07:54 +01:00
björn petersen 822bc6d6ae Merge pull request #678 from deltachat/new_issue_template
changed the wording of the issue template
2019-01-28 22:17:05 +01:00
Angelo Fuchs 4be731ac7b changed the wording of the issue template to improve the perception of what goes where 2019-01-28 22:14:38 +01:00
björn petersen 79952e4ffa Merge pull request #667 from deltachat/selfstatus
adapt signature handling to new core behavior
2019-01-28 16:29:27 +01:00
B. Petersen 04be5a4812 doc 2019-01-28 11:55:58 +01:00
B. Petersen b40b6a751a add standards.md from old repo here to satisfy some links. in general, the file should be moved to core or spec, however 2019-01-27 17:31:25 +01:00
B. Petersen 137e19639a add swedish language 2019-01-27 00:48:07 +01:00
B. Petersen a33e1d6372 update translations 2019-01-27 00:38:29 +01:00
B. Petersen b2b4a618f9 Update messenger-backend submodule. 2019-01-27 00:34:08 +01:00
holger krekel a8b400f6a2 Merge pull request #670 from deltachat/updatescreenshot
update screenshots in README.md
2019-01-26 15:09:45 +01:00
B. Petersen 1e5869bc35 update screenshots in README.md 2019-01-26 14:28:53 +01:00
B. Petersen c10a26dca0 adapt signature handling to new core behavior 2019-01-26 00:21:54 +01:00
Angelo Fuchs b47934d874 Merge pull request #659 from deltachat/fix423
read display-name from the database, not from the application-preference closes #423
2019-01-25 18:05:55 +01:00
Angelo Fuchs e1afe1bbbe Merge pull request #660 from deltachat/fix657
tweak buttons in the add-group activity
2019-01-25 15:21:49 +01:00
B. Petersen 2d961112b1 make the buttons in the add-group screenmultiline, set to same height, make as wide as possible and needed 2019-01-25 00:11:28 +01:00
B. Petersen 5afb3ecb5f read display-name from the database, not from the application-preference 2019-01-24 23:20:49 +01:00
Angelo Fuchs d14bd45e36 Merge pull request #658 from deltachat/tweak-gradle
use defaults if gradle.properties does not set the DC_* keystore values
2019-01-24 15:09:55 +01:00
B. Petersen b2a70dbbda use defaults if gradle.properties does not set the DC_* keystore values 2019-01-24 15:01:40 +01:00
B. Petersen c5bf2cd00d fix missing reference introduced by removing Google location stuff 2019-01-23 18:02:21 +01:00
B. Petersen a5ee105c00 comment 2019-01-23 17:42:47 +01:00
björn petersen 59744875ad Merge pull request #648 from deltachat/fdroid
changes for f-droid
2019-01-23 17:40:43 +01:00
B. Petersen e98b4236f0 smarter handling of key-files 2019-01-23 17:32:18 +01:00
B. Petersen 36492f70a0 remove dead code 2019-01-23 15:12:15 +01:00
B. Petersen 8a2822c7ab correct applicationId to statisfy fdroid; internally, the .beta suffix is always needed 2019-01-23 15:12:15 +01:00
B. Petersen 7e4c38a057 use only one default flavor 2019-01-23 15:12:15 +01:00
B. Petersen 04fd5cbf4d remove play service dependencies 2019-01-23 15:12:14 +01:00
B. Petersen 94c1148ada remove unused maven repo 2019-01-23 15:12:14 +01:00
B. Petersen 2958cecd18 remove suspicious url 2019-01-23 15:12:14 +01:00
B. Petersen 3b1f389797 remove unused mavenLocal() 2019-01-23 15:12:13 +01:00
B. Petersen 1d483f78bf use standard button and avoid another maven dependency 2019-01-23 15:12:13 +01:00
B. Petersen 6afcf1b4bb get ShortcutBadger from std. maven repo 2019-01-23 15:12:13 +01:00
B. Petersen 35ea8933d6 get PhotoView from jitpack.io maven repo 2019-01-23 15:12:12 +01:00
B. Petersen 2c46940d12 remove unused maven repos 2019-01-23 15:12:12 +01:00
B. Petersen 446055bfe9 changelog 2019-01-23 12:43:18 +01:00
björn petersen 9e49d1ddf5 Merge pull request #646 from deltachat/attachment-layout
swap hidden-location and file button for a smoother layout
2019-01-23 11:57:26 +01:00
björn petersen efd92dde8a Merge pull request #650 from deltachat/doc
just some doc
2019-01-23 11:57:10 +01:00
B. Petersen d156c7652a doc 2019-01-23 01:34:38 +01:00
B. Petersen 636d69f07f swap hidden-location and file button for a smoother layout 2019-01-22 22:06:19 +01:00
björn petersen 8706879bc8 Merge pull request #643 from deltachat/reduce_notification
reduces the noise of #451 by waiting 20 seconds for the second bleep …
2019-01-22 21:40:15 +01:00
björn petersen af080a6328 Merge pull request #645 from deltachat/hide_share_location
Hide share location
2019-01-22 21:38:10 +01:00
Angelo Fuchs fe573f51d6 for #414 hiding the location with better layout 2019-01-22 20:00:39 +01:00
Angelo Fuchs 6f6efc7a5a for #414 hiding the location 2019-01-22 19:58:11 +01:00
Angelo Fuchs 0954705964 Revert "first action for #414 remove all the location things."
This reverts commit 7e7a5560ef.
2019-01-22 19:49:37 +01:00
Angelo Fuchs 0b9cfac05e reduces the noise of #451 by waiting 20 seconds for the second bleep if many messages come at once. 2019-01-22 15:25:28 +01:00
björn petersen d2351e8675 Merge pull request #642 from deltachat/minor_string_changes
Minor string changes
2019-01-22 15:09:08 +01:00
Angelo Fuchs 590d7852b0 toned down language of certianity for the screenshot blocking. closes #641 2019-01-22 14:49:09 +01:00
Angelo Fuchs 9dfd2c05a7 added info for translators to make things clear in the UI. closes #417 2019-01-22 14:33:37 +01:00
Angelo Fuchs c907bc008f changed text to 'Signature' closes #416 2019-01-22 14:31:20 +01:00
Angelo Fuchs 7e7a5560ef first action for #414 remove all the location things. 2019-01-22 14:08:34 +01:00
Angelo Fuchs 170b0d86c3 replaced constant value with proper constant from original source. #417 2019-01-22 12:14:52 +01:00
B. Petersen 85253fd051 update logo, tackles #444 2019-01-22 02:44:14 +01:00
B. Petersen 0529c85033 add option to add a static certificate to the tools directory, ignore keyfiles, tackles #444 2019-01-22 02:36:29 +01:00
B. Petersen c067c2b700 remove '-dev' suffix from names, tackles #444 2019-01-22 02:34:42 +01:00
björn petersen b0d7421458 Update CHANGELOG.md 2019-01-22 02:05:13 +01:00
B. Petersen 8211d494da add initial CHANGELOG.md 2019-01-22 02:03:11 +01:00
B. Petersen 1e1ad2a20a Update messenger-backend submodule. 2019-01-22 00:32:57 +01:00
B. Petersen 600828e1f6 change deltachat-android-ii to deltachat-android; fix some lineend 2019-01-21 23:55:22 +01:00
Daniel 91be337fb6 Infoboxes look weird closes #248 (#259) 2019-01-21 14:44:46 +01:00
björn petersen 729a05ba51 Merge pull request #258 from deltachat/apkdiff
move apkdiff.py to tools directory
2019-01-21 14:32:52 +01:00
B. Petersen bae2ffc3e1 move apkdiff.py to tools directory 2019-01-21 12:32:12 +01:00
björn petersen 70ec08c5fb Update f-droid.md 2019-01-20 23:30:29 +01:00
B. Petersen 896a511473 add some info wrt f-droid handling 2019-01-20 23:17:33 +01:00
B. Petersen f795ea28e2 add release checklist 2019-01-20 22:12:52 +01:00
björn petersen 10a8cadb0f Merge pull request #255 from Ampli-fier/master
added menu_deaddrop_subtitle string
2019-01-19 22:26:14 +01:00
björn petersen edee850d8d Merge pull request #256 from chklump/Issue_#252
'OK' button in select-background enabled initially.
2019-01-19 22:22:46 +01:00
chklump 3db7466bd8 'OK' button in select-background is initially enabled doing nothing if background isn't changed 2019-01-19 18:57:55 +01:00
Ampli-fier d979c02e45 added menu_deaddrop_subtitle string 2019-01-19 17:53:45 +01:00
Ampli-fier 47d88e6372 Merge pull request #1 from deltachat/master
Updates from the master-root
2019-01-19 16:27:12 +01:00
florianhaar 00791843a9 Merge pull request #251 from deltachat/correctmenu
correct titles for 'OK' buttons
2019-01-18 14:44:03 +01:00
B. Petersen 1707a1d61b correct titles for 'OK' buttons, esp. for landscape mode, where they may become visible 2019-01-18 14:33:23 +01:00
florianhaar c534cc35e2 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2019-01-18 12:58:58 +01:00
florianhaar 258e885186 use ok/cancel for the login screen #225 2019-01-18 12:57:59 +01:00
daniel.boehrs 1dfc392a2c support mailto links from external apps #235 2019-01-18 11:01:33 +01:00
B. Petersen 87241bf620 Update messenger-backend submodule. 2019-01-18 02:57:00 +01:00
B. Petersen e3b15d9dbf allow entering ssl/startls flags for imap and smtp connection, closes #179 2019-01-18 02:54:21 +01:00
B. Petersen 0244d9c57f allow reverting input from registration-form, do not trim passwords and user names, tackles #179 2019-01-18 01:56:28 +01:00
B. Petersen b304e9b1bd allow settings a separate password for the smtp-server, tackles #179 2019-01-18 01:46:14 +01:00
B. Petersen fa35dfca66 remove ok-animation from profile (we're using such animations nowhere) 2019-01-18 01:00:10 +01:00
B. Petersen 63aff154fc tweak 'no messages' hint for self-chat, tackles #238 2019-01-17 16:11:06 +01:00
B. Petersen a8ee346d33 comment, closes pr #236 2019-01-17 11:52:10 +01:00
B. Petersen 850b535ff3 update translations 2019-01-16 23:38:15 +01:00
björn petersen aac62627f4 Merge pull request #234 from adbenitez/master
swapped commentaries
2019-01-16 22:20:56 +01:00
Asiel Díaz Benítez 4b0816a083 Update strings.xml 2019-01-16 15:47:52 -05:00
B. Petersen bb83c038a5 bump version 2019-01-16 18:55:45 +01:00
B. Petersen c785da3484 update translations 2019-01-16 18:33:09 +01:00
B. Petersen d7322f99d4 Update messenger-backend submodule. 2019-01-16 18:32:06 +01:00
B. Petersen e593890317 option to start a new chat from profile view, closes #232 2019-01-16 16:00:13 +01:00
B. Petersen fb5e1b633a ask before copying to clipboard for urls 2019-01-16 15:51:33 +01:00
B. Petersen 1031826382 ask before copying to clipboard 2019-01-16 15:46:47 +01:00
B. Petersen 13760a0ade do not cancel action-mode when actions are cancelled 2019-01-16 14:22:19 +01:00
B. Petersen 25c50c13b7 use default back-icons for action-modes 2019-01-16 13:50:01 +01:00
B. Petersen d53099eaa7 tweak select all ux 2019-01-16 13:38:10 +01:00
B. Petersen ec6fb9ac16 update translations 2019-01-16 00:52:06 +01:00
B. Petersen abad685f22 update translations 2019-01-16 00:39:27 +01:00
B. Petersen ef02f5a667 refined system messages 2019-01-16 00:29:26 +01:00
B. Petersen 77889ac2d6 show error if oneself is not in group 2019-01-16 00:25:26 +01:00
B. Petersen 2edbc38190 update translations 2019-01-15 14:50:43 +01:00
B. Petersen ceec16c9d5 bump version 2019-01-15 13:37:13 +01:00
B. Petersen b4a365b880 Update messenger-backend submodule. 2019-01-15 13:33:42 +01:00
B. Petersen 9e1b731dc9 mark verified groups as being experimental 2019-01-15 12:59:13 +01:00
B. Petersen b6fa7d0c6b tone down verification wording 2019-01-15 01:35:53 +01:00
B. Petersen 779457aa65 Update messenger-backend submodule. 2019-01-14 22:39:26 +01:00
B. Petersen 9bb8009e14 disable message-trimming options for now 2019-01-14 22:39:03 +01:00
B. Petersen 49f3c0de99 email-links in messages can start new chat, closes #216 2019-01-14 17:49:17 +01:00
B. Petersen f105ec4861 tweak date and archive display 2019-01-14 17:16:43 +01:00
daniel.boehrs 17900f1bf4 gallery should show sender, not groupname #206 2019-01-14 16:22:57 +01:00
daniel.boehrs 1c5e8445c9 show the extension beside the size of attachments #153 2019-01-14 15:32:56 +01:00
daniel.boehrs 05a497e558 Copy email to clipboard not working on profile view #199 2019-01-14 15:08:49 +01:00
B. Petersen 0ac0d399a0 bump version 2019-01-14 14:52:27 +01:00
B. Petersen 153214cfe9 update translations 2019-01-14 14:52:20 +01:00
B. Petersen 5c8db78657 Update messenger-backend submodule. 2019-01-14 14:33:42 +01:00
B. Petersen d30f9d1540 unify progresss dialog 2019-01-14 12:04:54 +01:00
B. Petersen 127a1c0023 allow qr-code-scanning during group creation, fixes #229 2019-01-14 01:24:24 +01:00
B. Petersen 684028d126 remove dead ADD_CONTACT code 2019-01-14 00:59:51 +01:00
B. Petersen 1dabac1b21 simplify selected-messages-action menu 2019-01-13 13:31:25 +01:00
B. Petersen df19ecb029 less flickering of action bar icons 2019-01-13 13:14:48 +01:00
B. Petersen 136b6ac483 scroll down after message-object is really added to list, closes #209 2019-01-13 02:35:03 +01:00
B. Petersen 31c9f720b1 add counter to contact selection, closes #226, tackles #37 2019-01-13 01:35:22 +01:00
B. Petersen 049918f491 show clearer error text when trying to delete members with ongoing chats, tackles #220 2019-01-13 01:10:06 +01:00
B. Petersen 54268ef699 allow canceling add-member-dialog 2019-01-13 01:09:21 +01:00
B. Petersen 84689b6740 use ok/cancel buttons on adding members, closes #224 2019-01-13 00:40:55 +01:00
B. Petersen 5c4329b104 remove dead code 2019-01-12 14:22:15 +01:00
B. Petersen ed3e804016 scale down images on sending, closes #168 2019-01-12 01:43:47 +01:00
B. Petersen 940720ef6b tweak strings 2019-01-11 23:01:54 +01:00
B. Petersen d631bab275 update translations 2019-01-11 22:03:09 +01:00
B. Petersen ddfd1eb006 remove unused colors 2019-01-11 15:54:15 +01:00
B. Petersen 6e7cd9f317 update date color 2019-01-11 15:52:41 +01:00
björn petersen abc8ca41a2 Merge pull request #212 from deltachat/qrnormalchat
show qr-invite code also for normal chats
2019-01-11 15:14:42 +01:00
B. Petersen 348f87b6a8 update translations 2019-01-11 15:13:46 +01:00
B. Petersen b31a623822 better appreviations in date strings 2019-01-11 11:53:24 +01:00
björn petersen 426de7f0cd Merge pull request #223 from deltachat/msgdate
show date beside time
2019-01-11 11:46:36 +01:00
B. Petersen 43e2d1015e instead of a flickering date header, show relative date beside time for older messages 2019-01-11 11:35:24 +01:00
B. Petersen dde56cb4d2 fix date display for chats without messages, closes #221 2019-01-11 01:00:29 +01:00
B. Petersen 7aad188885 prepare image recoding, tackles #168 2019-01-10 23:08:39 +01:00
B. Petersen 89c0d3cd06 use lower voice-message bitrate for testing, closes #218 2019-01-10 22:07:19 +01:00
B. Petersen 06d61b44b2 add hint to the solid/attr issue, tackles #219 2019-01-10 21:30:57 +01:00
B. Petersen 7dd0d0a75a simplify RationaleDialog and avoid usage of soldid/attr, tackles #215 2019-01-10 16:21:58 +01:00
B. Petersen d39dfd01e0 tweak archived-background color, tackles #219 2019-01-10 15:56:14 +01:00
Angelo Fuchs 9537389e4e #219 removing attr because pre-lollipop androids can't handle it here 2019-01-10 15:37:50 +01:00
Angelo Fuchs 4e5e81d0e7 #219 removing attr because pre-lollipop androids can't handle it here 2019-01-10 14:40:56 +01:00
B. Petersen 719f8d8047 show date when timestamp deviates, closes #116 2019-01-10 00:29:39 +01:00
B. Petersen 4906d62e7e Update messenger-backend submodule. 2019-01-10 00:26:05 +01:00
B. Petersen 644fc96198 use sort-timestamp for displaying date-headlines, fixes #217 2019-01-09 23:44:10 +01:00
B. Petersen f3af49ce24 Update messenger-backend submodule. 2019-01-09 23:42:56 +01:00
B. Petersen dcc6467291 simplify dialogs 2019-01-09 23:34:49 +01:00
B. Petersen da1844fb6f update translations 2019-01-09 16:07:59 +01:00
björn petersen 197bdefa63 Merge pull request #213 from deltachat/nomultidex
remove multidex
2019-01-09 13:22:27 +01:00
B. Petersen e250bb1460 multidex is now unneeded; remove it 2019-01-09 13:16:50 +01:00
B. Petersen 143963c2a9 update translations 2019-01-09 02:08:16 +01:00
B. Petersen 3e79719ac4 fix random crashes when events come when the context is not available 2019-01-09 01:31:00 +01:00
B. Petersen 9ff2e8839d show qr-invite code also for normal chats, tune-down verify wording a bit 2019-01-08 18:06:47 +01:00
B. Petersen c1850588ef be a bit more carful with wrong positions 2019-01-08 12:41:30 +01:00
björn petersen f61f1f153b Merge pull request #210 from deltachat/issue-100
Reduce JNI calls for #100
2019-01-08 12:36:37 +01:00
daniel.boehrs a63cd2746b Reduce JNI calls for #100 2019-01-08 10:12:09 +01:00
daniel.boehrs 096d9ca801 Hotfix for broken translation 2019-01-08 09:17:12 +01:00
B. Petersen 77d7c8e3b7 call markseen() for the messages in view only after and every 800ms 2019-01-08 01:26:51 +01:00
B. Petersen 34597a086e mark messages as seen as they scroll into view, tackles #100 2019-01-08 01:15:55 +01:00
B. Petersen d2e6d843ab remove dead code 2019-01-08 01:09:53 +01:00
B. Petersen 8ddf6cba65 remove marking whole chat as seen; only single messages are marked as seen when they scroll into view 2019-01-07 18:00:50 +01:00
daniel.boehrs a672aa02dd Creating Backup doesn't work on older phones #208 2019-01-07 13:52:03 +01:00
B. Petersen fc736cf612 show correct image borders for 'forwarded messages' on sender site 2019-01-07 13:37:48 +01:00
B. Petersen 58dc5b3881 space between sender name and text, tackles #170 2019-01-07 00:19:31 +01:00
B. Petersen 510c320f79 update translations 2019-01-06 23:02:52 +01:00
B. Petersen dabc0760ee mark forwarded messages as such, closes #74 2019-01-06 22:52:58 +01:00
björn petersen 5d01ac1c63 Merge pull request #207 from chklump/Issue_#47
Initialize the ContactSelectionListFragment from the SelectedRecipientsAdapter, tackles #47
2019-01-06 22:15:02 +01:00
chklump 27c6c3ab69 * Initialize the ContactSelectionListFragment from the SelectedRecipientsAdapter intead of from the initial group, so repeated opening, selecting and deselecting, closing cycles of the ContactMultiSelectionActivity show correct behaviour. 2019-01-06 14:38:07 +01:00
chklump e8e100a72e * Initialize the ContactSelectionListFragment with the selection from GroupCreateActivity, tackles #47.
* If contact is unselected in ContactSelectionListFragment, which was previously in the group, delete it from GroupCreateActivity, also.
2019-01-06 14:19:51 +01:00
B. Petersen 746ec37d97 bump version 2019-01-05 15:14:42 +01:00
B. Petersen 750f5ea03f nice voice-message layout 2019-01-05 15:10:52 +01:00
B. Petersen ef88256411 Update messenger-backend submodule. 2019-01-05 14:58:45 +01:00
B. Petersen 2c825d4659 update translations 2019-01-05 14:58:31 +01:00
B. Petersen 1dce4fed21 re-layout voice-messages, make them work again 2019-01-05 02:50:55 +01:00
B. Petersen ea7e89a290 add new camera-attach icon 2019-01-05 00:05:22 +01:00
B. Petersen 555ff6469d resort attach icons 2019-01-05 00:04:51 +01:00
B. Petersen 4339d80750 recolor and sort attachment icons 2019-01-04 23:49:06 +01:00
B. Petersen ea64b69437 less round corners in gallery-thumbnail-overview 2019-01-04 22:53:39 +01:00
B. Petersen b11b631426 faster search feedback 2019-01-04 22:27:16 +01:00
B. Petersen 6df76f54e2 image-edit-button in fab-style, tackles #203 2019-01-04 21:59:51 +01:00
B. Petersen 04e9dc0aec remove dead code 2019-01-04 18:38:47 +01:00
B. Petersen b2b9042fe0 typo 2019-01-04 18:10:43 +01:00
B. Petersen 90527b2373 bring the record-fab-button to foreground 2019-01-04 18:08:57 +01:00
B. Petersen 7ac37246bf update sources 2019-01-04 17:21:08 +01:00
B. Petersen 4e7e377704 add a script to pull the source from transifex (when modified eg. from desktop) 2019-01-04 17:17:34 +01:00
B. Petersen d14e59afae add hundredths to voice-recorder elapsed-time-display 2019-01-04 17:06:31 +01:00
B. Petersen 5dfc44b1dc style voice-message recording, tackles #172 2019-01-04 16:37:56 +01:00
B. Petersen dfaed72262 update translations 2019-01-04 14:31:49 +01:00
B. Petersen ee8ba0a5a5 add border below staged-image, tackles #203 2019-01-04 01:32:28 +01:00
B. Petersen 828dfd24a1 enlarge edit button, tackles #203 2019-01-04 01:12:03 +01:00
B. Petersen 502bed2f72 enlage preview from attachment staging area, fixes #202 2019-01-04 00:32:45 +01:00
B. Petersen 0d2a895057 correct bottom-borders for image-bubbles, tackles #170 2019-01-04 00:07:46 +01:00
B. Petersen 9635135e90 do not fade image bottoms to black, tackles #170 2019-01-03 19:24:16 +01:00
B. Petersen 2184d898f6 set correct delivery/lock icon colors, tackles #170 2019-01-03 17:41:39 +01:00
B. Petersen b780a9e783 simplify bubble-radius (0 is just not allowed ...) 2019-01-03 17:26:21 +01:00
B. Petersen 9fd74e71f0 sharpen bubble 2019-01-03 17:07:47 +01:00
B. Petersen 8236fdbce5 show date in mixed case 2019-01-03 15:50:05 +01:00
B. Petersen 25b6f2d477 update translations 2019-01-03 15:34:55 +01:00
B. Petersen fd9911c441 unify relative-time-strings 2019-01-03 15:29:40 +01:00
B. Petersen 1d861274e2 adjust bubble borders, tackles #170 2019-01-03 02:42:30 +01:00
B. Petersen 89824df0b9 improve inner-bubble layout, padding and line-spacing, tackles #170 2019-01-03 01:58:46 +01:00
B. Petersen 7b09020afd test subtitle for contact-requests 2019-01-03 01:19:56 +01:00
B. Petersen 855e3c5c3e allow multi-select on contact-requests, fixes #193 2019-01-03 01:10:02 +01:00
B. Petersen bd7cbf89f0 update translations 2019-01-03 00:52:34 +01:00
B. Petersen 26976aa541 clearify string 2019-01-03 00:32:03 +01:00
björn petersen 9dad64ae57 Merge pull request #198 from deltachat/getmedia
include GIF to gallery
2019-01-03 00:25:43 +01:00
B. Petersen bd2f763f22 Update messenger-backend submodule. 2019-01-03 00:25:22 +01:00
B. Petersen 181bb77c67 include GIF to gallery, adapt to new API, fixes #197 2019-01-02 16:47:53 +01:00
B. Petersen 535d61e64c update translations 2019-01-01 15:14:42 +01:00
B. Petersen 694ddebf57 bump version 2018-12-28 01:16:19 +01:00
B. Petersen efdf608484 Update messenger-backend submodule. 2018-12-28 01:13:08 +01:00
B. Petersen ed9ca3cbb4 bump version 2018-12-25 01:33:34 +01:00
B. Petersen 42556e5e32 Update messenger-backend submodule. 2018-12-24 02:34:51 +01:00
björn petersen 63217c943f Merge pull request #191 from deltachat/happyuser4
Happyuser4
2018-12-24 02:34:22 +01:00
B. Petersen 28ace84c32 fix joining a normal mailto:-qr-code 2018-12-24 02:00:08 +01:00
B. Petersen 8fa32cc4f7 refine preference ux 2018-12-24 01:51:38 +01:00
B. Petersen 4582b76e92 warn before disable-folder-watching, mainly to avoid accidential taps 2018-12-23 14:56:29 +01:00
B. Petersen 66ea30f75e make new folder options work 2018-12-23 02:38:33 +01:00
B. Petersen 87192dca99 update translations 2018-12-23 02:09:49 +01:00
B. Petersen 35e449b048 wording 2018-12-22 00:21:42 +01:00
daniel.boehrs 90775da352 Endless loop when enabling screen lock option #181 2018-12-21 13:08:16 +01:00
daniel.boehrs 3a7686471a call "markseen" on messages scrolled into view #100 2018-12-21 11:01:26 +01:00
B. Petersen 13765df3ee add options to watch inbox and sentbox 2018-12-21 00:34:45 +01:00
B. Petersen f01b67c07b update translations 2018-12-20 22:29:39 +01:00
B. Petersen 756f36101f note that the heuristic part is not yet implemented 2018-12-20 17:28:33 +01:00
B. Petersen b46bc99aad add mvbox options, remove forcing e2ee 2018-12-20 17:19:50 +01:00
B. Petersen d593096d92 show version number more visible 2018-12-20 16:36:06 +01:00
B. Petersen 354fea7da2 Update messenger-backend submodule. 2018-12-20 16:13:03 +01:00
B. Petersen 9f6a26713c Update messenger-backend submodule. 2018-12-20 02:20:47 +01:00
B. Petersen fe89841407 bump version 2018-12-20 02:20:33 +01:00
B. Petersen 698763c544 Update messenger-backend submodule. 2018-12-20 01:44:35 +01:00
B. Petersen 8f540d01fa add dc_move.c 2018-12-20 01:44:20 +01:00
B. Petersen 4d12385cb7 update translations 2018-12-20 00:19:04 +01:00
B. Petersen 7962e880ef update translations 2018-12-19 02:49:36 +01:00
B. Petersen d752a111fc update translations 2018-12-18 21:32:52 +01:00
björn petersen 5e8c20e30f Merge pull request #178 from adbenitez/master
fixed qrshow_join_contact_hint on strings.xml
2018-12-18 21:18:55 +01:00
Asiel Díaz Benítez a70b1be603 fixed qrshow_join_contact_hint on strings.xml 2018-12-18 14:48:38 -05:00
B. Petersen 3bde0cbe78 Update messenger-backend submodule. 2018-12-18 00:24:22 +01:00
B. Petersen 6544b221fd bump version 2018-12-17 23:41:42 +01:00
B. Petersen 40675fa774 remove SIGNAL_* buildConfigField's 2018-12-17 23:41:22 +01:00
B. Petersen 60d79021bf Update messenger-backend submodule. 2018-12-17 23:33:10 +01:00
B. Petersen 7cda8c0101 update translations 2018-12-17 20:14:09 +01:00
B. Petersen 7bafff0ba7 Update messenger-backend submodule. 2018-12-17 20:12:42 +01:00
B. Petersen 5529acf36b remove language_name string resource, closes #177 2018-12-17 20:02:41 +01:00
björn petersen 0f6d5e3dcd Merge pull request #174 from deltachat/happyuser
adapt to new mvbox api
2018-12-17 16:55:02 +01:00
B. Petersen 71f4a55a0d Update messenger-backend submodule. 2018-12-17 16:53:43 +01:00
B. Petersen 75dc1e1527 adapt to new mvbox api 2018-12-17 16:28:35 +01:00
björn petersen e663df903e Merge pull request #176 from adbenitez/master
Fixed ask_block_contact and ask_unblock_contact
2018-12-17 16:27:52 +01:00
Asiel Díaz Benítez f1513f7e47 Fixed ask_block_contact and ask_unblock_contact
Just removed the "calls" stuff and fixed some previous accidental removal while trying to fix this same issue.
2018-12-17 09:52:31 -05:00
Florian Haar fd36ceb847 right align lock/time/deliveryInfo in images #99 fix 2018-12-17 14:51:28 +01:00
B. Petersen 6fde63f0b2 wording, tackles #74 2018-12-17 14:06:07 +01:00
Florian Haar ed6fabe99f Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-12-17 14:02:13 +01:00
Florian Haar 1876e56e23 right align lock/time/deliveryInfo in images #99 2018-12-17 14:00:41 +01:00
daniel.boehrs 3122759c91 Fixed transitions #147 2018-12-17 13:13:50 +01:00
daniel.boehrs 19f5a54ad2 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-12-17 11:29:28 +01:00
daniel.boehrs 1c6b7fe58f share with Delta #147 #74 2018-12-17 11:29:18 +01:00
Florian Haar 880421fd6f Status Text in Settings can not be empty #156 2018-12-17 10:35:36 +01:00
daniel.boehrs a73a7b28de HOTIFX Fix broken build due to HTML tags inside translation file 2018-12-17 10:10:12 +01:00
B. Petersen bd8217196f update translations 2018-12-16 21:48:48 +01:00
B. Petersen 54140476bf update translations 2018-12-16 21:47:52 +01:00
B. Petersen 78fa449e99 add italian language 2018-12-15 15:20:41 +01:00
B. Petersen a7f26560fe update translations 2018-12-15 15:11:53 +01:00
B. Petersen fb14484944 update translations 2018-12-15 04:01:02 +01:00
B. Petersen ed30a16cc3 remove html constraints from source strings 2018-12-15 00:59:13 +01:00
björn petersen 3136245693 Merge pull request #173 from ralphtheninja/master
Fix typo
2018-12-15 00:17:35 +01:00
Lars-Magnus Skog 98e42e6208 Fix typo 2018-12-14 23:59:56 +01:00
B. Petersen d7e29abce6 update translations 2018-12-14 23:57:35 +01:00
B. Petersen fbefdcf127 simplify ThreadRecord 2018-12-14 23:46:51 +01:00
B. Petersen a26f48f4f3 fix typos in source strings 2018-12-14 22:17:21 +01:00
B. Petersen 96d2a69fdb update translations 2018-12-14 21:51:04 +01:00
B. Petersen 10ec1cad26 fix wording 2018-12-14 21:38:55 +01:00
B. Petersen ad0da65727 update translations, add danks 2018-12-14 17:26:14 +01:00
B. Petersen a4c0f62005 refine some wordings, tackles https://github.com/deltachat/deltachat-desktop/issues/423 2018-12-14 17:14:22 +01:00
B. Petersen 8c1fbc0ae9 remove dead code 2018-12-13 16:37:02 +01:00
B. Petersen 3b193c35d9 Update messenger-backend submodule. 2018-12-13 15:09:20 +01:00
B. Petersen aab44755aa add 'dev' to app_name (was removed by reworking strings, we do not want temporary names in the tx repos) 2018-12-13 15:08:55 +01:00
B. Petersen 582b5d035b bump version 2018-12-13 15:02:32 +01:00
B. Petersen 4458577927 colored sender names in groups, tackles #170 2018-12-13 14:57:40 +01:00
B. Petersen cdf2aad98e simplify color handling 2018-12-13 14:41:32 +01:00
B. Petersen 6bc11ed1c0 simplify Recipient handling 2018-12-13 14:08:41 +01:00
B. Petersen c09333d5d6 use delta colors for the avatars in the notification area, remove dead code wrt colors 2018-12-13 13:27:53 +01:00
B. Petersen b9c43c7b6a update translations 2018-12-13 02:45:36 +01:00
B. Petersen 0401b2a0d9 clearify add-language instructions 2018-12-13 02:44:44 +01:00
B. Petersen 2ceb5e11bf update translations 2018-12-13 02:39:23 +01:00
B. Petersen 3d9345ed87 typo 2018-12-13 01:58:42 +01:00
B. Petersen 5af3284e06 add script to add a new language and base scripts to be called from the repo root 2018-12-13 01:55:07 +01:00
B. Petersen bc987a4591 Update messenger-backend submodule. 2018-12-13 01:54:12 +01:00
B. Petersen f3366681d0 add missing core-strings 2018-12-12 23:12:49 +01:00
B. Petersen 0ad2916bcf pimp search results 2018-12-12 21:23:32 +01:00
B. Petersen e4c564ace4 adjust app name, init transifex 2018-12-12 18:10:26 +01:00
björn petersen e90ab537d3 Merge pull request #171 from deltachat/transl
rework translations
2018-12-12 17:56:46 +01:00
B. Petersen defac037de rework strings 2018-12-12 17:55:08 +01:00
B. Petersen 33f07b584b remove unused strings and ids, remove translations for now 2018-12-11 23:31:58 +01:00
B. Petersen 6efbd89674 remove unused share menu; for creation of a new chat, the known floating button should be used 2018-12-11 22:49:49 +01:00
B. Petersen c7e37d153d set correct locale in share activity fragment, fixes crash in #147 2018-12-11 22:41:22 +01:00
B. Petersen 2021979d8e remove unused resources: styles 2018-12-11 22:11:42 +01:00
B. Petersen 5b8383dac3 remove dead code and unused resources wrt group creation 2018-12-11 21:55:09 +01:00
B. Petersen 0b05b954f7 remove unused resources: colors, authenticator, dimensions 2018-12-11 21:35:07 +01:00
B. Petersen 0376acb5ae remove unused google playstore strings 2018-12-11 21:34:25 +01:00
B. Petersen 17dc8cebca remove unused resources detected by lint 2018-12-11 16:45:09 +01:00
B. Petersen 33747e7a41 remove unused resources detected by lint 2018-12-11 14:49:32 +01:00
B. Petersen 99b1703097 remove unused resources detected by lint 2018-12-11 14:22:22 +01:00
B. Petersen a14547ce42 remove unused resources: message refresh 2018-12-11 14:11:25 +01:00
B. Petersen d682084542 remove unused resources: videocam 2018-12-11 14:04:08 +01:00
B. Petersen 9813f01da8 remove unused resources: block, visibility, misc 2018-12-11 13:54:46 +01:00
B. Petersen 27cfc39786 remove unused resources: menu, face 2018-12-11 13:38:54 +01:00
B. Petersen 86914bf4fc remove unused resources: dashboard, devices 2018-12-11 13:10:09 +01:00
B. Petersen 1f9bd90eae remove unused resources: textsms, laptio, video splash, message, signal 2018-12-11 13:05:11 +01:00
B. Petersen 9edbc23207 remove unused resources: document download button 2018-12-11 11:36:38 +01:00
B. Petersen e425533d68 remove unused resources: bluetooth, fingerprint, database, transfer controls 2018-12-11 11:30:52 +01:00
B. Petersen 451f03a6a8 remove unused resources: lockscreen, dialpad, profile splash 2018-12-11 11:19:38 +01:00
B. Petersen 1c76562fc6 remove unused resources: timer, call icons 2018-12-11 11:13:02 +01:00
B. Petersen 94592d46ae remove dead code 2018-12-11 02:56:26 +01:00
B. Petersen a02dde5d51 remove unused resources 2018-12-11 01:40:57 +01:00
B. Petersen 73359fba7d cleanup gradle 2018-12-11 01:12:26 +01:00
B. Petersen f65ac4d604 remove unused squareup/dagger and okhttp dependencies 2018-12-11 01:04:30 +01:00
B. Petersen a469713fbc remove dependency to signal-protocol, closes #138 2018-12-11 00:56:08 +01:00
B. Petersen c781f3b9a4 remove complicated dependencies for tiny appendInt() to array 2018-12-11 00:53:04 +01:00
B. Petersen 87e1937381 remove dependency to google's phonenumers library, tackles #138 2018-12-11 00:23:58 +01:00
B. Petersen cf45c566ba remove tiny dependency to spongycastle/bouncycastle 2018-12-11 00:02:48 +01:00
B. Petersen 612dab112c remove dead code 2018-12-10 23:55:58 +01:00
B. Petersen 1d7bf82b18 add logger from external source here 2018-12-10 23:12:08 +01:00
B. Petersen 55ca2d0ef6 use deltachat-yyyy-MM-dd-HHmmss as a fallback file name, closes #115 2018-12-10 22:30:22 +01:00
B. Petersen 3542455e2a bump version 2018-12-10 17:53:56 +01:00
B. Petersen 2217ce6788 add global information to log, closes #108 2018-12-10 17:36:50 +01:00
B. Petersen 6e48c126fa more logic appearance-preference-order 2018-12-10 17:16:22 +01:00
B. Petersen 177288a8d4 do not open unused deaddrop profile, closes #131 2018-12-10 17:11:58 +01:00
B. Petersen 229ede09f1 do not truncate text to sms-like-sizes, closes #169 2018-12-10 17:04:26 +01:00
B. Petersen e9de6f7e40 rework log handling, no log uploading to foreign servers, closes #119 2018-12-10 15:54:54 +01:00
B. Petersen ce0c181489 remove unused OkHttp 2018-12-10 02:15:31 +01:00
B. Petersen 4e73f4cd0a remove UpdateApk for now as it uses dependecies to signal-http we want to get rid of 2018-12-10 01:57:18 +01:00
B. Petersen 890052d018 remove HourglassView and other probably dead code 2018-12-10 01:28:55 +01:00
B. Petersen 46a7159c5a remove dead code and layouts, remove webrtc 2018-12-10 01:04:25 +01:00
B. Petersen cc94b66799 remove unneeded DisplayMode 2018-12-10 00:43:44 +01:00
B. Petersen 3e4bf6a4a7 remove curve25519 java-dependency 2018-12-10 00:14:20 +01:00
B. Petersen 5dfc54bd43 allow editing name of contact, closes #166 2018-12-10 00:07:58 +01:00
B. Petersen db99a1da6c show encryption info, closes #167 2018-12-09 23:54:52 +01:00
B. Petersen c3c110b55a remove dead code 2018-12-09 22:46:02 +01:00
B. Petersen 31d4e5260f add missing components to profile activity 2018-12-09 21:53:05 +01:00
B. Petersen 109d49668f use DcEventCenter in RecipientPreferenceActivity 2018-12-09 21:12:40 +01:00
B. Petersen 5f13330a8e set avatar-click-handler only if needed, tackles #30 2018-12-09 13:52:38 +01:00
B. Petersen 6503469686 remove unneeded LoaderManager indirection 2018-12-09 13:46:24 +01:00
B. Petersen 9acef33db9 hide unused items from contact profile, tackles #30 2018-12-09 13:22:20 +01:00
B. Petersen 70c44c3efc show contact profile on contact-avatar-click in groups, tackles #30 2018-12-09 12:53:01 +01:00
B. Petersen bb8d4b2ef9 remove sqlite dependency 2018-12-09 03:39:01 +01:00
B. Petersen efb0f31387 remove unneeded persistent jobs 2018-12-09 03:30:44 +01:00
B. Petersen 7fd90ca5d6 remove unneeded parameters from Job object 2018-12-09 03:22:11 +01:00
B. Petersen 9f01b780c7 Update messenger-backend submodule. 2018-12-09 03:06:35 +01:00
B. Petersen 2738251be9 do not create or use signal.db, closes #144 2018-12-09 03:03:14 +01:00
B. Petersen 2ecd6bed8d do not try to load MediaRecord from AttachmentDatabase 2018-12-09 02:50:55 +01:00
B. Petersen 858747149a remove dead code, forward reply-event 2018-12-09 02:43:15 +01:00
B. Petersen b166f1e4fd remove dead code 2018-12-09 02:33:41 +01:00
B. Petersen b34cbc2b88 remove PartDataSource 2018-12-09 02:15:11 +01:00
B. Petersen efb640fb91 remove unneeded PartProvider 2018-12-09 02:04:40 +01:00
B. Petersen db7fcf81d8 make video playback work, closes #152 2018-12-09 01:03:22 +01:00
björn petersen 87f887fe3f Merge pull request #157 from deltachat/clean_out_signal_database
[wip] Clean out signal database
2018-12-08 23:46:33 +01:00
B. Petersen 5da75c7dd0 remove AttachmentDatabase loadings from PartAuthority 2018-12-08 18:22:08 +01:00
B. Petersen a945e659f5 fix crash in MediaOverviewActivity 2018-12-08 18:21:30 +01:00
B. Petersen bcf460eefd Remove GroupDatabase, RecipientDatabase from DatabaseFactory 2018-12-08 17:50:16 +01:00
B. Petersen 496d7ea8a0 remove RecipientsAdapter and belonging functions 2018-12-08 16:35:48 +01:00
Angelo Fuchs 68a5d887c5 #138 removing ThreadDatabase and link from DatabaseFactory to MediaDatabase 2018-12-08 16:18:08 +01:00
Angelo Fuchs dc22c9ef22 #138 removing Mms and Sms Database 2018-12-08 16:18:07 +01:00
Angelo Fuchs 8588765dc7 #138 removing MmsSmsDatabase 2018-12-08 16:18:07 +01:00
B. Petersen f49226d335 tweak 'archived' label 2018-12-08 01:36:59 +01:00
daniel.boehrs 575c815c97 Sharing and forwarding to chats #74 #147 2018-12-07 13:33:47 +01:00
daniel.boehrs 392d6df2c8 Fixed typo 2018-12-07 10:31:32 +01:00
daniel.boehrs 911ed8919a Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-12-07 10:30:50 +01:00
daniel.boehrs 9dd344e6b7 implement "attach contact" #148 2018-12-07 10:30:08 +01:00
Florian Haar f31817c0a1 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-12-07 08:41:49 +01:00
Florian Haar 823217c593 Added default image as default on preferences screen #50 2018-12-07 08:41:21 +01:00
daniel.boehrs 8517570014 Removed patches folder #151 2018-12-07 08:22:48 +01:00
B. Petersen 155bcd42ea round borders for date/system messages 2018-12-06 20:25:51 +01:00
B. Petersen 245982d111 make date and system messages more visible, closes #98 2018-12-06 19:36:35 +01:00
B. Petersen 323ed1b79f adapt default background 2018-12-06 17:54:49 +01:00
B. Petersen 18b4363e83 remove dead code 2018-12-06 17:26:54 +01:00
B. Petersen f30a18422f set bubble foreground colors 2018-12-06 16:31:04 +01:00
B. Petersen d4f5732496 set bubble background color 2018-12-06 16:09:34 +01:00
B. Petersen ada9377a37 use new colors in profile 2018-12-06 15:16:34 +01:00
B. Petersen ef0eb15034 Update messenger-backend submodule. 2018-12-05 20:17:05 +01:00
björn petersen 71ac87c50e Merge pull request #158 from deltachat/colors
addapt to new color api
2018-12-05 20:16:37 +01:00
B. Petersen 84957ace38 addapt to new color api 2018-12-05 16:10:16 +01:00
B. Petersen 77f436c871 bump version 2018-12-04 15:26:19 +01:00
B. Petersen b8b94265a1 Update messenger-backend submodule. 2018-12-04 15:11:22 +01:00
Angelo Fuchs c80cca5cb9 #152 autodiscover unknown mimetypes. 2018-12-04 12:30:18 +01:00
B. Petersen 4a258ee155 remove dead code 2018-12-04 01:11:03 +01:00
B. Petersen e03a78d6a9 remove dead code 2018-12-04 01:00:29 +01:00
björn petersen 58a4bef619 Merge pull request #155 from deltachat/search
implement global search
2018-12-04 00:51:51 +01:00
B. Petersen 48b3982a9e make clicks on search result work 2018-12-04 00:50:54 +01:00
B. Petersen 83d42f689f move recipient dependency to local var 2018-12-04 00:18:37 +01:00
B. Petersen ec094dbd3d do search for chats, contacts, messages 2018-12-04 00:14:40 +01:00
B. Petersen d89540d798 adapt basic search functions 2018-12-03 19:22:30 +01:00
Angelo Fuchs 89355667c3 reformat at two spaces. 2018-12-03 15:02:55 +01:00
Angelo Fuchs fb6b30185d removing unused icon closes #154 2018-12-03 12:32:13 +01:00
B. Petersen c2bc362cb3 remove unneeded permission for global search, tackles #24 2018-12-03 04:22:24 +01:00
B. Petersen e7b2a63e39 remove dead database code 2018-12-03 01:22:49 +01:00
B. Petersen 9835021582 remove dead database code 2018-12-03 00:58:31 +01:00
B. Petersen a190897dfe handle image, gif, audio, video, document and text drafts, closes #73 2018-12-03 00:49:12 +01:00
B. Petersen a37dc03324 save complex draft, async draft saving+message sending 2018-12-01 19:00:29 +01:00
B. Petersen be30da8821 simplify checking for empty messages 2018-12-01 17:45:31 +01:00
B. Petersen 91a9363d20 remove separate sendTextMessage function 2018-12-01 17:35:56 +01:00
B. Petersen 5d235341f8 prepare for unique sendMessage function 2018-12-01 17:23:46 +01:00
B. Petersen eb1773799c remove one recusion on message sending 2018-12-01 16:07:57 +01:00
B. Petersen caef11536b correct logic error on filename generation 2018-12-01 09:48:22 +01:00
B. Petersen b641a72de4 remove even more dead contact sharing code 2018-12-01 00:49:31 +01:00
B. Petersen 5a530ca258 remove dead contact sharing code 2018-12-01 00:05:38 +01:00
B. Petersen f0a7f54025 group send-functions together 2018-11-30 23:32:32 +01:00
B. Petersen 5f159e1d4d cleanup ConversationActivity 2018-11-30 17:56:39 +01:00
B. Petersen 5aa526d979 remove unused dependency to pl.tajchert:waitingdots 2018-11-30 17:36:01 +01:00
B. Petersen 7879f9c22d remove unused apn database and tools 2018-11-30 16:50:27 +01:00
B. Petersen 17399f08e5 remove remaining giphy helpers, tackles #149 2018-11-30 16:02:43 +01:00
B. Petersen 868678b91d rearrange attach-buttons in attach-drawer so that the gap is less disturbing, tackles #149 2018-11-30 16:01:33 +01:00
B. Petersen ef11e1beb2 fill DcContact.getProfileImage() with life 2018-11-30 14:51:41 +01:00
B. Petersen d608f72599 Update messenger-backend submodule. 2018-11-30 14:00:18 +01:00
daniel.boehrs 3417cf428b remove giphy #149 2018-11-30 13:32:37 +01:00
B. Petersen 2a6609e76e Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-11-30 11:53:21 +01:00
B. Petersen 6f19f922c6 Update messenger-backend submodule. 2018-11-30 11:53:10 +01:00
daniel.boehrs ba7bedb789 Fix naming #148 2018-11-30 11:33:18 +01:00
daniel.boehrs df55c901f0 implement "attach contact" #148 2018-11-30 11:30:11 +01:00
B. Petersen f90d1d6306 remove dead code 2018-11-30 07:26:33 +01:00
björn petersen e7ba46273e Merge pull request #150 from deltachat/profileimage
prefer delta profile image over system profile image
2018-11-30 07:20:34 +01:00
B. Petersen f2cecff741 prefer delta profile image over system profile image 2018-11-30 06:54:59 +01:00
B. Petersen e840e3bcbd remove dead code 2018-11-29 15:26:48 +01:00
B. Petersen bf4053d093 Update messenger-backend submodule. 2018-11-29 01:13:57 +01:00
B. Petersen 1750c07f4d handle text drafts, tackles #73 2018-11-29 01:13:46 +01:00
B. Petersen 983ee6bb80 remove TextSecurePreferences to Prefs which is more handy and has no branding 2018-11-28 16:52:04 +01:00
B. Petersen 7a33f75ba5 remove dead code 2018-11-28 16:50:16 +01:00
B. Petersen df5f3ded29 remove expiring messages manager 2018-11-28 02:00:18 +01:00
B. Petersen 96e1a19b4c remove unused profile sharing 2018-11-28 01:44:27 +01:00
B. Petersen fce4a4267a allow chat-specific ringtones and vibrations 2018-11-28 01:32:14 +01:00
B. Petersen dd8c869eb6 Update messenger-backend submodule. 2018-11-28 00:00:41 +01:00
B. Petersen 126b730f7e allow muting chats and show the state, closes #146 2018-11-27 23:58:07 +01:00
B. Petersen c0e365d2c7 remove dead code 2018-11-27 23:30:31 +01:00
B. Petersen 1f29102176 set name for requestCode 2018-11-27 22:22:36 +01:00
B. Petersen 676308a6fb remove dead code wrt quotes 2018-11-27 17:40:15 +01:00
B. Petersen ba635754ed remove dead code 2018-11-26 23:38:55 +01:00
B. Petersen 01de3d1599 remove dead code 2018-11-26 23:34:56 +01:00
B. Petersen ebcfd61e9a remove unverified|untrusted dialogs|banner 2018-11-26 23:08:26 +01:00
B. Petersen 38218d1846 remove dead code 2018-11-26 22:54:17 +01:00
B. Petersen 01b078cd38 disable doze reminder for now 2018-11-26 22:36:08 +01:00
B. Petersen 7f3f8451c3 remove signal's master key 2018-11-26 22:24:16 +01:00
B. Petersen ffe0f2b22d remove KeyCachingService completely 2018-11-26 22:09:28 +01:00
Daniel 44269cc6bb Merge pull request #140 from deltachat/keycache
remove unused functionality from KeyCachingService
2018-11-26 15:47:19 +01:00
daniel.boehrs eb4be81dce disallow multi select #101 2018-11-26 14:49:15 +01:00
daniel.boehrs a69d99dc7a allow unblocking contacts #101 2018-11-26 14:13:13 +01:00
daniel.boehrs d028ce34b0 Importing system contacts seems broken #134 2018-11-26 13:31:39 +01:00
B. Petersen f8affc698e remove dependencies from KeyCachingService 2018-11-26 02:08:43 +01:00
B. Petersen f84e468402 remove unused functionality from KeyCachingService 2018-11-26 01:56:43 +01:00
B. Petersen 2632117a34 remove dead code 2018-11-26 01:35:36 +01:00
B. Petersen 80dc9f2bd4 remove unused locked-flag 2018-11-26 01:17:35 +01:00
B. Petersen bf122cdb6b remove unneeded passphrase activities 2018-11-26 00:45:27 +01:00
B. Petersen 4f5b43579b move helper-classes from org.whispersystem here, tackles #138 2018-11-26 00:36:35 +01:00
B. Petersen b379dafbb5 remove sleep() dependecy to org.whispersystems:signal-service-android, tackles #138 2018-11-25 23:48:08 +01:00
B. Petersen 8fffcf9c80 remove group-db dependecy to org.whispersystems:signal-service-android, tackles #138 2018-11-25 23:41:21 +01:00
B. Petersen ef7fdee701 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-11-25 23:35:49 +01:00
B. Petersen 48b98150dc remove db dependecy to org.whispersystems:signal-service-android, tackles #138 2018-11-25 23:35:35 +01:00
B. Petersen af97da38da remove attachment/slider dependecy to org.whispersystems:signal-service-android, tackles #138 2018-11-25 23:23:34 +01:00
B. Petersen 39ad881eb2 remove dependecy to org.whispersystems:signal-service-android, tackles #138 2018-11-25 23:16:04 +01:00
B. Petersen 0bcec8ba44 remove group dependecy to org.whispersystems:signal-service-android, tackles #138 2018-11-25 23:07:47 +01:00
B. Petersen 8eb5b33aec show draft-title in chatlist 2018-11-25 22:44:01 +01:00
B. Petersen 612d7aa2b2 do not display empty messages as 'media messages' 2018-11-25 22:03:59 +01:00
B. Petersen 1927961002 remove signalservice-specific code 2018-11-25 13:56:37 +01:00
B. Petersen 2417ac06c4 allow saving attachments, closes #137 2018-11-25 13:20:22 +01:00
B. Petersen 3340df3cc7 cleanup StorageUtil 2018-11-25 13:01:35 +01:00
B. Petersen e3becf575a wording 2018-11-25 12:44:41 +01:00
B. Petersen 1363e56014 Update messenger-backend submodule. 2018-11-23 15:03:09 +01:00
Angelo Fuchs df37936ca9 cleanup: apk produced by gradle is now called 'Deltachat' instead of 'Signal' 2018-11-22 13:58:39 +01:00
Angelo Fuchs 7b6af2557d ignored git swap files. 2018-11-22 10:59:46 +01:00
daniel.boehrs f2b1967831 allow unblocking contacts #101 2018-11-21 15:20:14 +01:00
B. Petersen d305c61645 rm outdated BUILDING.md, refer to README.md for build instructions 2018-11-20 23:52:07 +01:00
B. Petersen ded1ad56a7 remove now unneeded dependecy-injector-classes 2018-11-20 23:06:50 +01:00
B. Petersen b8da4bc9c7 bump version 2018-11-20 18:56:38 +01:00
B. Petersen b83b2e9e29 Update messenger-backend submodule. 2018-11-20 18:50:28 +01:00
Angelo Fuchs 7f97bd0ea9 closes #114 when a user taps a picture or document (or the non-player segment of an audio message) he is asked if he wants to engage in a chat, just like he would if tapping a text. 2018-11-20 14:46:48 +01:00
Angelo Fuchs f0abb05e0a removed double filtering of messages. closes #128 - If there are new messages that only belong to one group the senders are now shown properly if the messages should be hidden. 2018-11-20 12:22:24 +01:00
Angelo Fuchs 7db7c5beeb proper handling of events in the background threads #128 2018-11-20 11:51:24 +01:00
Angelo Fuchs 50e22ddcc9 changing the display for multi-sender notifications for groups #128 2018-11-19 15:23:14 +01:00
Angelo Fuchs 85e2203244 notifications are now recreated once on startup of the app (e.G. after a restart of the phone). 2018-11-19 12:22:06 +01:00
Angelo Fuchs 7b2ef54922 notifications are now updated when a chat is seen #128 2018-11-19 11:22:27 +01:00
Angelo Fuchs 4043338f90 selecting chat background #50 for lower SDK versions. 2018-11-19 11:21:55 +01:00
Angelo Fuchs 269cb006c4 Update messenger-backend submodule. 2018-11-19 09:53:03 +01:00
B. Petersen 3daaa51d13 update issue-template 2018-11-17 23:51:52 +01:00
B. Petersen 099f3ad109 Update messenger-backend submodule. 2018-11-16 12:18:28 +01:00
B. Petersen 91ec15330b no interrupt-idle an activity starting, seems too much 2018-11-16 12:18:09 +01:00
Florian Haar 7a5f382315 Allow for customized Background image #50 2018-11-16 08:41:39 +01:00
B. Petersen 0cfc61fde9 handle DC_EVENT_ERROR_NETWORK, closes #129 2018-11-16 00:08:49 +01:00
B. Petersen 0a060fbb74 Update messenger-backend submodule. 2018-11-15 23:23:26 +01:00
B. Petersen 8a8034c33e tweak imap-thread 2018-11-15 16:38:33 +01:00
Angelo Fuchs 313e67fa57 multiple different senders in a chat are now distinguished #128 2018-11-15 12:13:41 +01:00
B. Petersen 0613b879fe remove dead code: BackoffReceiver, MmsBodyProvider 2018-11-15 02:26:36 +01:00
B. Petersen 155e748bd1 remove some verbose logging 2018-11-15 02:25:15 +01:00
B. Petersen 40e57b3286 remove header boilerplate 2018-11-15 02:11:44 +01:00
B. Petersen 90bf08845b remove dead code 2018-11-15 02:03:48 +01:00
B. Petersen 328132e041 adapt permissions 2018-11-15 01:55:53 +01:00
B. Petersen baec8d229d remove dead close: telephony 2018-11-15 01:32:57 +01:00
B. Petersen 740c7bd210 format 2018-11-15 01:17:40 +01:00
B. Petersen 032c38b3d7 remove dead code: sms 2018-11-15 01:15:15 +01:00
B. Petersen 2fbcf3f7f9 ignore warning that the apk is not searchable; this is a feature :) 2018-11-15 01:13:45 +01:00
B. Petersen 4a811d4f37 remove dead code: sms 2018-11-15 00:59:32 +01:00
B. Petersen 1f9ae91488 remove dead code: AccountAuthenticator 2018-11-15 00:49:51 +01:00
B. Petersen 3e76970257 remove dead code: verify identity 2018-11-15 00:00:46 +01:00
B. Petersen f022088ed9 remove dead code 2018-11-14 23:56:42 +01:00
B. Petersen e60c143a42 remove dead code: signal registration service 2018-11-14 23:44:01 +01:00
B. Petersen 5861ca14d6 remove no unused injections 2018-11-14 22:58:05 +01:00
B. Petersen 99f5948fc7 use DcContext.sendMsg() instead of MessageSender 2018-11-14 18:19:34 +01:00
B. Petersen c2e9ba3763 implement reply-from-notification, closes #126 2018-11-14 18:06:13 +01:00
B. Petersen 9743011f25 remove now unused greenrobot.eventbus 2018-11-14 17:56:07 +01:00
B. Petersen 7fb244b0be remove dead code 2018-11-14 17:36:47 +01:00
B. Petersen a79a33751b remove dead code 2018-11-14 17:28:27 +01:00
B. Petersen 1f4ccc2944 rework MessageRetrievalService into KeepAliveService 2018-11-14 17:12:59 +01:00
B. Petersen 7776939716 remove dead code: gcm receiver 2018-11-14 15:10:55 +01:00
B. Petersen d9810443fc remove dead code: SignalCommunicationModule and releated jobs and classes 2018-11-14 14:57:32 +01:00
B. Petersen 17d01b27f2 webrtc: remove dead code 2018-11-14 14:01:15 +01:00
B. Petersen fd2e034f13 webrtc: remove dependency from MessageNotifier 2018-11-14 14:01:01 +01:00
björn petersen 361e153605 Merge pull request #125 from deltachat/connect
connect permanently
2018-11-14 03:39:48 +01:00
B. Petersen 564915ab9f add out boot receiver 2018-11-14 03:37:55 +01:00
B. Petersen 69a887fe61 Update messenger-backend submodule. 2018-11-14 03:28:50 +01:00
B. Petersen e6020f9707 use permanent notification to keep threads alive 2018-11-14 03:28:25 +01:00
B. Petersen b2ee6320f4 remove header boilerplate 2018-11-14 00:12:51 +01:00
B. Petersen 98af653204 add network state receiver and call dc_maybe_network() on re-connect 2018-11-14 00:09:44 +01:00
B. Petersen 56527d3f3f remove signal's network state receiver 2018-11-13 23:55:03 +01:00
B. Petersen 1355f59a94 add a timer to restart smtp- and imap-threads if needed 2018-11-13 23:32:08 +01:00
B. Petersen c02df7a370 remove signals exponential backoff 2018-11-13 23:07:06 +01:00
B. Petersen 89e8e80665 adapt to new API, use lambda for threads 2018-11-13 21:40:03 +01:00
Angelo Fuchs 3ef1650b51 only produce a notification if something new happens, not if something gets noticed. #117 2018-11-13 14:39:27 +01:00
Angelo Fuchs 4739b8c165 in case ndk-build is done from gradle, this folder needs to be ignored. 2018-11-13 14:38:28 +01:00
B. Petersen ebdb5f382d Update messenger-backend submodule. 2018-11-13 00:20:09 +01:00
daniel.boehrs fa8e9cefd3 verified-icon not always visible in chat-titlebar #120 2018-11-09 15:23:32 +01:00
daniel.boehrs b459e9bd0e avatars from system contacts #55 2018-11-09 12:49:25 +01:00
Florian Haar a336ce3e2c Allow for customized Background image #50 2018-11-09 10:16:32 +01:00
Lars-Magnus Skog 986d86f82e Merge pull request #121 from JellyRollJunior/master
Fix error in README.md
2018-11-09 04:15:44 +01:00
Brandon Lin f202ca1eb2 Fix error in README.md
-removed double usage of "can"
2018-11-08 18:32:13 -08:00
Angelo Fuchs f1b2dd581a addendum #113. the notification event is running on the background thread now, the default for event handlers is the main thread, though. 2018-11-04 23:35:59 +02:00
Angelo Fuchs 5ed18c106c close #113. the notification event is running on the background thread now, the default for event handlers is the main thread, though. 2018-11-04 22:58:05 +02:00
Angelo Fuchs e051eecf48 closes #111 media gallery image selection now goes to the right image. 2018-11-04 21:42:40 +02:00
Angelo Fuchs 5fcf183215 don't display notifications for the currently active thread. closes #32 notifications are now completle 2018-11-04 16:58:18 +02:00
Angelo Fuchs df494a49a8 some cleanup, no functional change. 2018-11-04 14:16:53 +02:00
Angelo Fuchs 564b837d93 activating signalling (sound and vibration) for #32 2018-11-04 13:57:44 +02:00
Angelo Fuchs 8c9cd3dd3d having the proper icon for #32 notifications. 2018-11-02 17:10:35 +02:00
Florian Haar c290194c9a Allow for customized Background image #50 2018-11-02 13:39:03 +01:00
Florian Haar cf2bdefcee forward selected messages #74 2018-11-02 11:02:51 +01:00
Florian Haar 4f9c692dbd forward selected messages #74 2018-11-02 10:04:17 +01:00
daniel.boehrs dd67248066 avatars for contact / new chat view #55 2018-11-02 09:01:43 +01:00
Angelo Fuchs d4f1af7521 for #32 (notifications) the type of thread id in ConversationActivity is now int (not long). Where its too hard, I added a cast and a todo. 2018-11-01 21:22:13 +02:00
Angelo Fuchs df62bfe8de #32 grouping together the actions of marking messages as notified. 2018-11-01 21:22:13 +02:00
Angelo Fuchs b8929c181a added todos for future work. 2018-11-01 21:22:13 +02:00
Angelo Fuchs 9fa44b3e68 #32 notification stuff running in background thread so glide is satisfied. 2018-11-01 21:22:13 +02:00
daniel.boehrs 755d081c64 Adjust avatar fallback colors #55 2018-11-01 10:42:26 +01:00
daniel.boehrs b635384dd5 Make GroupCreateActivity aware of verified joins #92 2018-11-01 10:04:51 +01:00
daniel.boehrs 1fb07c9f80 unlocking does not work #112 2018-11-01 08:54:14 +01:00
Angelo Fuchs 5a9220356c notifications for new messages are displayed and hidden appropriately #32 2018-10-31 14:01:40 +02:00
Angelo Fuchs c8accec761 added convenience function when you already have a dc context 2018-10-31 14:01:40 +02:00
Angelo Fuchs cad5c5c185 generating slides from messages 2018-10-31 14:01:39 +02:00
Angelo Fuchs acaf836af9 DcMsg no longer requires the Recipient. 2018-10-31 14:01:39 +02:00
daniel.boehrs 5221b4c8fd Show qr and self reference on group edit #92 2018-10-30 16:19:18 +01:00
daniel.boehrs 5ee4320a6c Prepare ContactAccessor to load photos for #55 2018-10-30 14:02:26 +01:00
daniel.boehrs 92a0a83187 Rewrite profile image handling for #55 2018-10-30 12:16:02 +01:00
daniel.boehrs 76a8a724ff Adjust UI #55 2018-10-30 12:16:02 +01:00
B. Petersen d8ccf5ed6d add a function to get profile image of a contact 2018-10-30 11:21:55 +01:00
B. Petersen a2d6a00cd1 Update messenger-backend submodule. 2018-10-29 23:40:38 +01:00
Angelo Fuchs ffe69f7f4b Using DcEventDelegate instead of Object. 2018-10-29 23:01:57 +02:00
björn petersen 887cc3a1bb [WIP] Media gallery (#109) closes #78
* Update messenger-backend submodule.
* display a swipe able media gallery when one taps an image
* display a tiled gallery from chat-menu and from preview gallery
* changed some utility classes to handle the new situations
2018-10-29 20:55:49 +01:00
daniel.boehrs c192b719f5 show avatars for groups #55 2018-10-29 15:44:55 +01:00
daniel.boehrs ed0de74406 Adjust keyboard show / hide #92 2018-10-29 10:29:43 +01:00
B. Petersen ff1878511d show contact-avatar in deaddrop, tackles #95 2018-10-23 23:16:03 +02:00
B. Petersen a77cbee5f2 remove unused semi-transparency 2018-10-23 23:07:01 +02:00
B. Petersen e92fda0ca3 use plus-icon instead of pencil in chatlist, closes #107 2018-10-23 22:53:31 +02:00
B. Petersen a4c9e1699b improve 'no messages' hint on empty chats. 2018-10-23 21:51:14 +02:00
B. Petersen df87b64f66 upper-right align date in chatlist 2018-10-23 16:36:44 +02:00
B. Petersen b79e8e812d make status icons mutual exclusive 2018-10-23 16:24:19 +02:00
B. Petersen ec2deebda4 add space between columns in chatlist, closes #106 2018-10-23 16:09:09 +02:00
B. Petersen befbf84c59 remove unused thumbnail from chatlist 2018-10-23 14:30:08 +02:00
B. Petersen 7b205db200 do not show the date in bold on unread, too noisy. only show subject in bold and green unread counter. 2018-10-23 13:57:58 +02:00
B. Petersen e43c85b12b unify ripple color 2018-10-23 13:52:29 +02:00
B. Petersen 758c175b3d add horizontal border between chats in chatlist, tackles #106 2018-10-23 13:11:21 +02:00
B. Petersen fdceb0e080 draw verified-icon directly right of chat-title, closes #105 2018-10-23 12:00:56 +02:00
B. Petersen 3863ef91e1 comment 2018-10-23 09:51:35 +02:00
B. Petersen 6e07258fc7 make deaddrop-background compatible to selection-background 2018-10-23 07:04:15 +02:00
B. Petersen c07a0dedd6 bump version 2018-10-22 23:52:25 +02:00
B. Petersen e5b906184d do not draw buggy deaddrop background for now 2018-10-22 23:50:09 +02:00
B. Petersen 2dbd12403f implement archive/unarchive/delete/leave from chat-activity 2018-10-22 23:14:15 +02:00
daniel.boehrs 9906608956 fix group create crash #103 2018-10-22 19:08:35 +02:00
B. Petersen 5870f0cd02 implement group leaving 2018-10-22 18:09:58 +02:00
B. Petersen 3dc6ea1c85 cleanup chat-menu 2018-10-22 17:47:18 +02:00
B. Petersen e66ae137fe make 'Edit group' a first-class action, tackles #92 2018-10-22 17:06:00 +02:00
B. Petersen 4d32f5746c no special click-handler for ConversationUpdateItem 2018-10-22 16:32:26 +02:00
daniel.boehrs 6e5c6e3d4d Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-22 16:23:54 +02:00
daniel.boehrs c459aa4476 set group image #92 2018-10-22 16:23:42 +02:00
B. Petersen bf4bcba78c remove RecipientModifiedListener from ConversationActivity and ConversationListActivity 2018-10-22 16:21:59 +02:00
B. Petersen ccb5e3285f Update messenger-backend submodule. 2018-10-22 16:12:34 +02:00
daniel.boehrs 5424d56801 edit groups #92 2018-10-22 15:20:24 +02:00
B. Petersen 5c15784f66 hide unused controls in contact-requests, tackles #95 2018-10-22 01:21:15 +02:00
B. Petersen 0abecd74c9 remove unused code 2018-10-22 00:56:42 +02:00
B. Petersen aa3df42f71 ask 'Chat with NAME?' on clicks on a contact request and offer several options, tackles #95. 2018-10-22 00:29:45 +02:00
B. Petersen cfe6e023cb handle msg_id and contact_id in chatlist-items 2018-10-21 23:57:00 +02:00
B. Petersen 6140b2aab4 add a function to get the msg_id from a chatlist-index 2018-10-21 23:55:09 +02:00
B. Petersen cc95e1fa1f show contact request in chatlist with different background 2018-10-21 23:04:58 +02:00
B. Petersen 643e8d80f7 typo 2018-10-21 15:02:12 +02:00
B. Petersen 84cc1c124a show correct title for contact requests 2018-10-21 15:01:33 +02:00
B. Petersen 22d8f3177f remove unused parameters on opening/creating chats 2018-10-21 14:43:44 +02:00
B. Petersen 471f4480ac remove now unused ConversationActivity.DISTRIBUTION_TYPE_EXTRA 2018-10-21 14:36:29 +02:00
B. Petersen bc387096f5 remove dependency from this.distributionType on draft saving 2018-10-21 14:30:41 +02:00
B. Petersen 93b5a345ea remove unused group-options 2018-10-21 14:22:59 +02:00
B. Petersen 50b18b7d65 remove now redundant ConversationActivity.ADDRESS_EXTRA 2018-10-21 14:15:55 +02:00
B. Petersen 004319db64 remove dependency to ConversationActivity.ADDRESS_EXTRA from ConversationFragment 2018-10-21 14:09:33 +02:00
B. Petersen 90b52cebf1 remove TIMING_EXTRA 2018-10-21 13:58:58 +02:00
B. Petersen f4a01a2bae re-add accidentially removed advanced-preference click-handler 2018-10-21 01:28:56 +02:00
B. Petersen 77ed15125d move invite/help to settings 2018-10-21 00:59:11 +02:00
B. Petersen 15ef0271fc add contact-request (aka deaddrop) menu entry, tackles #95 2018-10-21 00:02:19 +02:00
B. Petersen 1dd2ad04ba a click on a deaddrop-message opens a new chat, tackles #95 2018-10-20 23:52:54 +02:00
B. Petersen 0a259d2277 bump version 2018-10-19 23:06:47 +02:00
B. Petersen 9f6a7cbf00 make create groups work again, tackles #92 2018-10-19 23:03:06 +02:00
B. Petersen 5c6e84b21b bump version 2018-10-19 15:30:59 +02:00
B. Petersen 00f0f143af send voice messages as such 2018-10-19 15:29:40 +02:00
B. Petersen 7bcfec2367 send images, audio, documents 2018-10-19 15:07:15 +02:00
daniel.boehrs 17e5fe5a89 Verify icon layout broken #93 2018-10-19 10:11:26 +02:00
Florian Haar 4b8fef6918 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-19 09:03:08 +02:00
Florian Haar 44afb50c81 Allow for customized Background image #50 2018-10-19 09:01:47 +02:00
B. Petersen 39f14a4a9a basically send media with URIs 2018-10-19 01:40:27 +02:00
B. Petersen d015f567da bump version 2018-10-18 18:55:15 +02:00
B. Petersen d98174b45b remove unused directory from update script 2018-10-18 16:35:23 +02:00
daniel.boehrs db92bb274b prefill groups form with exstiting data #92 2018-10-18 16:13:27 +02:00
B. Petersen c8d889da04 Update messenger-backend submodule. 2018-10-18 16:11:29 +02:00
B. Petersen 6da2a9fc87 remove ndk-buid call from update, if needed it should be called explicitly 2018-10-18 16:07:26 +02:00
Florian Haar 39b64bd9aa Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-18 10:56:46 +02:00
Florian Haar ca55e21eb2 show "first message may take a while" in new chats #62 2018-10-18 10:55:59 +02:00
daniel.boehrs bf85918ed2 add qr show+scan activities #79 and adjust UI 2018-10-18 10:53:21 +02:00
björn petersen b0adddebfa Merge pull request #91 from deltachat/qr-verify-79
add verify-contact activities
2018-10-17 23:36:39 +02:00
B. Petersen f27f0b4305 show secure-join-events on joiner side 2018-10-17 23:26:58 +02:00
B. Petersen c441c11601 start activity after QR scanning from ui thread 2018-10-17 19:10:23 +02:00
daniel.boehrs 77d7f545d4 add qr show+scan activities #79 2018-10-17 16:57:10 +02:00
Angelo Fuchs 7d4add1b5e introduced DcAttachment and introduced its use where applicable. 2018-10-17 15:20:39 +02:00
Angelo Fuchs e72f2b4cb6 for #78 setting the attachment state to done when its displayed. 2018-10-17 15:18:20 +02:00
B. Petersen 264765917f adapt to new api 2018-10-17 14:08:55 +02:00
B. Petersen 9b6dcf955f adapt name and return value of dc_msg_get_filebytes() wrapper function 2018-10-17 14:06:36 +02:00
B. Petersen 6027072d78 remove download button from AudioView 2018-10-17 02:15:38 +02:00
B. Petersen af5fb87c06 Update messenger-backend submodule. 2018-10-17 01:14:11 +02:00
B. Petersen 96c4fd6835 adapt to new api 2018-10-17 01:13:56 +02:00
B. Petersen a0b7d41a7a Update messenger-backend submodule. 2018-10-17 00:02:41 +02:00
B. Petersen 3cd732f089 adapt to new api 2018-10-17 00:02:26 +02:00
B. Petersen e299eb26c2 Update messenger-backend submodule. 2018-10-16 16:50:46 +02:00
B. Petersen 1038de2cc5 cleanup 2018-10-16 16:50:30 +02:00
Florian Haar f02380fd52 Adjust the CreateProfileActivity UI #87 2018-10-16 14:25:55 +02:00
daniel.boehrs a02574dbbb Allow for customized Background image #50 2018-10-16 13:58:24 +02:00
B. Petersen 35521f5dfe force software layer to allow larger items in ConversationList, closes #88 2018-10-16 10:39:30 +02:00
B. Petersen a1e6c14443 use different app name for X-Mailer header 2018-10-15 15:31:39 +02:00
Florian Haar 58ada319bb Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-15 11:38:05 +02:00
Florian Haar 45bfab9fbd Adjust the CreateProfileActivity UI #87 2018-10-15 11:36:09 +02:00
B. Petersen e5d8a2bc28 update error indicator 2018-10-14 23:25:32 +02:00
B. Petersen 99b1e2ba43 harden getConfigInt() 2018-10-14 12:11:07 +02:00
B. Petersen 27d632f17c show sender names in groups, closes #85 2018-10-13 22:34:24 +02:00
B. Petersen fbd53b3767 make opened chat as being noticed, closes #66 2018-10-13 16:56:29 +02:00
B. Petersen 8f56d5872a adding SELF to the list of contacts so that one can easily create a self-chat 2018-10-13 15:33:34 +02:00
daniel.boehrs 0e75880c24 show "verified" icon in contact list and in chat title #80 2018-10-12 15:54:58 +02:00
B. Petersen 0e55a4ad5e Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-12 13:56:11 +02:00
B. Petersen 6eed72a4d2 bump version 2018-10-12 13:56:08 +02:00
Florian Haar 63f49efee1 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-12 11:10:10 +02:00
Florian Haar 7d52e125a3 Allow for customized Background image #50 2018-10-12 11:03:29 +02:00
B. Petersen b4c1f214a0 show compound messages 2018-10-11 18:38:55 +02:00
B. Petersen 02ea677a3c speed up encryption by disable debug, tackles https://github.com/deltachat/deltachat-core/issues/376 2018-10-10 23:13:02 +02:00
B. Petersen 62e03e7ce4 tweak contact deletion, closes #83 2018-10-10 15:53:02 +02:00
B. Petersen eaabc75501 Update messenger-backend submodule. 2018-10-10 15:23:45 +02:00
B. Petersen 749ccb1228 adapt to new api 2018-10-10 15:23:27 +02:00
daniel.boehrs 5f2f24116d ask before deleting contacts #82 2018-10-10 14:40:44 +02:00
B. Petersen beb01e885c remove dead backup functionality 2018-10-09 17:45:15 +02:00
B. Petersen 86a54970f4 correct logical contact-delete-failed check introduced by me with the last commit 2018-10-09 17:33:52 +02:00
B. Petersen 179e8173c9 delete contacts in thread 2018-10-09 17:16:56 +02:00
daniel.boehrs 0a119d9d8e Fixed highlighting issue in #37 2018-10-09 16:38:11 +02:00
B. Petersen ac6b82cc70 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-10-09 15:48:27 +02:00
B. Petersen 8d82552aaa remove unused classes 2018-10-09 15:48:14 +02:00
daniel.boehrs 247fb1a357 Delete all selected contacts not always working #81 2018-10-09 15:47:38 +02:00
daniel.boehrs 91c3d8e847 Optimize loading for adress book sync #46 2018-10-09 15:38:49 +02:00
B. Petersen 93f30ae34f Update messenger-backend submodule. 2018-10-09 10:56:35 +02:00
B. Petersen 8df4b6be39 wording of login button: no need to register to delta chat, only log-in required 2018-10-08 17:41:31 +02:00
daniel.boehrs 4a9627118a remove unused permissions, delay requests #68 2018-10-08 12:56:54 +02:00
daniel.boehrs 52c495b307 add contacts from system address book to contact database #46 2018-10-08 10:46:59 +02:00
daniel.boehrs c037020918 Adjust UI for disabled contact list entries #37 2018-10-08 09:23:58 +02:00
B. Petersen 7a2597186b remove unused country selection code 2018-10-08 00:56:59 +02:00
B. Petersen e41279f080 remove more unsued sms code 2018-10-08 00:42:00 +02:00
B. Petersen 93f781b8dc remove some unsued sms code 2018-10-08 00:13:12 +02:00
B. Petersen cbf40049a1 Update messenger-backend submodule. 2018-10-07 18:28:11 +02:00
B. Petersen 11eed61019 adapt to new API 2018-10-07 18:27:59 +02:00
daniel.boehrs 28763e686d backup, manage keys does not work when system secret is disabled #77 2018-10-05 14:37:14 +02:00
daniel.boehrs 6edca0eeb6 add status/footer to "your profile" settings #76 2018-10-05 14:25:48 +02:00
daniel.boehrs f9c5f133d5 add option to delete a single contact #37 2018-10-05 13:27:31 +02:00
B. Petersen c3cd3ceffb Update messenger-backend submodule. 2018-10-04 21:39:22 +02:00
B. Petersen 4482db9195 adapt to new core-api 2018-10-04 21:38:29 +02:00
B. Petersen 6f8db1352a show image-messages 2018-10-03 22:09:40 +02:00
B. Petersen 5011f44ddf open attachments 2018-10-03 18:28:34 +02:00
B. Petersen fc6dded69a remove unused downloadClickListeners 2018-10-03 17:09:06 +02:00
B. Petersen 29731c02f4 remove unused spinners from attachment views 2018-10-03 15:19:50 +02:00
B. Petersen 728142d08d so not show setup message as file 2018-10-03 15:14:51 +02:00
B. Petersen 5c693c14b6 prepare showing documents/images/audio 2018-10-02 23:22:47 +02:00
B. Petersen a31307171e typo 2018-10-02 22:19:10 +02:00
B. Petersen 1a510d8787 pass default status text to the core 2018-10-02 22:08:56 +02:00
B. Petersen 7109c6c806 use fallback text in settings screen if display-name is not yet set 2018-10-02 21:53:00 +02:00
B. Petersen 7d85e2c3e8 use dynamic applicationId for the providers, not more conflicts with signal, closes #75 2018-10-02 20:51:29 +02:00
B. Petersen 138144b938 suggest bubbles 2018-10-02 19:37:07 +02:00
B. Petersen 0ed4c5a305 remove unused clustering code 2018-10-02 19:26:57 +02:00
B. Petersen 46832b2290 remove contact-joined-event-option, closes #67 2018-10-02 18:12:55 +02:00
B. Petersen 7aad748915 tweak checkmarks and message-item-footer, closes #52 2018-10-02 17:42:35 +02:00
B. Petersen 2887d1b807 prefere preference setting from core, closes #64 2018-10-02 17:41:36 +02:00
daniel.boehrs fca9076059 Remove Settings / Notifications / Calls category #14 2018-10-02 15:06:34 +02:00
daniel.boehrs 931283f98a Add security check to backup and key export #14 2018-10-02 14:40:28 +02:00
daniel.boehrs 2e7de766dd Adjust version and versionName #65 2018-10-02 14:21:57 +02:00
daniel.boehrs 31de65880e Fix unwanted screen lock after initial activation 2018-10-02 13:13:41 +02:00
daniel.boehrs 7530bcd592 Adjust screen lock 2018-10-02 09:26:27 +02:00
B. Petersen 7deab10a9f cleanup chat preferences 2018-10-01 23:24:07 +02:00
B. Petersen 5c1ff3c110 handle MDNs options, closes #63 2018-10-01 20:57:38 +02:00
B. Petersen b9d3740f58 hide the pending-spinning-wheel from the chat list if there are no messages, closes #60 2018-10-01 17:30:44 +02:00
daniel.boehrs 87b5d2d246 Added prefill for RegistrationAcivity 2018-10-01 16:30:11 +02:00
daniel.boehrs a41e0f7ca0 Added strings and fixed dismissable lock dialog 2018-10-01 16:07:17 +02:00
daniel.boehrs 79b98a48c2 App screen lock #42 2018-10-01 15:15:48 +02:00
B. Petersen e16df36e81 center emoji as well as send/attach buttons vertically, closes #61 2018-10-01 14:46:38 +02:00
B. Petersen 89a9d1b147 draw a line atop of the expanded attachment drawer, closes #59 2018-10-01 14:35:23 +02:00
B. Petersen 1f0f729871 remove 'mark all read' for now, closes #53 2018-10-01 11:52:21 +02:00
B. Petersen 683336d620 handle incoming autocrypt setup messages, closes #43 2018-09-30 19:44:21 +02:00
B. Petersen 5515a665c3 sending autocrypt setup messages, setting prefer_encrypt 2018-09-30 16:14:41 +02:00
björn petersen 8b5276c9fc Merge pull request #58 from deltachat/work-on-asm
add asm controls
2018-09-29 14:00:53 +02:00
B. Petersen 5fc731b7e9 add asm controls
add explaining autocrypt text
2018-09-29 13:59:47 +02:00
B. Petersen e337cd48bb add accent color 2018-09-28 21:18:27 +02:00
B. Petersen 35d31d4cfb remove phone icon from chat view 2018-09-28 15:57:43 +02:00
B. Petersen c3b10b0458 show correct end-to-end-encryption icons, closes #56 2018-09-28 15:43:31 +02:00
B. Petersen 8b92bd7a47 set message state for outgoing messages in chatlist 2018-09-28 14:57:10 +02:00
daniel.boehrs 8ad1652cc6 Add toast on screenshot policy changed 2018-09-28 13:03:44 +02:00
daniel.boehrs 08a4e63ea4 Removed unneeded preferences and adjusted the CreateProfileActivity 2018-09-28 12:46:21 +02:00
B. Petersen eda6c04382 wording; change 'conversation' to 'chat', closes #45 2018-09-28 12:38:17 +02:00
B. Petersen 2eeed3d191 tweak some colors, closes #54 2018-09-28 11:58:15 +02:00
daniel.boehrs 75971f7320 Make account settings (name and image) usable #14 2018-09-28 10:28:28 +02:00
B. Petersen a64ebdee04 show avatar in group chats, no message clusters 2018-09-27 23:24:36 +02:00
B. Petersen 539cdb9f89 style message input 2018-09-27 16:16:06 +02:00
B. Petersen e2de9d2ffe use correct send and attach buttons 2018-09-27 14:58:07 +02:00
B. Petersen 884733505a change color to deltagreen, closes #49 2018-09-26 21:57:54 +02:00
Angelo Fuchs 8790d6bd20 Update messenger-backend submodule. 2018-09-26 10:05:01 +02:00
Angelo Fuchs 96a0a346c0 Update messenger-backend submodule. 2018-09-26 09:10:10 +02:00
B. Petersen 5021af8319 add backup functionality 2018-09-26 02:25:18 +02:00
B. Petersen 5e98634ae5 use @Override annotations for event handlers 2018-09-26 01:02:01 +02:00
B. Petersen fb2d242779 implement copy-to-clipboard 2018-09-23 18:59:58 +02:00
B. Petersen 0da4fa1530 implement messages deletion 2018-09-23 16:33:10 +02:00
B. Petersen aac3d0d904 priorize smtp threads 2018-09-23 13:16:26 +02:00
B. Petersen 90ea23e472 cleanup after sending message 2018-09-23 00:06:05 +02:00
B. Petersen 9c89353098 use default snackbar colors; no need to leave the system-guidelines here 2018-09-22 23:06:00 +02:00
B. Petersen 87f3a35e7c remove service-outage- and unauthorized-reminders 2018-09-22 14:45:21 +02:00
B. Petersen 61482de5a5 remove cmdline functionality, see https://github.com/deltachat/deltachat-android/issues/215 2018-09-22 14:01:41 +02:00
B. Petersen d9c316c8a6 play around with messags list loading 2018-09-22 00:34:21 +02:00
B. Petersen f9d040abc7 remove unused views 2018-09-22 00:11:00 +02:00
B. Petersen 683d94012c remove special handling of avatar clicks; they're too easy to be confused with the normal clicks on a chat or a title bar 2018-09-21 23:50:14 +02:00
B. Petersen fc096d42be remove unneded play-services and sms code 2018-09-21 23:41:16 +02:00
B. Petersen bff4adb1f3 remove some sms and dead code 2018-09-21 23:22:11 +02:00
B. Petersen 45f88c05da remove DeviceActivity and GCM, closes #20 2018-09-21 23:06:38 +02:00
B. Petersen 85724d5cd6 simplify app started to NORMAL und NEEDS_CONFIGURE 2018-09-21 22:33:21 +02:00
B. Petersen dad9d469e1 allow pulsing positions in ConversationList 2018-09-21 21:27:28 +02:00
B. Petersen 2156236abe make the ConversationList IDs stable again, fixes #41 2018-09-21 21:03:14 +02:00
B. Petersen 3fe51ceab8 add a dev-tagged-logo for the development time, closes #22 2018-09-21 18:32:44 +02:00
B. Petersen c734a79ef1 show a-z letters in the leftmost column of the ContactActivities 2018-09-21 17:14:19 +02:00
B. Petersen 64f6e9a5f7 cache DcMsg objects in ConversationAdapter, tackles #29 2018-09-21 15:47:27 +02:00
B. Petersen 6729c099cd show day in non-scrolling headers, tackles #29 2018-09-21 15:20:33 +02:00
B. Petersen c2c7a3173b style, make some @NunNull annotations 2018-09-21 14:25:39 +02:00
B. Petersen 26947bb865 let getTimestamp() functions return usual timestamp that are compatibe with the standard Date() object (by converting s to ms) 2018-09-21 11:25:18 +02:00
B. Petersen 8f28640d28 make selection toolbar work, tackles #29 2018-09-21 00:57:20 +02:00
B. Petersen 6af76ecf96 disable some basic things that are no longer neeed 2018-09-21 00:07:31 +02:00
B. Petersen 22aaeef47f add message-update events explicitly in the conversation-fragment, not in the -activity 2018-09-20 16:35:25 +02:00
B. Petersen 29946d90bc update conversation and contact-list on the corresponding events 2018-09-20 16:04:22 +02:00
B. Petersen 5fbc6d7282 remove some 'registered'-checks 2018-09-20 11:51:59 +02:00
B. Petersen d2fca389a4 show info-messages as such 2018-09-20 11:30:56 +02:00
B. Petersen 1391c187a5 correct message sorting 2018-09-20 01:11:01 +02:00
björn petersen 53b6c6648d Merge pull request #40 from deltachat/conversation2
[WIP] Conversation2
2018-09-20 00:55:42 +02:00
B. Petersen 3091f29926 make ConversationAdapter basically work 2018-09-20 00:31:18 +02:00
B. Petersen b86da2555a replace MessageRecord by DcMsg 2018-09-19 18:07:28 +02:00
Angelo Fuchs 65077f1e7d worked over Conversation Item, is now without compiler errors. 2018-09-19 14:35:14 +02:00
Angelo Fuchs 41ccf739de Conversation Adapter worked over, ConversationItem in progress. 2018-09-19 14:35:14 +02:00
B. Petersen 03f50a1b7c do contact creation after confirmed by the user 2018-09-19 13:29:26 +02:00
B. Petersen b16c80f6c5 tweak group-create navigation, tackles #28 2018-09-18 17:13:46 +02:00
B. Petersen 99ae3f1f6a allow new creation of conacts directly from the add-member activity, tackles #28 2018-09-18 16:07:18 +02:00
B. Petersen 686e3ebbc6 avoid loading an object for just saving the id to the Address object 2018-09-18 15:35:53 +02:00
B. Petersen 9d7dedeb8f add a simple button to add members to group; this can be easily enhanced by a 'show qr invite' code button 2018-09-18 15:08:55 +02:00
B. Petersen 6b5de90ddf update strings 2018-09-18 14:02:39 +02:00
B. Petersen 95af863627 remove rating manager 2018-09-18 13:42:30 +02:00
björn petersen 4c0b7b141a Merge pull request #39 from deltachat/wip
create groups and verified groups
2018-09-18 01:31:00 +02:00
B. Petersen c5786488e8 create groups and verified groups
create groups and verified groups
2018-09-18 01:29:39 +02:00
björn petersen aa0c4b57ea Merge pull request #38 from deltachat/create-groups
adapt group creation
2018-09-17 15:52:19 +02:00
B. Petersen ffb14ec088 adapt group creation
display selected group members correctly

add items to create groups/verified-groups/contacts directly to the contact list

adapt main menu, create chat, help

forward from chat to group creation
2018-09-17 14:38:25 +02:00
B. Petersen 157f3498f9 remove some unneeded push-only-code 2018-09-17 00:32:28 +02:00
B. Petersen e10fe6ede0 override standard Object methods of DcContact 2018-09-17 00:14:43 +02:00
B. Petersen 674ad7861c wording 2018-09-16 12:09:54 +02:00
B. Petersen ac6e1a23da style Dc-native classes, leaving out DcMsg as this is pending with other changes in the 'conversation' branch 2018-09-16 11:49:08 +02:00
B. Petersen ae63b61132 start a new chats from the contact list, tackles #28 2018-09-16 01:59:23 +02:00
B. Petersen d6dc707b60 Update messenger-backend submodule. 2018-09-16 00:46:07 +02:00
B. Petersen 9829f4fbd2 if sth. is entered in the contact list, add a link to create a new contact at the end of the contact list 2018-09-16 00:43:21 +02:00
B. Petersen b05fe8b377 add core-functions to lookup contacts 2018-09-16 00:40:49 +02:00
B. Petersen 53a7fcf0bf adapt invite activity and some strings, tackles #28 2018-09-15 17:51:38 +02:00
B. Petersen a62146985d forward DcContact object to ContactSelectionListItem, draw correctly colored avatar for contacts 2018-09-15 15:41:35 +02:00
B. Petersen 2f91d956e6 add missing get-contact-id function 2018-09-15 15:40:33 +02:00
B. Petersen c447e74b29 show contacts in contacts list, tackles #28 2018-09-15 15:10:02 +02:00
B. Petersen a3a7b0103c change app name to 'Delta Chat dev', for now. closes #22 2018-09-15 13:16:06 +02:00
B. Petersen 7f6195eea1 show 'clear contact search' button only if there is a search, closes #27 2018-09-14 14:49:12 +02:00
B. Petersen 2fb6da8100 some adaptions to ConversationAdapter 2018-09-14 10:25:43 +02:00
B. Petersen 73e6d7d768 comment 2018-09-14 01:35:45 +02:00
björn petersen 3ed44b5050 Merge pull request #26 from deltachat/hack-on-ConversationActivity
remove sms-, invite- and register-reminders, cleanup Chatlist elements
2018-09-14 01:21:53 +02:00
B. Petersen 19cf5884c9 remove sms-, invite- and register-reminders, cleanup Chatlist elements 2018-09-14 01:19:03 +02:00
B. Petersen 3a384d6b6d Update messenger-backend submodule. 2018-09-13 02:12:22 +02:00
B. Petersen eb47c04739 implement 'mark all as seen' in ConversationList 2018-09-13 02:12:06 +02:00
B. Petersen 9a52e5cf65 pass queryFilter to DcChatlistLoader, if set 2018-09-13 01:34:52 +02:00
B. Petersen 4489a80fb6 implement archive-selected and delete-selected in ConversationList 2018-09-13 01:07:45 +02:00
B. Petersen 85bcd9b9f3 update ConversationList on changes, closes #23 2018-09-13 00:49:12 +02:00
B. Petersen e457a4d2f6 refactor and unify JNI names 2018-09-12 23:49:05 +02:00
B. Petersen b54e6e7625 style 2018-09-12 23:46:14 +02:00
B. Petersen c8525734a1 implement function to (un)archive chats and to view archived chats 2018-09-12 18:20:35 +02:00
B. Petersen 675516bff8 Update messenger-backend submodule. 2018-09-12 14:05:17 +02:00
B. Petersen 3870d8c674 add DcContext.sendMsg() and related functions to bindings 2018-09-12 14:05:00 +02:00
Angelo Fuchs d895d19418 minor fixes, debugging. 2018-09-12 13:04:12 +02:00
Angelo Fuchs 16d44bc576 if message is DC, send via DC. 2018-09-12 13:03:35 +02:00
Angelo Fuchs c0d384a449 creating addresses from dc chat information, primitively. 2018-09-12 13:02:45 +02:00
B. Petersen 211217dc55 show name in ConversationList, tackles #21 2018-09-12 00:54:54 +02:00
björn petersen bd06b778a6 Update README.md 2018-09-11 12:51:52 +02:00
B. Petersen 721b08bcac use correct app icon, remove adaptive icon (we do not have an adaptive icon for Delta Chat yet) 2018-09-10 15:00:45 +02:00
B. Petersen 7e1e9b3248 update app name in strings using grep -rl Signal */strings.xml | xargs sed -i 's/\bSignal\b/Delta Chat/g', tackles #22 2018-09-10 14:36:33 +02:00
B. Petersen 2848997a04 use default font appearance in ConversationList 2018-09-10 11:00:24 +02:00
B. Petersen e9df8aaf40 remove signal icon from conversion list, adapt title bar font size 2018-09-10 08:37:21 +02:00
B. Petersen 07585352d4 Merge branch 'master' of https://github.com/deltachat/deltachat-android-ii 2018-09-10 08:22:17 +02:00
B. Petersen 1cbfab1414 change app name 2018-09-10 08:22:07 +02:00
björn petersen febe72855e Update README.md 2018-09-10 06:56:21 +02:00
B. Petersen 35ec524d20 add unreadcount, date and summary to ConversationListItem 2018-09-09 23:54:45 +02:00
B. Petersen e55def62ee load chatlist via new DcChatlistLoader 2018-09-09 00:29:55 +02:00
B. Petersen 1cbfececa9 add 'zero inbox' hint if everything is archived 2018-09-09 00:24:40 +02:00
B. Petersen 7f831a7d6a show (still empty) items in the conversation list 2018-09-08 02:01:07 +02:00
B. Petersen 57716f48d1 add native function for getting chat-ids from chatlist 2018-09-08 01:58:03 +02:00
Angelo Fuchs 82e50142b3 removed option to select a phone number and changed type of text to email to display an @ directly. 2018-09-05 12:36:32 +02:00
Angelo Fuchs 9e1a093190 minor: say E-Mail instead of Nummer 2018-09-05 12:14:59 +02:00
B. Petersen de24ee3892 add import-backup 2018-08-31 18:38:35 +02:00
B. Petersen cd4644e6e3 do not include makefile-parts from deltachat-core 2018-08-31 15:33:43 +02:00
daniel.boehrs 66b30cf7ec Remove SMS reminder and settings 2018-08-31 13:03:43 +02:00
B. Petersen 4a32ecbb47 finish WelcomeActivity and RegistrationActivity on successfull registration 2018-08-31 01:46:08 +02:00
B. Petersen 12c5de9020 use DcHelper to access ApplicationDcContext 2018-08-30 17:53:22 +02:00
B. Petersen 8501067e02 let DcHelper.getContext() return the derived context object to access eg. DcEventCenter 2018-08-30 17:52:54 +02:00
daniel.boehrs 175ad7b940 Add first settings iteration #14 2018-08-30 16:48:30 +02:00
daniel.boehrs cb5dae676e Fixed wrong text input types #12 2018-08-29 16:10:52 +02:00
daniel.boehrs 78d9a8411f Go to chatlist if app is already configured #10 2018-08-29 16:06:36 +02:00
Angelo Fuchs 8a489f5cb9 forwarding to conversation list when the status is right #13 2018-08-29 14:39:55 +02:00
Angelo Fuchs 0d440cb808 Update messenger-backend submodule. 2018-08-29 13:44:14 +02:00
B. Petersen 0b9e129fc4 add DcEventCenter and start using it, tackles #11 2018-08-29 13:33:23 +02:00
B. Petersen 0b00ec2a03 style 2018-08-28 12:42:25 +02:00
B. Petersen c3dbfa06d0 update ISSUE_TEMPLATE.md 2018-08-28 10:41:30 +02:00
B. Petersen 3e14b523d6 udpate README.md 2018-08-28 00:25:20 +02:00
B. Petersen 8ca034438e update CONTRIBUTING 2018-08-28 00:19:45 +02:00
Boehrsi 6666ecd363 5 - Adjusted application id 2018-08-23 16:39:37 +02:00
daniel.boehrs 13c8ddde92 1 - add gmail-specific hint in RegistrationActivity 2018-08-21 16:02:04 +02:00
B. Petersen f4945ae267 allow null when getting summary 2018-08-20 00:42:01 +02:00
B. Petersen 4b410c8753 start configuration progress from RegistrationActivity 2018-08-20 00:20:14 +02:00
B. Petersen 5991780d70 open database 2018-08-19 23:03:14 +02:00
B. Petersen a5ad98eebc move ApplicationDcContext and related classes to 'connect' subdir 2018-08-19 22:49:25 +02:00
B. Petersen 0e8912714e start imap- and smtp-threads when creating context 2018-08-19 01:32:15 +02:00
B. Petersen 509ebe9aaf handle log events, http-get event 2018-08-19 00:48:33 +02:00
B. Petersen 59490310fd remove globals from DcContext (formerly MrMailbox) to allow multiple instances, add class derived from DcContext 2018-08-18 23:35:45 +02:00
B. Petersen b4bc628f17 make DcContext static 2018-08-18 18:58:27 +02:00
B. Petersen 54aa11b964 refactor MrMailbox to DcContext etc. 2018-08-18 14:43:22 +02:00
B. Petersen fba364ccba remove libraries that are now in deltachat-core 2018-08-17 17:56:00 +02:00
B. Petersen d3b5884cba use openssl, iconv, cyrussasl from deltachat-core 2018-08-17 17:53:35 +02:00
B. Petersen a6563f16a9 Update messenger-backend submodule. 2018-08-17 17:44:50 +02:00
B. Petersen bbf2e9b496 remove .so from repository, tackles #6 2018-08-17 16:18:01 +02:00
B. Petersen f451b72c5e Update messenger-backend submodule. 2018-08-17 15:24:48 +02:00
B. Petersen e1ea897143 add a script to update deltachat-core 2018-08-17 15:24:03 +02:00
B. Petersen 80c9968a64 ignore private scripts only 2018-08-17 15:13:46 +02:00
daniel.boehrs 02cca46f6c 4 - Add core and initial bindings 2018-08-16 15:35:16 +02:00
B. Petersen b1a00a03d2 Initial commit 🌱 2018-08-14 17:20:46 +02:00
6388 changed files with 77129 additions and 1562428 deletions
+1
View File
@@ -0,0 +1 @@
*.ai binary
+30 -23
View File
@@ -1,23 +1,30 @@
# Thank you for contributing to Delta Chat.
Delta Chat is divided in two parts: Android and [Core](https://github.com/deltachat/deltachat-core).
In short, the Android part is about the User Interface. The Interface is translated using [Transifex](https://www.transifex.com/delta-chat/delta-chat-android). The Core part is about handling the connection to the mail server and the chat or e-mail messages as well as providing secure communication by using [Autocrypt](https://autocrypt.org/en/latest/).
Delta Chat Core is used in the Android and in the [iOS](https://github.com/deltachat/deltachat-ios) version.
Please try to create your issue to the respective Issue tracker: Here, or in [Core](https://github.com/deltachat/deltachat-core/issues). Don't worry, if you are not sure. We will move the issue if necessary.
If you intend to create a **feature request** for Delta Chat, please check the exiting requests for
* [Android](https://github.com/deltachat/deltachat-android/issues?q=is%3Aissue+label%3A%22feature+request%22+sort%3Aupdated-desc) and
* [Core](https://github.com/deltachat/deltachat-core/issues?q=is%3Aissue+label%3A%22feature+request%22+sort%3Aupdated-desc)
first.
If you intend to send a **bug report** for Delta Chat, search for bugs (including closed) in
* [Android](https://github.com/deltachat/deltachat-android/issues?&q=is%3Aissue) and
* [Core](https://github.com/deltachat/deltachat-core/issues?&q=is%3Aissue)
A **bug** is a reproducable misbehaviour, when something happens but something else should happen instead.
Did you know there is a [Help](https://delta.chat/en/help) page for Delta Chat?
# Thank you for contributing to Delta Chat.
If you like to discuss a **new feature** or submit suggestions,
please use the community forum:
* <https://support.delta.chat>
If you intend to send a **bug report** for Delta Chat,
search for existing bugs first:
* [Core](https://github.com/deltachat/deltachat-core-rust/issues?&q=is%3Aissue)
* [Android](https://github.com/deltachat/deltachat-android/issues?&q=is%3Aissue)
* [iOS](https://github.com/deltachat/deltachat-ios/issues?&q=is%3Aissue)
* [Desktop](https://github.com/deltachat/deltachat-ios/issues?&q=is%3Aissue)
In short, the Android/iOS/Desktop parts are about the User Interface.
The Core part is about handling the connection to the mail server and the chat
or e-mail messages as well as providing secure communication by using
[Autocrypt](https://autocrypt.org/en/latest/).
A _bug_ is a reproducable misbehaviour,
when something happens but something else should happen instead.
Please try to create your issue in the respective issue tracker.
Did you know there is a [Help](https://delta.chat/en/help) page for Delta Chat?
To ask questions, you are also invited to join our IRC channel #deltachat
on [Freenode](https://kiwiirc.com/nextclient/#irc://irc.freenode.net/deltachat).
+19 -27
View File
@@ -1,34 +1,26 @@
_Please read the guidelines linked above, especially when you are a first time contributor. Remove this text and provide some basic informations below, if applicable. Remove template content that is not applicable._
<!--
This is a bug report tracker. New features are discussed in the forum: https://support.delta.chat
**Delta Chat version**
Please fill out as much of this form as you can (leaving out stuff that is not applicable is ok).
-->
See settings dialog …
- Android version:
- Device:
- Delta Chat version:
- Expected behavior:
- Actual behavior:
- Steps to reproduce the problem:
- Screenshots:
- Logs:
**Expected behavior**
What is the expected output?
**Actual behavior**
What do you see instead?
**Steps to reproduce the problem**
1.
2.
**Screen snapshots**
If applicable …
**Debug logs**
If applicable, debug logs can be copied from within the Delta Chat app:
Open the _Settings_ menu -> _About_ -> _version number|Info_.
<!--
Debug logs can be copied from within the Delta Chat app with
Settings menu -> Advanced -> Debug log
Alternatively from the Android system log:
`adb logcat -v time -s DeltaChat`
` adb logcat -v time -s DeltaChat `
Logs may contain private data
which shall be removed or anonymised prior to posting.
-->
This log contains private data (e.g. mail address, provider information) which shall be removed or anonymised prior to posting.
+38 -10
View File
@@ -1,15 +1,43 @@
.idea/
.gradle/
build/
obj/
*.iml
local.properties
*.keystore
libs/
.classpath
project.properties
.project
.settings
bin/
gen/
gplay/
.idea/
*.iml
*.so
out
tests
lint.xml
local.properties
ant.properties
.DS_Store
build.log
build-log.xml
.gradle
build
signing.properties
library/lib/
library/obj/
ffpr
test/androidTestEspresso/res/values/arrays.xml
obj/
jni/libspeex/.deps/
# ignore private scripts and directories, eg. local2github.prv.sh
*.prv*
# transifex temporary files
tools/.tx/
tools/translations/
# contains files for ndk-build when done from gradle.
.externalNativeBuild
# no vi tmp files
*.swp
jni/x86
jni/x86_64
jni/armeabi
jni/armeabi-v7a
jni/arm64-v8a
+3 -3
View File
@@ -1,3 +1,3 @@
[submodule "MessengerProj/jni/messenger-backend"]
path = MessengerProj/jni/messenger-backend
url = https://github.com/r10s/messenger-backend.git
[submodule "jni/deltachat-core-rust"]
path = jni/deltachat-core-rust
url = https://github.com/deltachat/deltachat-core-rust
+10
View File
@@ -0,0 +1,10 @@
[main]
host = https://www.transifex.com
lang_map = nl_NL:nl, ja_JP:ja, pt_BR:pt-rBR, zh_CN:zh-rCN, zh_TW:zh-rTW
[delta-chat-app.stringsxml]
file_filter = res/values-<lang>/strings.xml
source_file = res/values/strings.xml
source_lang = en
type = ANDROID
+340
View File
@@ -0,0 +1,340 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.thoughtcrime.securesms">
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false"/>
<uses-feature android:name="android.hardware.location.network" android:required="false"/>
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
<uses-feature android:name="android.hardware.portrait" android:required="false"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<!-- dangerous permissions - we need to as the user with a PermissionsRequest -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- normal permissions - adding them here is enough -->
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RAISED_THREAD_PRIORITY" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application android:name=".ApplicationContext"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
tools:replace="android:allowBackup"
android:allowBackup="false"
android:theme="@style/TextSecure.LightTheme"
android:largeHeap="true"
tools:ignore="GoogleAppIndexingWarning">
<!-- android car support, see https://developer.android.com/training/auto/start/,
as this potentially blocks releases on gplay due to extra-checks,
we disable this during the first gplay releases -->
<!--
<meta-data android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
-->
<activity android:name=".InviteActivity"
android:theme="@style/TextSecure.HighlightTheme"
android:windowSoftInputMode="stateHidden"
android:parentActivityName=".ConversationListActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.thoughtcrime.securesms.ConversationListActivity" />
</activity>
<activity android:name=".ShareActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:excludeFromRecents="true"
android:launchMode="singleTask"
android:taskAffinity=""
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="audio/*" />
<data android:mimeType="image/*" />
<data android:mimeType="text/plain" />
<data android:mimeType="video/*" />
<data android:mimeType="application/*"/>
<data android:mimeType="text/*"/>
<data android:mimeType="*/*"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
<data android:mimeType="image/*" />
<data android:mimeType="text/plain" />
<data android:mimeType="video/*" />
<data android:mimeType="application/*"/>
<data android:mimeType="text/*"/>
<data android:mimeType="*/*"/>
</intent-filter>
<meta-data
android:name="android.service.chooser.chooser_target_service"
android:value="org.thoughtcrime.securesms.service.DirectShareService" />
</activity>
<activity android:name=".ConversationListActivity"
android:label="@string/app_name"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightNoActionBar"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:exported="true" />
<activity-alias android:name=".RoutingActivity"
android:targetActivity=".ConversationListActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="openpgp4fpr" />
</intent-filter>
<meta-data android:name="com.sec.minimode.icon.portrait.normal"
android:resource="@mipmap/ic_launcher" />
<meta-data android:name="com.sec.minimode.icon.landscape.normal"
android:resource="@mipmap/ic_launcher" />
</activity-alias>
<activity android:name=".ConversationListArchiveActivity"
android:label="@string/chat_archived_chats_title"
android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:parentActivityName=".ConversationListActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.thoughtcrime.securesms.ConversationListActivity" />
</activity>
<activity android:name=".ConversationActivity"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:parentActivityName=".ConversationListActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.thoughtcrime.securesms.ConversationListActivity" />
</activity>
<activity android:name=".GroupCreateActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".NewConversationActivity"
android:theme="@style/TextSecure.LightNoActionBar"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
<intent-filter>
<data android:scheme="mailto"/>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.SENDTO"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
<activity android:name=".ContactMultiSelectionActivity"
android:label="@string/contacts_title"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".ApplicationPreferencesActivity"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".WelcomeActivity"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightNoActionBar"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".RegistrationActivity"
android:launchMode="singleTask"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- this scheme is used as the redirect_url for getOauth2Url()
and should be whitelisted by the supported oauth2 services -->
<data android:scheme="chat.delta" android:path="/${applicationId}/auth" tools:ignore="AppLinkUrlError"/>
<data android:scheme="chat.delta" android:path="/auth" tools:ignore="AppLinkUrlError"/>
</intent-filter>
</activity>
<activity android:name=".LogViewActivity"
android:label="@string/pref_log_header"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".MediaPreviewActivity"
android:label="@string/media_preview"
android:windowSoftInputMode="stateHidden"
android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".ProfileActivity"
android:theme="@style/TextSecure.LightNoActionBar"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".DummyActivity"
android:theme="@android:style/Theme.NoDisplay"
android:enabled="true"
android:allowTaskReparenting="true"
android:noHistory="true"
android:excludeFromRecents="true"
android:alwaysRetainTaskState="false"
android:stateNotNeeded="true"
android:clearTaskOnLaunch="true"
android:finishOnTaskLaunch="true" />
<activity android:name=".BlockedAndShareContactsActivity"
android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".scribbles.ScribbleActivity"
android:theme="@style/TextSecure.ScribbleTheme"
android:windowSoftInputMode="stateHidden"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".scribbles.StickerSelectActivity"
android:theme="@style/TextSecure.ScribbleTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name="com.soundcloud.android.crop.CropImageActivity" />
<activity android:name=".CreateProfileActivity"
android:theme="@style/TextSecure.LightTheme"
android:windowSoftInputMode="stateHidden|adjustResize"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".QrScanActivity"
android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".QrShowActivity"
android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".ClearProfileAvatarActivity"
android:theme="@style/Theme.AppCompat.Dialog.Alert"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:icon="@drawable/clear_profile_avatar"
android:label="@string/menu_delete_image">
<intent-filter>
<action android:name="org.thoughtcrime.securesms.action.CLEAR_PROFILE_PHOTO"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".preferences.ChatBackgroundActivity"
android:theme="@style/TextSecure.LightTheme"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".map.MapActivity" />
<service android:name=".connect.KeepAliveService" android:enabled="true" />
<service android:name=".geolocation.LocationBackgroundService" />
<service android:name=".service.DirectShareService"
android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE">
<intent-filter>
<action android:name="android.service.chooser.ChooserTargetService" />
</intent-filter>
</service>
<receiver android:name=".notifications.MarkReadReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="org.thoughtcrime.securesms.notifications.CLEAR"/>
</intent-filter>
</receiver>
<receiver android:name=".notifications.RemoteReplyReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="org.thoughtcrime.securesms.notifications.WEAR_REPLY"/>
</intent-filter>
</receiver>
<provider android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_provider_paths" />
</provider>
<provider
android:name=".connect.AttachmentsContentProvider"
android:authorities="${applicationId}.attachments"
android:grantUriPermissions="true"
android:exported="false">
</provider>
<receiver android:name=".service.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="org.thoughtcrime.securesms.RESTART"/>
</intent-filter>
</receiver>
<receiver
android:name=".service.PanicResponderListener"
android:exported="true">
<intent-filter>
<action android:name="info.guardianproject.panic.action.TRIGGER" />
</intent-filter>
</receiver>
<uses-library android:name="com.sec.android.app.multiwindow" android:required="false"/>
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
</application>
</manifest>
+614 -23
View File
@@ -1,12 +1,560 @@
# Delta Chat Changelog
# Delta Chat Android Changelog
## v0.11.0
2017-12-14
## v1.0.0
2019-12-17
Finally, after months of coding and fixing bugs, here it is: Delta Chat 1.0 :)
An overview over the changes since v0.510:
* support for user avatars: select your profile image
at "My profile info" and it will be sent out to people you write to
* introduce a new "Device Chat" that informs the user about app changes
and, in the future, problems on the device
* new "Saved messages" chat
* add "Certificate checks" options to "Login / Advanced"
* if "Show classic emails" is set to "All",
emails pop up as contact requests directly in the chatlist
* add "Send copy to self" switch
* rework welcome screen
* a new core: for better stability, speed and future maintainability,
the core is written completely in the Rust programming language now
* for end-to-end-encryption, rPGP is used now;
the rPGP library got a first independent security review mid 2019
* improved behavior of sending and receiving messages in flaky networks
* more reliable background fetch on newer Android versions
* native 64bit support
* minimum requirement is Android 4.3 Jelly Bean
* tons of bug fixes
The changes of this verison and the last beta versions have been done by
Alexander Krotov, Allan Nordhøy, Ampli-fier, Andrei Guliaikin,
Asiel Díaz Benítez, Besnik, Björn Petersen, ButterflyOfFire, Calbasi, cyBerta,
Daniel Boehrsi, Dmitry Bogatov, dorheim, Emil Lefherz, Enrico B., Ferhad Necef,
Florian Bruhin, Floris Bruynooghe, Friedel Ziegelmayer, Heimen Stoffels, Hocuri,
Holger Krekel, Jikstra, Lars-Magnus Skog, Lin Miaoski, Moo, Nico de Haen,
Ole Carlsen, Osoitz, Ozancan Karataş, Pablo, Pedro Portela, polo lancien,
Racer1, Simon Laux, solokot, Waldemar Stoczkowski, Xosé M. Lamas, Zkdc
## v0.982.0
2019-12-16
* move doze-reminder to device-chat
* improve logging
* update translations
* fix crashes on connecting to some imap and smtp servers
## v0.981.0
2019-12-15
* avatar recoding to 192x192 to keep file sizes small
* fix read-receipts appearing as normal messages
* fix smtp crash
* fix group name handling if the name contains special characters
* various other bug fixes
## v0.980.0
2019-12-14
* support for user avatars: select your profile image
at "settings / my profile info"
and it will be sent out to people you write to
* previously selected avatars will not be used automatically,
you have to select a new avatar
* rework tls stack
* alleviate login problems with providers which only support RSA10
* prototype a provider-database with a testprovider
* improve key gossiping
* bug fixes
## v0.973.0
2019-12-10
* names show up correctly again
* html-attachments are possible again
* improve adding/removing group members
* improve connection handling and reconnects
* update translations
## v0.971.0
2019-12-06
* rework welcome screen
* update translations
* improve reconnecting
* various bug fixes
## v0.970.0
2019-12-04
* introduce a new "Device Chat" that informs the user about app changes
and, in the future, problems on the device
* rename the "Me"-chat to "Saved messages",
add a fresh icon and make it visible by default.
* add Arabic translation
* add Galician translation
* update translations
* use the rust-language for the mail-parsing and -generating part,
introducing a vastly improved reliability
* fix moving messages
* fix flakyness when receiving messages
and in the secure-join process
* more bug fixes
## v0.960.0
2019-11-24
* update translations
* more reliable background fetch on newer Android versions
* bug fixes
* minimum requirement is now Android 4.3 Jelly Bean
## v0.950.0
2019-11-05
* add "Certificate checks" options to "Login / Advanced"
* update translations
* bug fixes
## v0.940.2
2019-10-31
* re-implement "delete mails from server"
* if "Show classic emails" is set to "All",
emails pop up as contact requests directly in the chatlist
* fix android9 voice-recording issues
* update translations
* various bug fixes
## v0.930.2
2019-10-22
* add "send copy to self" switch
* rework android4 emoji-sending
* rework android9 background-fetch
* fix 64bit issues
* fix oauth2 issues
* target api level 28 (android9, pie)
* update translations
* various bug fixes
## v0.920.0
2019-10-10
* improve onboarding error messages
* update translations
* various bug fixes
## v0.910.0
2019-10-07
* after months of hard work, this release is finally
based on the new rust-core that brings improved security and speed,
solves build-problems and also makes future developments much easier.
there is much more to tell on that than fitting reasonably in a changelog :)
* this is also the first release including native code for 64bit systems
* minor ui improvements
* add Hungarian translation
* update translations
## v0.510.1
2019-07-09
* new image cropping feature: crop images before sending them
* updated image editing user interface
* update Chinese (zh-cn and zh-tw), Italian, Dutch, Turkish translations
* remove swipe to archive and swipe to unarchive chats
* improve UX to discard contact requests
* improve UX to block contacts
* bugfixes
The changes have been done by Björn Petersen, cyBerta, Enrico B.,
Heimen Stoffels, Lin Miaoski, Ozancan Karataş, Zkdc
## v0.500.0
2019-06-27
* New chat-profile: Gallery, documents, shared chats and members at a glance
* Add video recording and recoding
* Show video thumbnails
* Forward/Share: Add searching and forward/share to new contact/chat
* Share: Support direct sharing to a recently used chats
* New notification handling, including a mute-forever option :)
* Optional plipp-plop sounds in chats
* Better document- and music-files view
* Add new-messages marker
* Keep chat-scroll-postion on incoming messages
* Clean up settings dialog
* More general "outgoing media quality" option (replaces image-quality option)
* Improve quality of voice messages
* More touch-friendly layout
* Add an experimental option to delete e-mails from server
* Improve compatibility with older phones
* Show a warning if the app is too old and won't be updated automatically
(done just by date comparision, no data is sent anywhere)
* New option to save the log to a file
* Make input text field a bit larger
* Add Traditional Chinese and Simplified Chinese translations
* Update Albanian, Azerbaijani, Basque, Brazilian Portuguese, Catalan, Danish,
Dutch, French, German, Italien, Japanese, Lithuanian, Polish, Portuguese,
Russian, Spanish, Swedish, Turkish and Ukrainian translations
* Bugfixes
The changes have been done by Allan Nordhøy, Ampli-fier, Andrei Guliaikin,
Anna Ayala, Asiel Díaz Benítez, Besnik, Björn Petersen, Boehrsi, Calbasi,
Christian Schneider, cyBerta, Enrico B., Eric Lavarde, Ferhad Necef,
Floris Bruynooghe, Friedel Ziegelmayer, Heimen Stoffels, Holger Krekel,
Iskatel Istiny, Jikstra, Lars-Magnus Skog, Lin Miaoski, Luis, Moo, Ole Carlsen,
Osoitz, Ozancan Karataş, Racer, Sebek, Yuriy, Zkdc
## v0.304.0
2019-05-07
* Add Catalan translation
* Update several other translations
* Bugfixes
The changes have been done by Ampli-fier, Andrei Guliaikin, Asiel Díaz Benítez,
Björn Petersen, Calbasi, Enrico B., ferhad.necef, Heimen Stoffels, link2xt,
Maverick2k, Ole Carlsen, Osoitz, Ozancan Karataş, Racer1, Webratte
## v0.303.0
2019-05-01
* Add labels to map markers
* Always show self-position on map
* Tweak Log UI
* Bugfixes
The changes have been done by Ampli-fier, Björn Petersen, cyBerta
## v0.302.1
2019-04-27
* add POIs on maps
* Tweak Log UI
* add location indicator in chat messages
* bugfixes
The changes have been done by Björn Petersen, cyBerta, Daniel Boehrsi.
## v0.301.1
2019-04-22
* Fix chat view and log for Android 4.4 (Kitkat)
## v0.301.0
2019-04-20
* Experimental location-streaming can be enabled in the advanced settings;
when enabled, you can optionally stream your location to a group
and view a map with the members that are also streaming their location
* Tweaked dark-mode
* Improved account setup and profile dialogs
* Show and hide the virtual keyboard more gracefully
* Speed up program start
* Speed up message sending
* Handle Webp-Images and Vcard-files
* Add Japanese and Brazilian Portuguese translations
* Update several other translations
* Bug fixes
The changes have been done by Alexander, Ampli-fier, Angelo Fuchs,
Asiel Díaz Benítez, Besnik, Björn Petersen, cyBerta, Daniel Böhrs, Enrico B.,
ferhad.necef, Floris Bruynooghe, Friedel Ziegelmayer, Heimen Stoffels,
Holger Krekel, Janka, Jikstra, Luis, Moo, Nico de Haen, Ole Carlsen, Osoitz,
Ozancan Karataş, Racer1, sebek, Viktor Pracht, Webratte and others
## v0.200.0
2019-03-14
* Simplified setup (OAuth2) for google.com and yandex.com
* Improved setup for many other providers
* Decide, which e-mails should appear - "Chats only", "Accepted contacts" or "All"
* Improve moving chat messages to the DeltaChat folder
* Optional a stronger image compression
* Smaller message sizes in groups
* Share files from other apps to Delta Chat
* Share texts from mailto:-links
* Log can be opened from setup screen
* Add Lithuanian translation
* Update several other translations
* Bug fixes
The changes have been done by Alexandex, Angelo Fuchs, Asiel Díaz Benítez,
Björn Petersen, Besnik, Christian Klump, cyBerta, Daniel Böhrs, Enrico B.,
ferhad.necef, Florian Haar, Floris Bruynooghe, Friedel Ziegelmayer,
Heimen Stoffels, Holger Krekel, Iskatel Istiny, Lech Rowerski, Moo,
Ole Carlsen, violoncelloCH and others
## v0.101.0
2019-02-12
* First Play Store release, optimisations for Android O
* Ask to disable battery optimisations
* Start Azerbaijani and Swedish translations
* Update several other translations
* Many bug fixes
The changes have been done by Ampli-fier, Angelo Fuchs, Asiel Díaz Benítez,
Besnik, Björn Petersen, Christian Klump, Daniel Böhrs, Enrico B., ferhad.necef,
Florian Haar, Floris Bruynooghe, Heimen Stoffels, Holger Krekel,
Iskatel Istiny, Lech Rowerski, violoncelloCH and others.
## v0.100.0
2019-01-23
* Complete rework of the ui using pure material design
* Images and other files can be sent together with a description
* Images can be modified before sending, eg. text can be added or
hand-drawn signs
* Image and media gallery for each chat
* Embedded camera, new camera icon directly in input field
* Embedded video player
* New emoticons
* Contacts and groups can be joined with a QR-code-scan
* Options for watching several IMAP-folders
* Option to move messages to the DeltaChat-folder
* Improved multi-device behavior
* Improved Accessiblity eg. for screen readers
* Dark theme
* Support right-to-left languages
* Relative time display
* Chatlist and contat list support a long click for several operations
* Archive chats by swiping a chat right out of the chatlist
* Show date always atop of the chat
* Fix redraw problems with hidden system status or navigation bar
* Reply directly from within notification
* The system credentials has be be entered before exports
* The app can be protected by the system credentials
* Hide the permanent notification more reliable
* Improved resending of messages
* Allow password starting/ending with whitespaces
* Bug fixes
* Probably more i forgot
The changes have been done by Ampli-fier, Angelo Fuchs, Asiel Díaz Benítez,
Björn Petersen, chklump, Daniel Böhrs, Florian Haar, Hocceruser, Holger Krekel,
Lars-Magnus Skog
Translations are still in progress and video-recording is not yet re-implemented.
Help is very welcome -:)
## v0.20.0
2018-08-14
* Check size before sending videos, files and other attachments
* On sending problems, try over an appropriate number of times; then give up
* Detect sending problems related to the message size,
show an error and do not try over
* Show message errors in the message info
* Add user forum to website
* Update python bindings
* Seed node.js bindings and a CLI version based on this
* Prepare Android bindings update
* Update Danish, Italian and Russian translations
The changes have been done by Andrei Guliaikin, Angelo Fuchs, Björn Petersen,
compl4xx, Boehrsi, Enrico B., Floris Bruynooghe, Holger Krekel, Janka, Jikstra,
Karissa McKelvey, Lars-Magnus Skog, Ole Carlsen
## v0.19.0
2018-07-10
* Give advices for Google users
* Speed up by making database-locks unneccessary
* Fix drafts appearing twice
* Update Albanian, Basque, Catalan, Danish, Dutch, English,
Italian, Polish, Russian, and Turkish translations
* Update website
The changes have been done by Allan Nordhøy, Angelo Fuchs, Besnik,
Björn Petersen, Calbasi, Claudio Arseni, guland2000, Heimen Stoffels,
Holger Krekel, Luis Fernando Stürmer da Rosa, Mahmut Özcan, Ole Carlsen,
Osoitz, sebek, Thomas Oster
## v0.18.2
2018-06-23
* Fix initial configure process to hang at 95% under some circumstances
## v0.18.0
2018-06-21
* Speed up message sending/receiving
* Retry failed sending/receiving jobs just in the moment
the networks becomes available again
* Make message sending/receiving more reliable
* Handle attachment file names with non-ASCII characters correctly
* Paging through images made available by Angelo Fuchs
* Several connection issues with different configurations
were fixed by Thomas Oster
* Improve chat-folder creation by Thomas Oster
* Request permissions before using the camera; added by Thomas Oster
* Key import improved by Thomas Oster
* Improve background and foreground message fetching reliability
* Try to use the permanent notification only when really needed
* Update internal sqlite library from 3.22.0 to 3.23.1
* Update internal libEtPan library from 1.7 to 1.8
* Add Danish translation from Ole Carlsen
* Update Albanian, Basque, Danish, Italian, Norwegian, Dutch, Polish,
Portuguese, Russian and Telugu translations
## v0.17.3
2018-05-17
* Fix system messages appearing twice
* Fix: Use all gossipped verifications in verified groups
* Update Basque, Polish, Russian and Ukrainian translations
## v0.17.2
2018-05-15
* Fix problem with adding formerly uncontacted members to groups
* Unblock manually blocked members when they are added manually as contact again
## v0.17.1
2018-05-11
* Improve QR code scanning screens
* Add a labs-option to disabled the new QR logo overlay
* Update Russian translations
## v0.17.0
2018-05-07
* Show shared chats in user profiles
* If a contact has changed his encryption setups,
this is shown as a system messages in the middle of the chat view
* Show added group members, changed group titles etc. as system messages
* Show direct buttons to create a new group or contact in the "New Chat" dialog
* Improve "Add contact" dialog
* Move subject and most chat metadata to the encrypted part
following the "Memoryhole" proposal
* Show read-timestamps in message info
* Do not add contacts from Bcc to group-memberlist
to avoid privacy leaks and to get a unique memberlist for all group-members
* In a mail contains plaintext and encrypted parts,
the whole mail is treated as not being encrypted correctly
* Restructure settings and advanced settings
* Fix problems with Office 365 and similar services
* Fix a problem where incoming messages are shown as being sent by oneself
* Experimental QR code scanning options can be enabled in the advanced settings
* Update Albanian, Catalan, Dutch, French, German, Italian, Norwegian, Polish,
Russian, Spanish, Turkish and Ukrainian translations
* Add Basque translation
* Add Chinese translation
* Add Japanese translation
## v0.16.0
2018-03-19
* Messages from normal clients to more than one recipient
create an implicit "ad-hoc group"
* Allow group creation though contact requests
* Always display the _sending_ time in the chat list;
the list itself is sorted by _receiving_ time
and "Message info" shows both times now
* If parts but the footnote are cut from mails,
this is indicated "..."; use "Message info" to get the full text
* Highlight the subject in the "Message info"
* Autoconfigure prefers 'https' over 'http'
* Bug fixes, eg. avoid freezes if the connection is lost
* Update Russian, Tamil and Turkish translations
## v0.15.0
2018-02-27
* Render the waveform for voice messages
* Fix problems with voice messages on various devices
* Improve deletion of message that were moved around by another e-mail client
* Really delete messages on the server, do not only mark them for deletion
* Ignore subsequent keys or blocks in OpenPGP files
* Leave incoming Autocrypt Setup Messages in the inbox
so that any number of other e-mail-clients can process them
* Avoid messages sent to the "Me" chat appearing twice in other e-mail clients
* Update Albanian translation
## v0.14.0
2018-02-20
* Evaluate gossiped keys
* Option to transfer the Autocrypt Setup to another device or e-mail client
* Accept Autocrypt Setup transferred from other devices or e-mail client
* Send any data from device to device
using the chat "Me - Messages I sent to myself"
* Do not send messages when there is an access error
* Request for contact permissions only once
* Bug fixes
* Update French and Turkish translations
## v0.13.0
2018-01-18
* Reply encrypted if the sender has enabled encryption manually
(esp. useful when chatting with clients as K-9 or Enigmail)
* Update welcome screen graphics
* Update Norwegian, Russian and Turkish translations
## v0.12.0
2018-01-07
* Gossip keys of other group members in the encrypted payload
(will also be evaluated in one of the next versions)
* Use SHA-256 instead of SHA-1 in signatures
* Make the permanent notification clickable
* Update permanent notification after import
* Fix rendering of system messages
* Various bug fixes
* Update Albanian, French, Italian, Norwegian, Polish, Russian
and Turkish translations
## v0.11.4
2017-12-17
* Add option to initiate Autocrypt Key Transfer
* Connect after importing a backup
* Reading memory hole headers
* Add Albanian translation
* Update German, Italian, Polish and Russian translations
* Update German, Italian, Polish, Portuguese, Russian, Turkish
and Ukrainian translations
## v0.10.0
2017-11-29
@@ -15,34 +563,42 @@
* Fix various memory leaks
* Update English, Portuguese and Turkish translations
## v0.9.9
2017-11-18
* Alternate include order for F-Droid
* Add Serbian translation
* Update Catalan, Dutch, English, French, German, Hungarian, Italian, Polish, Portuguese, Russian, Spanish, Tamil, Telugu and Ukrainian translations
* Update Catalan, Dutch, English, French, German, Hungarian, Italian, Polish,
Portuguese, Russian, Spanish, Tamil, Telugu and Ukrainian translations
## v0.9.8
2017-11-15
* Fix a bug that avoids chat creation under some circumstances (bug introduced in 0.9.7)
* Fix a bug that avoids chat creation under some circumstances
(bug introduced in 0.9.7)
## v0.9.7
2017-11-14
* Archive chats or delete chats by a long press
* Notify the user in the chatlist about contact requests of known users or of other Delta Chat clients
* Notify the user in the chatlist about contact requests
of known users or of other Delta Chat clients
* Show messages only for explicitly wanted chats
* Show more detailed reasons about failed end-to-end-encryptions
* Explicit option to leave a group
* Do not show the padlock if end-to-end-encryption is disabled by the user
* Also import images from a backup when using a different device with different paths
* Import images from a backup when using a different device with different paths
* Add copy-to-clipboard function for "About / Info"
* Rework Emoji-code
* Add Norwegian Bokmål translation
* Add Tamil translation
* Add Turkish translation
* Update Catalan, German, French, Italian, Korean, Dutch, Polish, Portuguese, Russian, Telugu and Ukrainian translations
* Update Catalan, German, French, Italian, Korean, Dutch, Polish, Portuguese,
Russian, Telugu and Ukrainian translations
## v0.9.6
2017-10-18
@@ -51,6 +607,7 @@
* Show PDFs and other attachments with bad names
* Bug fixes
## v0.9.5
2017-10-08
@@ -61,7 +618,9 @@
* Improve onboarding
* Add URL to default footer
* Test a different approach for battery saving in this release
* Update French, Italian, German, Polish, Portuguese, Russian and Ukrainian translations
* Update French, Italian, German, Polish, Portuguese, Russian
and Ukrainian translations
## v0.9.4
2017-08-23
@@ -70,7 +629,8 @@
* Editable and synchronized group images
* Show the subject of messages that cannot be decrypted
* Do not send "Read receipts" when decryption fails
* Do not request "Read receipts" from normal MUAs as there are too many MUAs responding with weird, non-standard formats
* Do not request "Read receipts" from normal MUAs
as there are too many MUAs responding with weird, non-standard formats
* Deleting a chat always deletes all messages from the device permanently
* Ignore messages from mailing lists
* Do not spread the original authors name nor address on forwarding
@@ -81,7 +641,9 @@
* Add Ukrainian translation
* Add Telugu translation
* Add Catalan translation
* Update German, Spanish, French, Hungarian, Italian, Polish, Portuguese and Russian translations
* Update German, Spanish, French, Hungarian, Italian, Polish, Portuguese
and Russian translations
## v0.9.3
2017-07-13
@@ -92,20 +654,24 @@
* Ignore signature.asc files of signed-only messages
* Update Polish, Portuguese and Russian translations
## v0.9.2
2017-06-28
* Encrypt group chats
* Cryptographically sign messages
* Validate signatures of incoming messages ("Info" shows the state)
* Show a little lock beside end-to-end-encrypted messages with a validated signature
* If end-to-end-encryption is available on sending time, guarantee the message not to be sent without end-to-end-encryption later
* Show lock beside end-to-end-encrypted messages with a validated signature
* If end-to-end-encryption is available on sending time,
guarantee the message not to be sent without end-to-end-encryption later
* Show special characters in HTML-mails
* Help MUAs on showing chat threads
* Show attachments from multipart/alternative structures
* Upgrade from Autocrypt Level 0 to Level 1; as the levels are not compatible, encryption on mixed setups does not happen
* Upgrade from Autocrypt Level 0 to Level 1;
as the levels are not compatible, encryption on mixed setups does not happen
* Update Polish, Portuguese, Spanish and French translations
## v0.9.1
2017-06-04
@@ -114,6 +680,7 @@
* Make encryption-dialog localizable
* Update Russian translation
## v0.9.0
2017-06-01
@@ -122,30 +689,36 @@
* Profile: Add option to copy the email address to the clipboard
* Pimp GUI
## v0.1.36
2017-05-04
* Support camera on Android Nougat
## v0.1.34
2017-05-03
* Link to new homepage https://delta.chat
* Localizable Help-URLs
## v0.1.33
2017-04-29
* Better support for right-to-left (RTL) languages, taking advantage of
Android 4.2 (Jelly Bean MR1, API level 17).
* Send PNG files without resizing and converting to JPEG
* If JPEG files are send without compression, they still appear as image, not as attached files
* If JPEG files are send without compression,
they still appear as image, not as attached files
* Raise-to-speak defaults to false
* Unify long click behaviour
* Support Android's system function "Delete data"
* Replies to messages pop up automatically even if send from other email addresses (typical scenario for alias addresses)
* Replies to messages pop up automatically
even if send from other email addresses (typical scenario for alias addresses)
* Fix group-replies from normal email-clients.
## v0.1.32
2017-04-22
@@ -158,11 +731,14 @@
* When sending contacts, only use the names the receivers have set themselves
* Show some hints when long-pressing icons in the action bar
## v0.1.29
2017-04-19
* Add Russian translation
* For outgoing (group-)messages, only use the names the receivers have set themselves
* For outgoing (group-)messages,
only use the names the receivers have set themselves
## v0.1.28
2017-04-14
@@ -170,6 +746,7 @@
* Pimp notifications
* Bug fixes
## v0.1.27
2017-04-12
@@ -177,6 +754,7 @@
* Monitor the IMAP-IDLE thread and reconnect if IMAP-IDLE seems to hang
* Various battery and background optimizations
## v0.1.25
2017-04-04
@@ -186,20 +764,26 @@
* Pimp GUI and logo.
* Update Korean.
## v0.1.24
2017-03-31
* Share images and documents from other apps to Delta Chat
* Offer to mailto:-link-support to other apps
* Ignore implausible sending time of incoming messages; use the receive time in these rare cases
* Ignore implausible sending time of incoming messages;
use the receive time in these rare cases
* Show errors only when Delta Chat is in foreground
* Dynamically adapt video bitrate for longer videos to an attachment-size of max. 25 MB
* Dynamically adapt video bitrate for longer videos
to an attachment-size of max. 25 MB
## v0.1.23
2017-03-28
* Retry connecting to IMAP if there is not network available on the first try
* Notify about new messages if the app is not active for hours, optimize battery consumption
* Notify about new messages if the app is not active for hours,
optimize battery consumption
## v0.1.22
2017-03-22
@@ -212,6 +796,7 @@
* Add Hungarian translation
* Add Korean translation
## v0.1.21
2017-03-10
@@ -230,6 +815,7 @@
* Try to clear the task switcher's screenshots when locking the app via pincode
* Pimp GUI
## v0.1.20
2017-02-16
@@ -239,6 +825,7 @@
* Update Polish and Portuguese translations
* Use API level 25 (Nougat 7.1) as target
## v0.1.18
2017-02-11
@@ -249,22 +836,26 @@
* Remove unused source code and strings
* More fixes of lint errors and warnings
## v0.1.17
2017-02-07
* Drop two unnecessary permissions: ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION
* Drop two unnecessary permissions
ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION
* Really add French translation
* Update Portuguese translation
* Start fixing translation handling of the program
* Remove special "foss" build, because the whole program is free now.
## v0.1.16
2017-02-06
* Add French translation
* Fix some lint errors and warnings
## v0.1.15
2017-01-31
* Prepare for release on [F-Droid](https://f-droid.org/)
* Prepare for first release on F-Droid
+25
View File
@@ -0,0 +1,25 @@
FROM ubuntu:17.04
RUN dpkg --add-architecture i386 && \
apt-get update -y && \
apt-get install -y software-properties-common && \
apt-get update -y && \
apt-get install -y libc6:i386=2.24-9ubuntu2.2 libncurses5:i386=6.0+20160625-1ubuntu1 libstdc++6:i386=6.3.0-12ubuntu2 lib32z1=1:1.2.11.dfsg-0ubuntu1 wget openjdk-8-jdk=8u131-b11-2ubuntu1.17.04.3 git unzip && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoremove -y && \
apt-get clean
ENV ANDROID_SDK_FILENAME android-sdk_r24.4.1-linux.tgz
ENV ANDROID_SDK_URL https://dl.google.com/android/${ANDROID_SDK_FILENAME}
ENV ANDROID_API_LEVELS android-27
ENV ANDROID_BUILD_TOOLS_VERSION 27.0.1
ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
RUN cd /usr/local/ && \
wget -q ${ANDROID_SDK_URL} && \
tar -xzf ${ANDROID_SDK_FILENAME} && \
rm ${ANDROID_SDK_FILENAME}
RUN echo y | android update sdk --no-ui -a --filter ${ANDROID_API_LEVELS}
RUN echo y | android update sdk --no-ui -a --filter extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository
RUN echo y | android update sdk --no-ui -a --filter tools,platform-tools,build-tools-${ANDROID_BUILD_TOOLS_VERSION}
RUN rm -rf ${ANDROID_HOME}/tools && unzip ${ANDROID_HOME}/temp/*.zip -d ${ANDROID_HOME}
-3
View File
@@ -1,4 +1,3 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
@@ -620,5 +619,3 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
-128
View File
@@ -1,128 +0,0 @@
apply plugin: 'com.android.application'
repositories {
mavenCentral()
jcenter()
}
task nativeLibsToJar(
type: Zip,
description: 'create a jar archive of the native libs') {
destinationDir file("$buildDir/native-libs")
baseName 'native-libs'
extension 'jar'
from fileTree(dir: 'libs', include: '**/*.so')
into 'lib/'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn(nativeLibsToJar)
}
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.googlecode.mp4parser:isoparser:1.0.6'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile fileTree(dir: "$buildDir/native-libs", include: 'native-libs.jar')
}
android {
compileSdkVersion 25
//buildToolsVersion '25.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig.applicationId = "com.b44t.messenger"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
signingConfigs {
debug {
def debugKeystore = file("config/debug.keystore")
if (debugKeystore.exists()) {
storeFile debugKeystore
}
}
release {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
debug {
debuggable true
jniDebuggable true
signingConfig signingConfigs.debug
applicationIdSuffix ".beta"
}
release {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets.main {
jniLibs.srcDir 'libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
flavorDimensions "none"
productFlavors {
/*
x86 {
ndk {
abiFilter "x86"
}
versionCode = 2
}
arm {
ndk {
abiFilter "armeabi"
}
versionCode = 0
}
armv7 {
ndk {
abiFilter "armeabi-v7a"
}
versionCode = 1
}
*/
fat {
dimension "none"
//versionCode = 3
}
}
/*applicationVariants.all { variant ->
def abiVersion = variant.productFlavors.get(0).versionCode
variant.mergedFlavor.versionCode = defaultConfig.versionCode * 10 + abiVersion;
}*/
defaultConfig {
minSdkVersion 14 // 14: Android 4.0 Ice Cream Sandwich 2011 (Telegram default), 21: Android 5.0 Lollipop 2014 (recommended for InstantRun)
targetSdkVersion 25 // 25: Nougat. CAVE: Do NOT target "Andoid O" without checking the background tasks carefully, see https://developer.android.com/preview/behavior-changes.html#back-all . As long as we target "Nougat", everything works as expected even for "Andoid O" or later
// in general, we should not change the target without reason; eg. after the switch to Nougat, the camera stops working (see https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en )
versionName "0.11.0" // do NOT forget to increase defaultConfig.versionCode!
versionCode 505
}
}
File diff suppressed because it is too large Load Diff
-4
View File
@@ -1,4 +0,0 @@
APP_PLATFORM := android-14
APP_ABI := armeabi armeabi-v7a x86
NDK_TOOLCHAIN_VERSION := 4.9
APP_STL := gnustl_static
-845
View File
@@ -1,845 +0,0 @@
/*******************************************************************************
*
* Delta Chat Android
* (C) 2013-2016 Nikolai Kudashov
* (C) 2017 Björn Petersen
* Contact: r10s@b44t.com, http://b44t.com
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see http://www.gnu.org/licenses/ .
*
******************************************************************************/
#include <jni.h>
#include <ogg/ogg.h>
#include <stdio.h>
#include <opus.h>
#include <stdlib.h>
#include <time.h>
#include <opusfile.h>
#include <math.h>
#include "mrjnimain.h"
typedef struct {
int version;
int channels; /* Number of channels: 1..255 */
int preskip;
ogg_uint32_t input_sample_rate;
int gain; /* in dB S7.8 should be zero whenever possible */
int channel_mapping;
/* The rest is only used if channel_mapping != 0 */
int nb_streams;
int nb_coupled;
unsigned char stream_map[255];
} OpusHeader;
typedef struct {
unsigned char *data;
int maxlen;
int pos;
} Packet;
typedef struct {
const unsigned char *data;
int maxlen;
int pos;
} ROPacket;
typedef struct {
void *readdata;
opus_int64 total_samples_per_channel;
int rawmode;
int channels;
long rate;
int gain;
int samplesize;
int endianness;
char *infilename;
int ignorelength;
int skip;
int extraout;
char *comments;
int comments_length;
int copy_comments;
} oe_enc_opt;
static int write_uint32(Packet *p, ogg_uint32_t val) {
if (p->pos > p->maxlen - 4) {
return 0;
}
p->data[p->pos ] = (val ) & 0xFF;
p->data[p->pos+1] = (val>> 8) & 0xFF;
p->data[p->pos+2] = (val>>16) & 0xFF;
p->data[p->pos+3] = (val>>24) & 0xFF;
p->pos += 4;
return 1;
}
static int write_uint16(Packet *p, ogg_uint16_t val) {
if (p->pos > p->maxlen-2) {
return 0;
}
p->data[p->pos ] = (val ) & 0xFF;
p->data[p->pos+1] = (val>> 8) & 0xFF;
p->pos += 2;
return 1;
}
static int write_chars(Packet *p, const unsigned char *str, int nb_chars)
{
int i;
if (p->pos>p->maxlen-nb_chars)
return 0;
for (i=0;i<nb_chars;i++)
p->data[p->pos++] = str[i];
return 1;
}
static int read_uint32(ROPacket *p, ogg_uint32_t *val)
{
if (p->pos>p->maxlen-4)
return 0;
*val = (ogg_uint32_t)p->data[p->pos ];
*val |= (ogg_uint32_t)p->data[p->pos+1]<< 8;
*val |= (ogg_uint32_t)p->data[p->pos+2]<<16;
*val |= (ogg_uint32_t)p->data[p->pos+3]<<24;
p->pos += 4;
return 1;
}
static int read_uint16(ROPacket *p, ogg_uint16_t *val)
{
if (p->pos>p->maxlen-2)
return 0;
*val = (ogg_uint16_t)p->data[p->pos ];
*val |= (ogg_uint16_t)p->data[p->pos+1]<<8;
p->pos += 2;
return 1;
}
static int read_chars(ROPacket *p, unsigned char *str, int nb_chars)
{
int i;
if (p->pos>p->maxlen-nb_chars)
return 0;
for (i=0;i<nb_chars;i++)
str[i] = p->data[p->pos++];
return 1;
}
static int opus_header_to_packet(const OpusHeader *h, unsigned char *packet, int len) {
int i;
Packet p;
unsigned char ch;
p.data = packet;
p.maxlen = len;
p.pos = 0;
if (len < 19) {
return 0;
}
if (!write_chars(&p, (const unsigned char *)"OpusHead", 8)) {
return 0;
}
ch = 1;
if (!write_chars(&p, &ch, 1)) {
return 0;
}
ch = h->channels;
if (!write_chars(&p, &ch, 1)) {
return 0;
}
if (!write_uint16(&p, h->preskip)) {
return 0;
}
if (!write_uint32(&p, h->input_sample_rate)) {
return 0;
}
if (!write_uint16(&p, h->gain)) {
return 0;
}
ch = h->channel_mapping;
if (!write_chars(&p, &ch, 1)) {
return 0;
}
if (h->channel_mapping != 0) {
ch = h->nb_streams;
if (!write_chars(&p, &ch, 1)) {
return 0;
}
ch = h->nb_coupled;
if (!write_chars(&p, &ch, 1)) {
return 0;
}
/* Multi-stream support */
for (i = 0; i < h->channels; i++) {
if (!write_chars(&p, &h->stream_map[i], 1)) {
return 0;
}
}
}
return p.pos;
}
#define writeint(buf, base, val) do { buf[base + 3] = ((val) >> 24) & 0xff; \
buf[base + 2]=((val) >> 16) & 0xff; \
buf[base + 1]=((val) >> 8) & 0xff; \
buf[base] = (val) & 0xff; \
} while(0)
static void comment_init(char **comments, int *length, const char *vendor_string) {
// The 'vendor' field should be the actual encoding library used
int vendor_length = strlen(vendor_string);
int user_comment_list_length = 0;
int len = 8 + 4 + vendor_length + 4;
char *p = (char *)malloc(len);
memcpy(p, "OpusTags", 8);
writeint(p, 8, vendor_length);
memcpy(p + 12, vendor_string, vendor_length);
writeint(p, 12 + vendor_length, user_comment_list_length);
*length = len;
*comments = p;
}
static void comment_pad(char **comments, int* length, int amount) {
if (amount > 0) {
char *p = *comments;
// Make sure there is at least amount worth of padding free, and round up to the maximum that fits in the current ogg segments
int newlen = (*length + amount + 255) / 255 * 255 - 1;
p = realloc(p, newlen);
for (int i = *length; i < newlen; i++) {
p[i] = 0;
}
*comments = p;
*length = newlen;
}
}
static int writeOggPage(ogg_page *page, FILE *os) {
int written = fwrite(page->header, sizeof(unsigned char), page->header_len, os);
written += fwrite(page->body, sizeof(unsigned char), page->body_len, os);
return written;
}
static const opus_int32 bitrate = 16000;
static const opus_int32 rate = 16000;
static const opus_int32 frame_size = 960;
static const int with_cvbr = 1;
static const int max_ogg_delay = 0;
static const int comment_padding = 512;
static opus_int32 coding_rate = 16000;
static ogg_int32_t _packetId;
static OpusEncoder *_encoder = 0;
static uint8_t *_packet = 0;
static ogg_stream_state os;
static FILE *_fileOs = 0;
static oe_enc_opt inopt;
static OpusHeader header;
static opus_int32 min_bytes;
static int max_frame_bytes;
static ogg_packet op;
static ogg_page og;
static opus_int64 bytes_written;
static opus_int64 pages_out;
static opus_int64 total_samples;
static ogg_int64_t enc_granulepos;
static ogg_int64_t last_granulepos;
static int size_segments;
static int last_segments;
static void cleanupRecorder() {
ogg_stream_flush(&os, &og);
if (_encoder) {
opus_encoder_destroy(_encoder);
_encoder = 0;
}
ogg_stream_clear(&os);
if (_packet) {
free(_packet);
_packet = 0;
}
if (_fileOs) {
fclose(_fileOs);
_fileOs = 0;
}
_packetId = -1;
bytes_written = 0;
pages_out = 0;
total_samples = 0;
enc_granulepos = 0;
size_segments = 0;
last_segments = 0;
last_granulepos = 0;
memset(&os, 0, sizeof(ogg_stream_state));
memset(&inopt, 0, sizeof(oe_enc_opt));
memset(&header, 0, sizeof(OpusHeader));
memset(&op, 0, sizeof(ogg_packet));
memset(&og, 0, sizeof(ogg_page));
}
static int initRecorder(const char *path) {
cleanupRecorder();
if (!path) {
return 0;
}
_fileOs = fopen(path, "wb");
if (!_fileOs) {
return 0;
}
inopt.rate = rate;
inopt.gain = 0;
inopt.endianness = 0;
inopt.copy_comments = 0;
inopt.rawmode = 1;
inopt.ignorelength = 1;
inopt.samplesize = 16;
inopt.channels = 1;
inopt.skip = 0;
comment_init(&inopt.comments, &inopt.comments_length, opus_get_version_string());
if (rate > 24000) {
coding_rate = 48000;
} else if (rate > 16000) {
coding_rate = 24000;
} else if (rate > 12000) {
coding_rate = 16000;
} else if (rate > 8000) {
coding_rate = 12000;
} else {
coding_rate = 8000;
}
if (rate != coding_rate) {
LOGE("Invalid rate");
return 0;
}
header.channels = 1;
header.channel_mapping = 0;
header.input_sample_rate = rate;
header.gain = inopt.gain;
header.nb_streams = 1;
int result = OPUS_OK;
_encoder = opus_encoder_create(coding_rate, 1, OPUS_APPLICATION_AUDIO, &result);
if (result != OPUS_OK) {
LOGE("Error cannot create encoder: %s", opus_strerror(result));
return 0;
}
min_bytes = max_frame_bytes = (1275 * 3 + 7) * header.nb_streams;
_packet = malloc(max_frame_bytes);
result = opus_encoder_ctl(_encoder, OPUS_SET_BITRATE(bitrate));
if (result != OPUS_OK) {
LOGE("Error OPUS_SET_BITRATE returned: %s", opus_strerror(result));
return 0;
}
#ifdef OPUS_SET_LSB_DEPTH
result = opus_encoder_ctl(_encoder, OPUS_SET_LSB_DEPTH(max(8, min(24, inopt.samplesize))));
if (result != OPUS_OK) {
LOGE("Warning OPUS_SET_LSB_DEPTH returned: %s", opus_strerror(result));
}
#endif
opus_int32 lookahead;
result = opus_encoder_ctl(_encoder, OPUS_GET_LOOKAHEAD(&lookahead));
if (result != OPUS_OK) {
LOGE("Error OPUS_GET_LOOKAHEAD returned: %s", opus_strerror(result));
return 0;
}
inopt.skip += lookahead;
header.preskip = (int)(inopt.skip * (48000.0 / coding_rate));
inopt.extraout = (int)(header.preskip * (rate / 48000.0));
if (ogg_stream_init(&os, rand()) == -1) {
LOGE("Error: stream init failed");
return 0;
}
unsigned char header_data[100];
int packet_size = opus_header_to_packet(&header, header_data, 100);
op.packet = header_data;
op.bytes = packet_size;
op.b_o_s = 1;
op.e_o_s = 0;
op.granulepos = 0;
op.packetno = 0;
ogg_stream_packetin(&os, &op);
while ((result = ogg_stream_flush(&os, &og))) {
if (!result) {
break;
}
int pageBytesWritten = writeOggPage(&og, _fileOs);
if (pageBytesWritten != og.header_len + og.body_len) {
LOGE("Error: failed writing header to output stream");
return 0;
}
bytes_written += pageBytesWritten;
pages_out++;
}
comment_pad(&inopt.comments, &inopt.comments_length, comment_padding);
op.packet = (unsigned char *)inopt.comments;
op.bytes = inopt.comments_length;
op.b_o_s = 0;
op.e_o_s = 0;
op.granulepos = 0;
op.packetno = 1;
ogg_stream_packetin(&os, &op);
while ((result = ogg_stream_flush(&os, &og))) {
if (result == 0) {
break;
}
int writtenPageBytes = writeOggPage(&og, _fileOs);
if (writtenPageBytes != og.header_len + og.body_len) {
LOGE("Error: failed writing header to output stream");
return 0;
}
bytes_written += writtenPageBytes;
pages_out++;
}
free(inopt.comments);
return 1;
}
static int writeFrame(uint8_t *framePcmBytes, unsigned int frameByteCount) {
int cur_frame_size = frame_size;
_packetId++;
opus_int32 nb_samples = frameByteCount / 2;
total_samples += nb_samples;
if (nb_samples < frame_size) {
op.e_o_s = 1;
} else {
op.e_o_s = 0;
}
int nbBytes = 0;
if (nb_samples != 0) {
uint8_t *paddedFrameBytes = framePcmBytes;
int freePaddedFrameBytes = 0;
if (nb_samples < cur_frame_size) {
paddedFrameBytes = malloc(cur_frame_size * 2);
freePaddedFrameBytes = 1;
memcpy(paddedFrameBytes, framePcmBytes, frameByteCount);
memset(paddedFrameBytes + nb_samples * 2, 0, cur_frame_size * 2 - nb_samples * 2);
}
nbBytes = opus_encode(_encoder, (opus_int16 *)paddedFrameBytes, cur_frame_size, _packet, max_frame_bytes / 10);
if (freePaddedFrameBytes) {
free(paddedFrameBytes);
paddedFrameBytes = NULL;
}
if (nbBytes < 0) {
LOGE("Encoding failed: %s. Aborting.", opus_strerror(nbBytes));
return 0;
}
enc_granulepos += cur_frame_size * 48000 / coding_rate;
size_segments = (nbBytes + 255) / 255;
min_bytes = min(nbBytes, min_bytes);
}
while ((((size_segments <= 255) && (last_segments + size_segments > 255)) || (enc_granulepos - last_granulepos > max_ogg_delay)) && ogg_stream_flush_fill(&os, &og, 255 * 255)) {
if (ogg_page_packets(&og) != 0) {
last_granulepos = ogg_page_granulepos(&og);
}
last_segments -= og.header[26];
int writtenPageBytes = writeOggPage(&og, _fileOs);
if (writtenPageBytes != og.header_len + og.body_len) {
LOGE("Error: failed writing data to output stream");
return 0;
}
bytes_written += writtenPageBytes;
pages_out++;
}
op.packet = (unsigned char *)_packet;
op.bytes = nbBytes;
op.b_o_s = 0;
op.granulepos = enc_granulepos;
if (op.e_o_s) {
op.granulepos = ((total_samples * 48000 + rate - 1) / rate) + header.preskip;
}
op.packetno = 2 + _packetId;
ogg_stream_packetin(&os, &op);
last_segments += size_segments;
while ((op.e_o_s || (enc_granulepos + (frame_size * 48000 / coding_rate) - last_granulepos > max_ogg_delay) || (last_segments >= 255)) ? ogg_stream_flush_fill(&os, &og, 255 * 255) : ogg_stream_pageout_fill(&os, &og, 255 * 255)) {
if (ogg_page_packets(&og) != 0) {
last_granulepos = ogg_page_granulepos(&og);
}
last_segments -= og.header[26];
int writtenPageBytes = writeOggPage(&og, _fileOs);
if (writtenPageBytes != og.header_len + og.body_len) {
LOGE("Error: failed writing data to output stream");
return 0;
}
bytes_written += writtenPageBytes;
pages_out++;
}
return 1;
}
JNIEXPORT int Java_com_b44t_messenger_MediaController_startRecord(JNIEnv *env, jclass class, jstring path) {
const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
int result = initRecorder(pathStr);
if (pathStr != 0) {
(*env)->ReleaseStringUTFChars(env, path, pathStr);
}
return result;
}
JNIEXPORT int Java_com_b44t_messenger_MediaController_writeFrame(JNIEnv *env, jclass class, jobject frame, jint len) {
jbyte *frameBytes = (*env)->GetDirectBufferAddress(env, frame);
return writeFrame(frameBytes, len);
}
JNIEXPORT void Java_com_b44t_messenger_MediaController_stopRecord(JNIEnv *env, jclass class) {
cleanupRecorder();
}
//player
static OggOpusFile *_opusFile;
static int _isSeekable = 0;
static int64_t _totalPcmDuration = 0;
static int64_t _currentPcmOffset = 0;
static int _finished = 0;
static const int playerBuffersCount = 3;
static const int playerSampleRate = 48000;
static void cleanupPlayer() {
if (_opusFile) {
op_free(_opusFile);
_opusFile = 0;
}
_isSeekable = 0;
_totalPcmDuration = 0;
_currentPcmOffset = 0;
_finished = 0;
}
static int seekPlayer(float position) {
if (!_opusFile || !_isSeekable || position < 0) {
return 0;
}
int result = op_pcm_seek(_opusFile, (ogg_int64_t)(position * _totalPcmDuration));
if (result != OPUS_OK) {
LOGE("op_pcm_seek failed: %d", result);
}
ogg_int64_t pcmPosition = op_pcm_tell(_opusFile);
_currentPcmOffset = pcmPosition;
return result == OPUS_OK;
}
static int initPlayer(const char *path) {
cleanupPlayer();
int openError = OPUS_OK;
_opusFile = op_open_file(path, &openError);
if (!_opusFile || openError != OPUS_OK) {
LOGE("op_open_file failed: %d", openError);
cleanupPlayer();
return 0;
}
_isSeekable = op_seekable(_opusFile);
_totalPcmDuration = op_pcm_total(_opusFile, -1);
return 1;
}
static void fillBuffer(uint8_t *buffer, int capacity, int *args) {
if (_opusFile) {
args[1] = max(0, op_pcm_tell(_opusFile));
if (_finished) {
args[0] = 0;
args[1] = 0;
args[2] = 1;
return;
} else {
int writtenOutputBytes = 0;
int endOfFileReached = 0;
while (writtenOutputBytes < capacity) {
int readSamples = op_read(_opusFile, (opus_int16 *)(buffer + writtenOutputBytes), (capacity - writtenOutputBytes) / 2, NULL);
if (readSamples > 0) {
writtenOutputBytes += readSamples * 2;
} else {
if (readSamples < 0) {
LOGE("op_read failed: %d", readSamples);
}
endOfFileReached = 1;
break;
}
}
args[0] = writtenOutputBytes;
if (endOfFileReached || args[1] + args[0] == _totalPcmDuration) {
_finished = 1;
args[2] = 1;
} else {
args[2] = 0;
}
}
} else {
memset(buffer, 0, capacity);
args[0] = capacity;
args[1] = _totalPcmDuration;
}
}
JNIEXPORT jlong Java_com_b44t_messenger_MediaController_getTotalPcmDuration(JNIEnv *env, jclass class) {
return _totalPcmDuration;
}
JNIEXPORT void Java_com_b44t_messenger_MediaController_readOpusFile(JNIEnv *env, jclass class, jobject buffer, jint capacity, jintArray args) {
jint *argsArr = (*env)->GetIntArrayElements(env, args, 0);
jbyte *bufferBytes = (*env)->GetDirectBufferAddress(env, buffer);
fillBuffer(bufferBytes, capacity, argsArr);
(*env)->ReleaseIntArrayElements(env, args, argsArr, 0);
}
JNIEXPORT int Java_com_b44t_messenger_MediaController_seekOpusFile(JNIEnv *env, jclass class, jfloat position) {
return seekPlayer(position);
}
JNIEXPORT int Java_com_b44t_messenger_MediaController_openOpusFile(JNIEnv *env, jclass class, jstring path) {
const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
int result = initPlayer(pathStr);
if (pathStr != 0) {
(*env)->ReleaseStringUTFChars(env, path, pathStr);
}
return result;
}
JNIEXPORT void Java_com_b44t_messenger_MediaController_closeOpusFile(JNIEnv *env, jclass class) {
cleanupPlayer();
}
JNIEXPORT int Java_com_b44t_messenger_MediaController_isOpusFile(JNIEnv *env, jclass class, jstring path) {
const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
int result = 0;
int error = OPUS_OK;
OggOpusFile *file = op_test_file(pathStr, &error);
if (file != NULL) {
int error = op_test_open(file);
op_free(file);
result = error == OPUS_OK;
}
if (pathStr != 0) {
(*env)->ReleaseStringUTFChars(env, path, pathStr);
}
return result;
}
static inline void set_bits(uint8_t *bytes, int32_t bitOffset, int32_t value) {
bytes += bitOffset / 8;
bitOffset %= 8;
*((int32_t *) bytes) |= (value << bitOffset);
}
JNIEXPORT jbyteArray Java_com_b44t_messenger_MediaController_getWaveform2(JNIEnv *env, jclass class, jshortArray array, jint length) {
jshort *sampleBuffer = (*env)->GetShortArrayElements(env, array, 0);
jbyteArray result = 0;
int32_t resultSamples = 100;
uint16_t *samples = malloc(100 * 2);
uint64_t sampleIndex = 0;
uint16_t peakSample = 0;
int32_t sampleRate = (int32_t) max(1, length / resultSamples);
int index = 0;
for (int i = 0; i < length; i++) {
uint16_t sample = (uint16_t) abs(sampleBuffer[i]);
if (sample > peakSample) {
peakSample = sample;
}
if (sampleIndex++ % sampleRate == 0) {
if (index < resultSamples) {
samples[index++] = peakSample;
}
peakSample = 0;
}
}
int64_t sumSamples = 0;
for (int i = 0; i < resultSamples; i++) {
sumSamples += samples[i];
}
uint16_t peak = (uint16_t) (sumSamples * 1.8f / resultSamples);
if (peak < 2500) {
peak = 2500;
}
for (int i = 0; i < resultSamples; i++) {
uint16_t sample = (uint16_t) ((int64_t) samples[i]);
if (sample > peak) {
samples[i] = peak;
}
}
(*env)->ReleaseShortArrayElements(env, array, sampleBuffer, 0);
int bitstreamLength = (resultSamples * 5) / 8 + (((resultSamples * 5) % 8) == 0 ? 0 : 1);
result = (*env)->NewByteArray(env, bitstreamLength);
jbyte *bytes = (*env)->GetByteArrayElements(env, result, NULL);
for (int i = 0; i < resultSamples; i++) {
int32_t value = min(31, abs((int32_t) samples[i]) * 31 / peak);
set_bits(bytes, i * 5, value & 31);
}
(*env)->ReleaseByteArrayElements(env, result, bytes, JNI_COMMIT);
free(samples);
return result;
}
static int16_t *sampleBuffer = NULL;
JNIEXPORT jbyteArray Java_com_b44t_messenger_MediaController_getWaveform(JNIEnv *env, jclass class, jstring path) {
const char *pathStr = (*env)->GetStringUTFChars(env, path, 0);
jbyteArray result = 0;
int error = OPUS_OK;
OggOpusFile *opusFile = op_open_file(pathStr, &error);
if (opusFile != NULL && error == OPUS_OK) {
int64_t totalSamples = op_pcm_total(opusFile, -1);
int32_t resultSamples = 100;
int32_t sampleRate = (int32_t) max(1, totalSamples / resultSamples);
uint16_t *samples = malloc(100 * 2);
int bufferSize = 1024 * 128;
if (sampleBuffer == NULL) {
sampleBuffer = malloc(bufferSize);
}
uint64_t sampleIndex = 0;
uint16_t peakSample = 0;
int index = 0;
while (1) {
int readSamples = op_read(opusFile, sampleBuffer, bufferSize / 2, NULL);
for (int i = 0; i < readSamples; i++) {
uint16_t sample = (uint16_t) abs(sampleBuffer[i]);
if (sample > peakSample) {
peakSample = sample;
}
if (sampleIndex++ % sampleRate == 0) {
if (index < resultSamples) {
samples[index++] = peakSample;
}
peakSample = 0;
}
}
if (readSamples == 0) {
break;
}
}
int64_t sumSamples = 0;
for (int i = 0; i < resultSamples; i++) {
sumSamples += samples[i];
}
uint16_t peak = (uint16_t) (sumSamples * 1.8f / resultSamples);
if (peak < 2500) {
peak = 2500;
}
for (int i = 0; i < resultSamples; i++) {
uint16_t sample = (uint16_t) ((int64_t) samples[i]);
if (sample > peak) {
samples[i] = peak;
}
}
//free(sampleBuffer);
op_free(opusFile);
int bitstreamLength = (resultSamples * 5) / 8 + (((resultSamples * 5) % 8) == 0 ? 0 : 1);
result = (*env)->NewByteArray(env, bitstreamLength);
jbyte *bytes = (*env)->GetByteArrayElements(env, result, NULL);
for (int i = 0; i < resultSamples; i++) {
int32_t value = min(31, abs((int32_t) samples[i]) * 31 / peak);
set_bits(bytes, i * 5, value & 31);
}
(*env)->ReleaseByteArrayElements(env, result, bytes, JNI_COMMIT);
free(samples);
}
if (pathStr != 0) {
(*env)->ReleaseStringUTFChars(env, path, pathStr);
}
return result;
}
-48
View File
@@ -1,48 +0,0 @@
Rob Siemborski <rjs3+@andrew.cmu.edu> wrote and tested the conversion
to the SASLv2 API.
Ken Murchison <murch@andrew.cmu.edu> worked on the OTP, NTLM, SRP and SQL
plugins, as well as helping to track down bugs as they appear. He also
added support for HTTP authentication.
Rob Earhart <earhart@cmu.edu> wrote the build/installation procedure,
wrote and tested some of the code, and provided general guidance and
coding advice.
Leif Johansson <leifj@matematik.su.se> wrote the GSSAPI plugin, with
contributions from Sam Hartman <hartmans@fundsxpress.com>.
Leandro Santi <lesanti@sinectis.com.ar> added Courier authdaemon support.
Alexey Melnikov <alexey.melnikov@isode.com> wrote the first pass of the
DIGEST-MD5 plugin and continues to work on it. He also wrote
a good deal of the current Windows support.
Rainer Schoepf <schoepf@uni-mainz.de> contributed the LOGIN plugin,
based on Tim Martin's PLAIN plugin.
Simon Loader <simon@surf.org.uk> wrote the MySQL auxprop module.
Rolf Braun <rbraun@andrew.cmu.edu> wrote the MacOS ports.
Howard Chu <hyc@highlandsun.com> put a good deal of work into OS/390
portability, correct building of static libraries, and a slew
of misc. bugfixes.
Tim Martin <tmartin@andrew.cmu.edu> wrote, debugged, and tested
most of the SASLv1 code.
Larry Greenfield <leg+sasl@andrew.cmu.edu> complained. a lot.
Chris Newman <chris.newman@oracle.com> wrote the initial version of the
SASL API, as well as the version 2 SASL API (documented in sasl.h,
saslutil.h, saslplug.h, and prop.h).
Ryan Troll <ryan@andrew.cmu.edu> started the Windows port,
and both Larry Greenfield and Alexey Melnikov have done more work on it.
getaddrinfo.c was written by Hajimu UMEMOTO <ume@mahoroba.org>
which is based on the IPv6 code written by KIKUCHI Takahiro
<kick@kyoto.wide.ad.jp>
$Id: AUTHORS,v 1.18 2006/12/01 17:34:58 mel Exp $
-44
View File
@@ -1,44 +0,0 @@
/* CMU libsasl
* Tim Martin
* Rob Earhart
* Rob Siemborski
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
File diff suppressed because it is too large Load Diff
-302
View File
@@ -1,302 +0,0 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
6. Often, you can also type `make uninstall' to remove the installed
files again.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *Note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
-1
View File
@@ -1 +0,0 @@
For installation instructions, see doc/install.html.
-503
View File
@@ -1,503 +0,0 @@
New in 2.1.26
-------------
* Modernize SASL malloc/realloc callback prototypes
* Added sasl_config_done() to plug a memory leak when using an application
specific config file
* Fixed PLAIN/LOGIN authentication failure when using saslauthd
with no auxprop plugins (bug # 3590).
* unlock the mutex in sasl_dispose if the context was freed by another thread
* MINGW32 compatibility patches
* Fixed broken logic in get_fqhostname() when abort_if_no_fqdn is 0
* Fixed some memory leaks in libsasl
* GSSAPI plugin:
- Fixed a segfault in gssapi.c introduced in 2.1.25.
- Code refactoring
- Added support for GSS-SPNEGO SASL mechanism (Unix only), which is also
HTTP capable
* GS2 plugin:
- Updated GS2 plugin not to lose minor GSS-API status codes on errors
* DIGEST-MD5 plugin:
- Correctly send "stale" directive to prevent clients from (re)promtping
for password
- Better handling of HTTP reauthentication cases
- fixed some memory leaks
* SASLDB plugin:
- Added support for BerkleyDB 5.X or later
* OTP plugin:
- Removed calling of EVP_cleanup() on plugin shutdown in order to prevent
TLS from failing in calling applications
* SRP plugin:
- Removed calling of EVP_cleanup() on plugin shutdown in order to prevent
TLS from failing in calling applications
* saslauthd:
- auth_rimap.c: qstring incorrectly appending the closing double quote,
which might be causing crashes
- auth_rimap.c: read the whole IMAP greeting
- better error reporting from some drivers
- fixed some memory leaks
New in 2.1.25
-------------
* Make sure that a failed authorization doesn't preclude
further server-side SASL authentication attempts from working.
* Fixed a crash caused by aborted SASL authentication
and initiation of another one using the same SASL context.
* (Windows) Fixed the random number generator to actually produce random
output on each run.
* Be protective against calling sasl_server_step once authentication
has failed (multiple SASL plugins)
* Fixed several bugs in the mech_avail callback handling
in the server side code.
* Added support for channel bindings
* Added support for ordering SASL mechanisms by strength (on the client side),
or using the "client_mech_list" option.
* server_idle needs to obey server's SASL mechanism list from the server
context.
* Better server plugin API mismatch reporting
* Build:
- Updated config to the latest GNU snapshot
- Fixed SASL's libtool MacOS/X 64-bit file magic
* New SASL plugin: SCRAM
* New SASL plugin: GS2
* DIGEST-MD5 plugin:
- Allow DIGEST-MD5 plugin to be used for client-side and
server-side HTTP Digest, including running over non-persistent
connections (RFC 2617)
- Use the same username for reauthentication cache lookup and update
- Minimize the number of auxprop lookups in the server side DIGEST-MD5
plugin for the most common case when authentication and authorization
identities are the same.
- Updated digestmd5_server_mech_step2() to be more defensive against
empty client input.
- Fixed some memory leaks on failed plugin initialization.
Prevent potential race condition when freeding plugin state.
Set the freed reauthentication cache mutex to NULL, to make errors
due to mutex access after free more obvious.
- Test against broken UTF-8 based hashes if calculation using special
ISO-8859-1 code fails.
- Fixed an interop problem with some LDAP clients ignoring server
advertised realm and providing their own.
* GSSAPI plugin:
- Fix to build GSSAPI with Heimdal
- Properly set serveroutlen to 0 in one place.
Don't send empty challenge once server context establishment is done,
as this is in violation of the RFC 2222 and its successor.
- Don't send maxbuf, if no security layer can be established.
Added additional checks for buffer lengths.
* LDAPDB plugin:
- build fixes
New in 2.1.24
-------------
* Order advertised server-side SASL mechanisms per the specified 'mech_list'
option or by relative "strength"
* Make sure that sasl_set_alloc() has no effect once sasl_client_init()
or sasl_server_init() is called
* Fixed sasl_set_mutex() to disallow changing mutex management functions
once sasl_server_init()/sasl_client_init() is called (bug # 3083)
* Removed unused mutexes in lib/client.c and lib/server.c (bug # 3141)
* Added direct support for hashed password to auxprop API
* Don't treat a constraint violation as an error to store an auxprop property
* Extended libsasl (auxprop) to support user deletion
* Extended SASL auxprop_lookup to return error code
* Updated sasl_user_exists() so that it can handle passwordless accounts (e.g. disabled)
* (Windows) Free handles of shared libraries on Windows that were loaded
but are not SASL plugins (bug # 2089)
* Prevent freeing of common state on a subsequent call to _sasl_common_init.
Make sure that the last global callback always wins.
* Implemented sasl_client_done()/sasl_server_done()
* Added automatic hostname canonicalization inside libsasl
* Made sasl_config_init() public
* Strip trailing spaces from server config file option values (bug # 3139, bug # 3041)
* Fixed potential buffer overflow in saslautd_verify_password().
* Fixed segfault in dlclose() on HPUX
* Various bugfixes for 64bit platforms
* Fixed bug # 2895 (passing LF to sasl_decode64) in sample/sample-client.c,
sample/sample-server.c, utils/smtptest.c
* pluginviewer: Code cleanup, improved human readable messages
* Build:
- (Windows) Updated makefiles to build with VC 8.0 (VC++ 2005)
- (Windows) Added Windows64 build
- Updated to use .plugin extension on MacOS
- Changed 64bit HP-UX build to use .so for shared libraries
* saslauthd:
- Fixed bug counting double-quotes in username/password in
auth_rimap.c. Also fixed bug zeroing password.
- auth_krb.c: improved diagnostic in the k5support_verify_tgt() function.
- auth_sasldb.c: pid_file_lock is created with a mask of 644 instead of 0644
- auth_shadow.c: Define _XOPEN_SOURCE before including unistd.h,
so that crypt is correctly defined
- auth_getpwent.c: Fixed Solaris build
* SASLDB plugin:
- Fixed spurious 'user not found' errors caused by an attempt
to delete a non-existent property
- Added direct support for hashed password to auxprop API
- Sleepycat driver: Return SASL_NOUSER instead of SASL_FAIL when the database
file doesn't exist
- Ignore properties starting with '*' in the auxprop store function
* SQL plugin:
- Added support for SQLITE3
- Uninitialized variables can cause crash when the searched user is not found
- Added direct support for hashed password
- Ignore properties starting with '*' in the auxprop store function
* LDAPDB plugin:
- Added code to extend LDAPDB into a canon_user plugin in addition
to its existing auxprop plugin functionality
* PLAIN plugin:
- Advertise SASL_SEC_PASS_CREDENTIALS feature
* LOGIN plugin:
- Advertise SASL_SEC_PASS_CREDENTIALS feature
* DIGEST-MD5 plugin:
- Fixed a memory leak in the DIGEST-MD5 security layer
- Fixed memory leaks in client-side reauth and other places
- More detailed error reporting.
- Fixed parsing of challenges/responses with extra commas.
- Allow for multiple qop options from the server and require
a single qop option from the client.
* GSSAPI plugin:
- Check that params->serverFQDN is not NULL before using strlen on it
- Make auxprop lookup calls optional
* EXTERNAL plugin:
- Make auxprop lookup calls optional
* NTLM plugin:
- allow a comma separated list of servernames in 'ntlm_server' option
- Fixed crash in calculating NTv2 reponse
* OTP plugin:
- Don't use a stack variable for an OTP prompt (bug # 2822)
- Downgrade the failure to store OTP secret to debug level
* KERBEROS_V4 plugin:
- Make auxprop lookup calls optional
New in 2.1.23
-------------
* Fixed CERT VU#238019 (make sure sasl_encode64() always NUL
terminates output or returns SASL_BUFOVER)
New in 2.1.22
-------------
* Added support for spliting big data blocks (bigger than maxbuf)
into multiple SASL packets in sasl_encodev
* Various sasl_decode64() fixes
* Increase canonicalization buffer size to 1024 bytes
* Call do_authorization() after successful APOP authentication
* Allow for configuration file location to be configurable independently
of plugin location (bug # 2795)
* Added sasl_set_path function, which provides a more convenient way
of setting plugin and config paths. Changed the default
sasl_getpath_t/sasl_getconfpath_t callbacks to calculate
the value only once and cache it for later use.
* Fixed load_config to search for the config file in all directories
(bug # 2796). Changed the default search path to be
/usr/lib/sasl2:/etc/sasl2
* Don't ignore log_level configuration option in default UNIX syslog
logging callback
* (Windows) Minor IPv6 related changes in Makefiles for Visual Studio 6
* (Windows) Fixed bug of not setting the CODEGEN (code generation option)
nmake option if STATIC nmake option is set.
* Several fixed to DIGEST-MD5 plugin:
- Enable RC4 cipher in Windows build of DIGEST-MD5
- Server side: handle missing realm option as if realm="" was sent
- Fix DIGEST-MD5 to properly advertise maxssf when both DES and RC4
are disabled
- Check that DIGEST-MD5 SASL packet are no shorter than 16 bytes
* Several changes/fixed to SASLDB plugin:
- Prevent spurious SASL_NOUSER errors
- Added ability to keep BerkleyDB handle open between operations
(for performance reason). New behavior can be enabled
with --enable-keep-db-open.
* Better error checking in SQL (MySQL) auxprop plugin code
* Added support for HTTP POST password validation in saslauthd
* Added new application ("pluginviewer") that helps report information
about installed plugins
* Allow for building with OpenSSL 0.9.8
* Allow for building with OpenLDAP 2.3+
* Several quoting fixes to configure script
* A large number of other minor bugfixes and cleanups
New in 2.1.21
-------------
* Fixes DIGEST-MD5 server side segfault caused by the client not sending
any realms
* Minor Other bugfixes
New in 2.1.20
-------------
* Fixes to cram plugin to avoid attempting to canonify uninitialized data.
* NTLM portability fixes.
* Avoid potential attack using SASL_PATH when sasl is used in a setuid
environment.
* A trivial number of small bugfixes.
New in 2.1.19
-------------
* Fixes to saslauthd to allow better integration with realms (-r flag to
saslauthd, %R token in LDAP module)
* Support for forwarding of GSSAPI credentials
* SQLite support for the SQL plugin
* A nontrivial number of small bugfixes.
New in 2.1.18
-------------
* saslauthd/LDAP no longer tagged "experimental"
* Add group membership check to saslauthd/LDAP
* Fix Solaris 9 "NI_WITHSCOPEID" issue
* Fix missing "getaddrinfo.c" and other distribution problems
* Significant Windows enhancements
* A large number of other minor bugfixes and cleanups
New in 2.1.17
-------------
* Allow selection of GSSAPI implementation explicitly (--with-gss_impl)
* Other GSSAPI detection improvements
* Now correctly do authorizaton callback in sasl_checkpass()
* Disable KERBEROS_V4 by default
* Continued Win32/Win64 Improvements
* Minor Other bugfixes
New in 2.1.16-BETA
------------------
* Significantly improved Win32 support
* Writable auxprop support
* Expanded SQL support (including postgres)
* Significantly improved documentation
* Improved realm/username handling with saslauthd
* Support for modern automake and autoconf
New in 2.1.15
-------------
* Fix a number of build issues
* Add a doc/components.html that hopefully describes how things
interact better.
New in 2.1.14
-------------
* OS X 10.2 support
* Support for the Sun SEAM GSSAPI implementation
* Support for MySQL 4
* A number of build fixes
* Other minor bugfixes
New in 2.1.13
-------------
* Add a configure option to allow specification of what /dev/random to use.
* Addition of a saslauthd credential cache feature (-c option).
* Unification of the saslauthd ipc method code.
* Fix a number of autoconf issues.
* A significant number of fixes throughout the library from Sun Microsystems.
* Other minor bugfixes.
New in 2.1.12
-------------
* Distribute in Solaris tar (not GNU tar format)
* Fix a number of build/configure related issues.
New in 2.1.11
-------------
* Add the fastbind auth method to the saslauthd LDAP module.
* Fix a potential memory leak in the doors version of saslauthd.
* NTLM now only requires one of LM or NT, not both.
* Fix a variety of Berkeley DB, LDAP, OpenSSL, and other build issues.
* Win32 support compiles, but no documentation as of yet.
New in 2.1.10
-------------
* Further DIGEST-MD5 DES interoperability fixes. Now works against Active
Directory.
* Fix some potential buffer overflows.
* Misc. cleanups in the saslauthd LDAP module
* Fix security properties of NTLM and EXTERNAL
New in 2.1.9
------------
* Include missing lib/staticopen.h file.
New in 2.1.8
------------
* Support for the NTLM mechanism (Ken Murchison <ken@oceana.com>)
* Support libtool --enable-shared and --enable-static
(Howard Chu <hyc@highlandsun.com>)
* OS/390 Support (Howard Chu <hyc@highlandsun.com>)
* Berkeley DB 4.1 Support (Mika Iisakkila <mika.iisakkila@pingrid.fi>)
* Documentation fixes
* The usual round of assorted other minor bugfixes.
New in 2.1.7
------------
* Add SASL_AUTHUSER as a parameter to sasl_getprop
* Allow applications to require proxy-capable mechanisms (SASL_NEED_PROXY)
* Performance improvements in our treatment of /dev/random
* Removal of buggy DIGEST-MD5 reauth support.
* Documentation fixes
* Assorted other minor bugfixes.
New in 2.1.6
------------
* Security fix for the CRAM-MD5 plugin to check the full length of the
digest string.
* Return of the Experimental LDAP saslauthd module.
* Addition of Experimental MySQL auxprop plugin.
* Can now select multiple auxprop plugins (and a priority ordering)
* Mechanism selection now includes number of security flags
* Mac OS X 10.1 Fixes
* Misc other minor bugfixes.
New in 2.1.5
------------
* Remove LDAP support due to copyright concerns.
* Minor bugfixes.
New in 2.1.4
------------
* Enhancements and cleanup to the experimental LDAP saslauthd module
(Igor Brezac <igor@ipass.net>)
* Addition of a new sasl_version() API
* Misc. Bugfixes
New in 2.1.3-BETA
-----------------
* Significant amount of plugin cleanup / standardization. A good deal of code
is now shared between them. (mostly due to Ken Murchison <ken@oceana.com>)
* DIGEST-MD5 now supports reauthentication. Also has a fix for DES
interoperability.
* saslauthd now supports the Solaris "doors" IPC method
(--with-ipctype=doors)
* Significant GSSAPI fixes (mostly due to Howard Chu <hyc@highlandsun.com>)
* Auxprop interface now correctly deals with the * prefix indicating
authid vs. authzid. (May break some incompatible auxprop plugins).
* We now allow multiple pwcheck_method(s). Also you can restrict auxprop
plugins to the use of a single plugin.
* Added an experimental saslauthd LDAP module (Igor Brezac <igor@ipass.net>)
* Removed check for db3/db.h
* Misc. documentation updates. (Marshall Rose, and others)
* Other misc. bugfixes.
New in 2.1.2
------------
* Mostly a minor-bugfix release
* Improved documentation / cleanup of old references to obsolete
pwcheck_methods
* Better error reporting for auxprop password verifiers
New in 2.1.1
------------
* Many minor bugfixes throughout.
* Improvements to OTP and SRP mechanisms (now compliant with
draft-burdis-cat-srp-sasl-06.txt)
* API additions including sasl_global_listmech, and a cleaner handling of
client-first and server-last semantics (no application level changes)
* Minor documentation improvements
New in 2.1.0
------------
* The Cyrus SASL library is now considered stable. It is still not backwards
compatible with applications that require SASLv1.
* Minor API changes occured, namely the canon_user callback interface.
* saslauthd now preforks a number of processes to handle connections
* Many bugfixes through the entire library.
New in 2.0.5-BETA
-----------------
* THIS IS A BETA-QUALITY RELEASE THAT IS NOT INTENDED FOR PRODUCTION USE.
IT *WILL BREAK* ANY APPLICATION EXPECTING THE SASLv1 API.
* Improved performance of security layers in KERBEROS_V4, GSSAPI, and DIGEST.
* This release includes an OTP plugin that requires libopie.
* SRP plugin now in alpha stage.
* Includes many significant bugfixes throughout the library.
New in 2.0.4-BETA
-----------------
* THIS IS A BETA-QUALITY RELEASE THAT IS ONLY INTENDED FOR USE BY
DEVELOPERS WHOSE APPLICATIONS MAKE USE OF THE CYRUS SASL LIBRARY.
IT *WILL BREAK* ANY APPLICATION EXPECTING THE SASLv1 API.
* This release now includes Mac OS 9 and Mac OS X support.
* Significant new features include
* DES and 3DES Encryption should now be working for DIGEST-MD5
* Improved configuration system
* Improved documentation (now includes plugin writers guide)
* Many other bugfixes (see ChangeLog)
New in 2.0.3-BETA
-----------------
* THIS IS A BETA-QUALITY RELEASE THAT IS ONLY INTENDED FOR USE BY
DEVELOPERS WHOSE APPLICATIONS MAKE USE OF THE CYRUS SASL LIBRARY.
IT *WILL BREAK* ANY APPLICATION EXPECTING THE SASLv1 API.
* This library should be fairly close to the core features that will be
released in a final version of Cyrus SASLv2. It very likely has bugs.
* Major new features included in this release:
- The glue code now correctly handles client-send-first and server-send-last
situations based on what the protocol and mechanism each support.
- The sasldb code has been extracted from the main library and now resides
in a separate libsasldb.la that is available at build time.
- SASLdb now supports multiple auxiliary properties, though as distributed
only userPassword is implemented and used.
- Much improved configure checking for various items, including
Berkeley DB, Kerberos, and GSSAPI.
- Better (more standard) handling of realms in DIGEST-MD5.
- A new Plugin Programmer's guide.
- IPv6 support.
- Error reporting now works in the GSSAPI plugin.
* See the ChangeLog for a more detailed list of changes.
New in 2.0.2-ALPHA
------------------
* THIS IS AN ALPHA-QUALITY RELEASE THAT IS ONLY INTENDED FOR DEVELOPERS
WHOSE APPLICATIONS MAKE USE OF THE CYRUS SASL LIBRARY.
* This release is intended to show developers that use Cyrus SASL what
direction we are planning on taking the library so that they can make
plans to migrate their applications accordingly
* Major new features included in this release:
- Ability to compile a static library including all mechanisms. This
means lower memory usage and faster mechanism loading time, but
is not for everyone (or even many people). See doc/advanced.html,
as well as the '--with-staticsasl' configure flag.
- Man pages should now all be present and are close to being correct.
- Can now build libsfsasl and the smtptest program (using the --with-sfio
configure flag)
- Reverted to the v1 entry points for mechanisms, to allow v1 mechanisms
to fail loading cleanly.
- Auxprop and canon_user plugins can now load from DSOs
- Java code now compiles (but is not well tested, or up to date with the
current Java API draft)
- Error handling and use of sasl_errdetail has been fleshed out and
should now work in most cases.
* Still Coming:
- Cleanup of the client-send-first and server-send-last situation
- Error reporting in GSSAPI plugin
- Move the sasldb code out of the main library and into plugins and
utilities only.
New in 2.0.0-ALPHA
------------------
* THIS IS AN ALPHA-QUALITY RELEASE THAT IS ONLY INTENDED FOR DEVELOPERS
WHOSE APPLICATIONS MAKE USE OF THE CYRUS SASL LIBRARY.
* This release is intended to show developers that use Cyrus SASL what
direction we are planning on taking the library so that they can make
plans to migrate their applications accordingly
* This release implements the SASLv2 API.
Some of the major improvements in the API include:
- Memory management is now sane (whoever allocates the memory is responsible
for freeing it)
- Auxiliary Property plugin support (ability to interface with directory
services as part of authentication)
- Username canonification plugin support
- Improved error reporting (not fully implemented in this release)
- Database support has been simplified. We now maintain only a single
store of plaintext passwords that is shared by all supplied plugins
(using the auxiliary property interface).
The new API is more fully documented in the header files sasl.h, saslplug.h
saslutil.h, and prop.h. The man pages, programmers guide, and system
administrators guide have also been rewritten to deal with the new API.
* There is still a good amount of work to be done, and as this code is alpha
quality, it has bugs, known and unknown. Please either use our bugzilla at
http://bugzilla.andrew.cmu.edu, or email cyrus-bugs@andrew.cmu.edu with
questions, comments, or bug reports.
- Most notably, the Java bindings have not been converted to work with
the new API, and thus will not compile successfully.
- The current development branch with this source is in our
cvs repository as the "sasl-v2-rjs3" branch of the "sasl" collection.
(see http://asg.web.cmu.edu/cyrus/download/anoncvs.html for more info)
-21
View File
@@ -1,21 +0,0 @@
This is the Cyrus SASL API implentation. It can be used on the client
or server side to provide authentication and authorization services.
See RFC 4422 for more information.
The latest version is available at:
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail
There's a mailing list for Cyrus SASL. Subscribe by sending a message
to majordomo@lists.andrew.cmu.edu with the body "subscribe
cyrus-sasl". The mailing list is available via anonymous IMAP at
imap://cyrus.andrew.cmu.edu/archive.cyrus-sasl or via the web at
http://asg.web.cmu.edu/archive/mailbox.php3?mailbox=archive.cyrus-sasl.
If you are looking to port SASLv1 applications to SASLv2, please see
doc/appconvert.html
Bugs can be searched/reported at: http://bugzilla.cyrussasl.org
DOCUMENTATION
--------------
Please see doc/index.html for the remainder of the documentation.
@@ -1,65 +0,0 @@
# Makefile.am for SASL includes
# Rob Earhart
#
################################################################
# Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
################################################################
noinst_HEADERS = gai.h exits.h
saslincludedir = $(includedir)/sasl
saslinclude_HEADERS = hmac-md5.h md5.h md5global.h sasl.h saslplug.h saslutil.h prop.h
noinst_PROGRAMS = makemd5
makemd5_SOURCES = makemd5.c
md5global.h: makemd5
-rm -f md5global.h
./makemd5 md5global.h
EXTRA_DIST = NTMakefile
DISTCLEANFILES = md5global.h
if MACOSX
framedir = /Library/Frameworks/SASL2.framework
frameheaderdir = $(framedir)/Versions/A/Headers
frameheader_DATA = $(saslinclude_HEADERS)
endif
@@ -1,653 +0,0 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for SASL includes
# Rob Earhart
#
################################################################
# Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
################################################################
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
noinst_PROGRAMS = makemd5$(EXEEXT)
subdir = include
DIST_COMMON = $(noinst_HEADERS) $(saslinclude_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
$(top_srcdir)/config/sasldb.m4 \
$(top_srcdir)/cmulocal/berkdb.m4 \
$(top_srcdir)/cmulocal/bsd_sockets.m4 \
$(top_srcdir)/cmulocal/c-attribute.m4 \
$(top_srcdir)/cmulocal/common.m4 \
$(top_srcdir)/cmulocal/cyrus.m4 \
$(top_srcdir)/cmulocal/init_automake.m4 \
$(top_srcdir)/cmulocal/ipv6.m4 \
$(top_srcdir)/cmulocal/openldap.m4 \
$(top_srcdir)/cmulocal/openssl.m4 \
$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_makemd5_OBJECTS = makemd5.$(OBJEXT)
makemd5_OBJECTS = $(am_makemd5_OBJECTS)
makemd5_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(makemd5_SOURCES)
DIST_SOURCES = $(makemd5_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(frameheaderdir)" \
"$(DESTDIR)$(saslincludedir)"
DATA = $(frameheader_DATA)
HEADERS = $(noinst_HEADERS) $(saslinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DIRS = @DIRS@
DMALLOC_LIBS = @DMALLOC_LIBS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETADDRINFOOBJS = @GETADDRINFOOBJS@
GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
GETSUBOPT = @GETSUBOPT@
GREP = @GREP@
GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
GSSAPI_LIBS = @GSSAPI_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPCTYPE = @IPCTYPE@
JAVAC = @JAVAC@
JAVADOC = @JAVADOC@
JAVAH = @JAVAH@
JAVAROOT = @JAVAROOT@
JAVA_INCLUDES = @JAVA_INCLUDES@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_CRYPT = @LIB_CRYPT@
LIB_DES = @LIB_DES@
LIB_DOOR = @LIB_DOOR@
LIB_LDAP = @LIB_LDAP@
LIB_MYSQL = @LIB_MYSQL@
LIB_PGSQL = @LIB_PGSQL@
LIB_SOCKET = @LIB_SOCKET@
LIB_SQLITE = @LIB_SQLITE@
LIB_SQLITE3 = @LIB_SQLITE3@
LN_S = @LN_S@
LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
LTLIBOBJS = @LTLIBOBJS@
LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NTLM_LIBS = @NTLM_LIBS@
OBJEXT = @OBJEXT@
OTP_LIBS = @OTP_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PASSDSS_LIBS = @PASSDSS_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PLAIN_LIBS = @PLAIN_LIBS@
PURECOV = @PURECOV@
PURIFY = @PURIFY@
PWCHECKMETH = @PWCHECKMETH@
RANLIB = @RANLIB@
SASL_DB_BACKEND = @SASL_DB_BACKEND@
SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
SASL_DB_INC = @SASL_DB_INC@
SASL_DB_LIB = @SASL_DB_LIB@
SASL_DB_MANS = @SASL_DB_MANS@
SASL_DB_UTILS = @SASL_DB_UTILS@
SASL_DL_LIB = @SASL_DL_LIB@
SASL_KRB_LIB = @SASL_KRB_LIB@
SASL_MECHS = @SASL_MECHS@
SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
SCRAM_LIBS = @SCRAM_LIBS@
SET_MAKE = @SET_MAKE@
SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
SHELL = @SHELL@
SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
SNPRINTFOBJS = @SNPRINTFOBJS@
SRP_LIBS = @SRP_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
configdir = @configdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_HEADERS = gai.h exits.h
saslincludedir = $(includedir)/sasl
saslinclude_HEADERS = hmac-md5.h md5.h md5global.h sasl.h saslplug.h saslutil.h prop.h
makemd5_SOURCES = makemd5.c
EXTRA_DIST = NTMakefile
DISTCLEANFILES = md5global.h
@MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
@MACOSX_TRUE@frameheaderdir = $(framedir)/Versions/A/Headers
@MACOSX_TRUE@frameheader_DATA = $(saslinclude_HEADERS)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
makemd5$(EXEEXT): $(makemd5_OBJECTS) $(makemd5_DEPENDENCIES)
@rm -f makemd5$(EXEEXT)
$(LINK) $(makemd5_OBJECTS) $(makemd5_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makemd5.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-frameheaderDATA: $(frameheader_DATA)
@$(NORMAL_INSTALL)
test -z "$(frameheaderdir)" || $(MKDIR_P) "$(DESTDIR)$(frameheaderdir)"
@list='$(frameheader_DATA)'; test -n "$(frameheaderdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(frameheaderdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(frameheaderdir)" || exit $$?; \
done
uninstall-frameheaderDATA:
@$(NORMAL_UNINSTALL)
@list='$(frameheader_DATA)'; test -n "$(frameheaderdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(frameheaderdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(frameheaderdir)" && rm -f $$files
install-saslincludeHEADERS: $(saslinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(saslincludedir)" || $(MKDIR_P) "$(DESTDIR)$(saslincludedir)"
@list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(saslincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(saslincludedir)" || exit $$?; \
done
uninstall-saslincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(saslincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(saslincludedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(frameheaderdir)" "$(DESTDIR)$(saslincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-frameheaderDATA install-saslincludeHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-frameheaderDATA uninstall-saslincludeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am \
install-frameheaderDATA install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am \
install-saslincludeHEADERS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-frameheaderDATA \
uninstall-saslincludeHEADERS
md5global.h: makemd5
-rm -f md5global.h
./makemd5 md5global.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
@@ -1,65 +0,0 @@
# NTMakefile for SASL, include directory
# Alexey Melnikov
#
################################################################
# Copyright (c) 2003 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
################################################################
#Suppress verbose output from defaulting values
VERBOSE=0
!INCLUDE ..\win32\common.mak
includedir = $(prefix)\include
saslincludedir = $(includedir)\sasl\
saslinclude_HEADERS = hmac-md5.h md5.h sasl.h saslplug.h saslutil.h prop.h
# The first target get executed by default. We don't want this to be "install"
all:
@echo Nothing to be done for $@
#
# /I flag to xcopy tells to treat the last parameter as directory and create all missing levels
#
install: $(saslinclude_HEADERS)
!xcopy sasl*.h $(saslincludedir) /I /F /Y
!xcopy $? $(saslincludedir) /I /F /Y
@@ -1,607 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
/* acconfig.h - autoheader configuration input */
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef CONFIG_H
#define CONFIG_H
/* Runtime config file location */
#define CONFIGDIR "/usr/lib/sasl2:/etc/sasl2"
/* Do we need a leading _ for dlsym? */
/* #undef DLSYM_NEEDS_UNDERSCORE */
/* Should we build a shared plugin (via dlopen) library? */
/* #undef DO_DLOPEN */
/* should we support sasl_checkapop? */
#define DO_SASL_CHECKAPOP /**/
/* should we support setpass() for SRP? */
/* #undef DO_SRP_SETPASS */
/* should we mutex-wrap calls into the GSS library? */
#define GSS_USE_MUTEXES /**/
/* Enable 'alwaystrue' password verifier? */
/* #undef HAVE_ALWAYSTRUE */
/* Include support for Courier's authdaemond? */
#define HAVE_AUTHDAEMON /**/
/* Define to 1 if you have the <des.h> header file. */
/* #undef HAVE_DES_H */
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#define HAVE_DIRENT_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `dns_lookup' function. */
/* #undef HAVE_DNS_LOOKUP */
/* Define to 1 if you have the `dn_expand' function. */
#define HAVE_DN_EXPAND 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Do we have a getaddrinfo? */
#define HAVE_GETADDRINFO /**/
/* Define to 1 if you have the `getdomainname' function. */
#define HAVE_GETDOMAINNAME 1
/* Define to 1 if you have the `gethostname' function. */
#define HAVE_GETHOSTNAME 1
/* Do we have a getnameinfo() function? */
#define HAVE_GETNAMEINFO /**/
/* Define to 1 if you have the `getpassphrase' function. */
/* #undef HAVE_GETPASSPHRASE */
/* Define to 1 if you have the `getpwnam' function. */
#define HAVE_GETPWNAM 1
/* Define to 1 if you have the `getspnam' function. */
/* #undef HAVE_GETSPNAM */
/* do we have getsubopt()? */
#define HAVE_GETSUBOPT /**/
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
/* #undef HAVE_GSSAPI_GSSAPI_EXT_H */
/* Define if you have the gssapi.h header file */
#define HAVE_GSSAPI_H /**/
/* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function.
*/
/* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
/* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
/* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
#define HAVE_GSS_C_NT_USER_NAME /**/
/* Define to 1 if you have the `gss_decapsulate_token' function. */
/* #undef HAVE_GSS_DECAPSULATE_TOKEN */
/* Define to 1 if you have the `gss_encapsulate_token' function. */
/* #undef HAVE_GSS_ENCAPSULATE_TOKEN */
/* Define to 1 if you have the `gss_get_name_attribute' function. */
/* #undef HAVE_GSS_GET_NAME_ATTRIBUTE */
/* Define to 1 if you have the `gss_oid_equal' function. */
/* #undef HAVE_GSS_OID_EQUAL */
/* Define to 1 if you have the `inet_aton' function. */
#define HAVE_INET_ATON 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `jrand48' function. */
#define HAVE_JRAND48 1
/* Do we have Kerberos 4 Support? */
/* #undef HAVE_KRB */
/* Define to 1 if you have the `krb_get_err_text' function. */
/* #undef HAVE_KRB_GET_ERR_TEXT */
/* Define to 1 if you have the <lber.h> header file. */
/* #undef HAVE_LBER_H */
/* Define to 1 if you have the <ldap.h> header file. */
/* #undef HAVE_LDAP_H */
/* Define to 1 if you have the `resolv' library (-lresolv). */
#define HAVE_LIBRESOLV 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <malloc.h> header file. */
/* #undef HAVE_MALLOC_H */
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Do we have mysql support? */
/* #undef HAVE_MYSQL */
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
/* Do we have OpenSSL? */
#define HAVE_OPENSSL /**/
/* Use OPIE for server-side OTP? */
/* #undef HAVE_OPIE */
/* Define to 1 if you have the <pam/pam_appl.h> header file. */
/* #undef HAVE_PAM_PAM_APPL_H */
/* Define to 1 if you have the <paths.h> header file. */
#define HAVE_PATHS_H 1
/* Do we have Postgres support? */
/* #undef HAVE_PGSQL */
/* Include Support for pwcheck daemon? */
/* #undef HAVE_PWCHECK */
/* Include support for saslauthd? */
#define HAVE_SASLAUTHD /**/
/* Define to 1 if you have the <security/pam_appl.h> header file. */
#define HAVE_SECURITY_PAM_APPL_H 1
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Does the system have snprintf()? */
#define HAVE_SNPRINTF /**/
/* Does sockaddr have an sa_len? */
/* #undef HAVE_SOCKADDR_SA_LEN */
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Do we have a socklen_t? */
#define HAVE_SOCKLEN_T /**/
/* Do we have SQLite support? */
/* #undef HAVE_SQLITE */
/* Do we have SQLite3 support? */
/* #undef HAVE_SQLITE3 */
/* Is there an ss_family in sockaddr_storage? */
#define HAVE_SS_FAMILY /**/
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strspn' function. */
#define HAVE_STRSPN 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Do we have struct sockaddr_stroage? */
#define HAVE_STRUCT_SOCKADDR_STORAGE /**/
/* Define to 1 if you have the <sysexits.h> header file. */
#define HAVE_SYSEXITS_H 1
/* Define to 1 if you have the `syslog' function. */
#define HAVE_SYSLOG 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> header file. */
#define HAVE_SYS_UIO_H 1
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <varargs.h> header file. */
/* #undef HAVE_VARARGS_H */
/* Does the system have vsnprintf()? */
#define HAVE_VSNPRINTF /**/
/* define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__ 1
/* Should we keep handle to Berkeley DB open in SASLDB plugin? */
/* #undef KEEP_DB_OPEN */
/* Ignore IP Address in Kerberos 4 tickets? */
/* #undef KRB4_IGNORE_IP_ADDRESS */
/* Name of package */
#define PACKAGE "cyrus-sasl"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Where do we look for Courier authdaemond's socket? */
#define PATH_AUTHDAEMON_SOCKET "/dev/null"
/* Where do we look for saslauthd's socket? */
#define PATH_SASLAUTHD_RUNDIR "/var/state/saslauthd"
/* Runtime plugin location */
#define PLUGINDIR "/usr/lib/sasl2"
/* Force a preferred mechanism */
/* #undef PREFER_MECH */
/* Location of pwcheck socket */
/* #undef PWCHECKDIR */
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Use BerkeleyDB for SASLdb */
/* #undef SASL_BERKELEYDB */
/* Path to default SASLdb database */
#define SASL_DB_PATH "/etc/sasldb2"
/* File to use for source of randomness */
#define SASL_DEV_RANDOM "/dev/random"
/* Use GDBM for SASLdb */
/* #undef SASL_GDBM */
/* Use NDBM for SASLdb */
#define SASL_NDBM /**/
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* Link ANONYMOUS Staticly */
#define STATIC_ANONYMOUS /**/
/* Link CRAM-MD5 Staticly */
#define STATIC_CRAMMD5 /**/
/* Link DIGEST-MD5 Staticly */
#define STATIC_DIGESTMD5 /**/
/* Link GSSAPI Staticly */
/* #undef STATIC_GSSAPIV2 */
/* User KERBEROS_V4 Staticly */
/* #undef STATIC_KERBEROS4 */
/* Link ldapdb plugin Staticly */
/* #undef STATIC_LDAPDB */
/* Link LOGIN Staticly */
/* #undef STATIC_LOGIN */
/* Link NTLM Staticly */
/* #undef STATIC_NTLM */
/* Link OTP Staticly */
#define STATIC_OTP /**/
/* Link PASSDSS Staticly */
/* #undef STATIC_PASSDSS */
/* Link PLAIN Staticly */
#define STATIC_PLAIN /**/
/* Link SASLdb Staticly */
/* #undef STATIC_SASLDB */
/* Link SCRAM Staticly */
#define STATIC_SCRAM /**/
/* Link SQL plugin staticly */
/* #undef STATIC_SQL */
/* Link SRP Staticly */
/* #undef STATIC_SRP */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Should we try to dlopen() plugins while staticly compiled? */
/* #undef TRY_DLOPEN_WHEN_STATIC */
/* use the doors IPC API for saslauthd? */
/* #undef USE_DOORS */
/* Version number of package */
#define VERSION "2.1.25"
/* Use DES */
#define WITH_DES /**/
/* Linking against dmalloc? */
/* #undef WITH_DMALLOC */
/* Use internal RC4 implementation? */
#define WITH_RC4 /**/
/* Use OpenSSL DES Implementation */
#define WITH_SSL_DES /**/
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `int' if <sys/types.h> does not define. */
/* #undef mode_t */
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
/* Create a struct iovec if we need one */
#if !defined(_WIN32) && !defined(HAVE_SYS_UIO_H)
/* (win32 is handled in sasl.h) */
struct iovec {
char *iov_base;
long iov_len;
};
#else
#include <sys/types.h>
#include <sys/uio.h>
#endif
/* location of the random number generator */
#ifdef DEV_RANDOM
/* #undef DEV_RANDOM */
#endif
#define DEV_RANDOM SASL_DEV_RANDOM
/* if we've got krb_get_err_txt, we might as well use it;
especially since krb_err_txt isn't in some newer distributions
(MIT Kerb for Mac 4 being a notable example). If we don't have
it, we fall back to the krb_err_txt array */
#ifdef HAVE_KRB_GET_ERR_TEXT
#define get_krb_err_txt krb_get_err_text
#else
#define get_krb_err_txt(X) (krb_err_txt[(X)])
#endif
/* Make Solaris happy... */
#ifndef __EXTENSIONS__
#define __EXTENSIONS__
#endif
/* Make Linux happy... */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#ifndef HAVE___ATTRIBUTE__
/* Can't use attributes... */
#define __attribute__(foo)
#endif
#define SASL_PATH_ENV_VAR "SASL_PATH"
#define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#ifndef WIN32
# include <netdb.h>
# ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
# endif
#else /* WIN32 */
# include <winsock2.h>
#endif /* WIN32 */
#include <string.h>
#include <netinet/in.h>
#ifndef HAVE_SOCKLEN_T
typedef unsigned int socklen_t;
#endif /* HAVE_SOCKLEN_T */
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
#define _SS_MAXSIZE 128 /* Implementation specific max size */
#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
struct sockaddr_storage {
struct sockaddr ss_sa;
char __ss_pad2[_SS_PADSIZE];
};
# define ss_family ss_sa.sa_family
#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
#ifndef AF_INET6
/* Define it to something that should never appear */
#define AF_INET6 AF_MAX
#endif
#ifndef HAVE_GETADDRINFO
#define getaddrinfo sasl_getaddrinfo
#define freeaddrinfo sasl_freeaddrinfo
#define gai_strerror sasl_gai_strerror
#endif
#ifndef HAVE_GETNAMEINFO
#define getnameinfo sasl_getnameinfo
#endif
#if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
#include "gai.h"
#endif
#ifndef AI_NUMERICHOST /* support glibc 2.0.x */
#define AI_NUMERICHOST 4
#define NI_NUMERICHOST 2
#define NI_NAMEREQD 4
#define NI_NUMERICSERV 8
#endif
/* Defined in RFC 1035. max strlen is only 253 due to length bytes. */
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 255
#endif
// #ifndef HAVE_SYSEXITS_H
// #include "exits.h"
// #else
// #include "sysexits.h"
// #endif
/* Get the correct time.h */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#ifndef HIER_DELIMITER
#define HIER_DELIMITER '/'
#endif
#endif /* CONFIG_H */
@@ -1,118 +0,0 @@
/*
* Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)sysexits.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _SYSEXITS_H_
#define _SYSEXITS_H_
/*
* SYSEXITS.H -- Exit status codes for system programs.
*
* This include file attempts to categorize possible error
* exit statuses for system programs, notably delivermail
* and the Berkeley network.
*
* Error numbers begin at EX__BASE to reduce the possibility of
* clashing with other exit statuses that random programs may
* already return. The meaning of the codes is approximately
* as follows:
*
* EX_USAGE -- The command was used incorrectly, e.g., with
* the wrong number of arguments, a bad flag, a bad
* syntax in a parameter, or whatever.
* EX_DATAERR -- The input data was incorrect in some way.
* This should only be used for user's data & not
* system files.
* EX_NOINPUT -- An input file (not a system file) did not
* exist or was not readable. This could also include
* errors like "No message" to a mailer (if it cared
* to catch it).
* EX_NOUSER -- The user specified did not exist. This might
* be used for mail addresses or remote logins.
* EX_NOHOST -- The host specified did not exist. This is used
* in mail addresses or network requests.
* EX_UNAVAILABLE -- A service is unavailable. This can occur
* if a support program or file does not exist. This
* can also be used as a catchall message when something
* you wanted to do doesn't work, but you don't know
* why.
* EX_SOFTWARE -- An internal software error has been detected.
* This should be limited to non-operating system related
* errors as possible.
* EX_OSERR -- An operating system error has been detected.
* This is intended to be used for such things as "cannot
* fork", "cannot create pipe", or the like. It includes
* things like getuid returning a user that does not
* exist in the passwd file.
* EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
* etc.) does not exist, cannot be opened, or has some
* sort of error (e.g., syntax error).
* EX_CANTCREAT -- A (user specified) output file cannot be
* created.
* EX_IOERR -- An error occurred while doing I/O on some file.
* EX_TEMPFAIL -- temporary failure, indicating something that
* is not really an error. In sendmail, this means
* that a mailer (e.g.) could not create a connection,
* and the request should be reattempted later.
* EX_PROTOCOL -- the remote system returned something that
* was "not possible" during a protocol exchange.
* EX_NOPERM -- You did not have sufficient permission to
* perform the operation. This is not intended for
* file system problems, which should use NOINPUT or
* CANTCREAT, but rather for higher level permissions.
*/
#define EX_OK 0 /* successful termination */
#define EX__BASE 64 /* base value for error messages */
#define EX_USAGE 64 /* command line usage error */
#define EX_DATAERR 65 /* data format error */
#define EX_NOINPUT 66 /* cannot open input */
#define EX_NOUSER 67 /* addressee unknown */
#define EX_NOHOST 68 /* host name unknown */
#define EX_UNAVAILABLE 69 /* service unavailable */
#define EX_SOFTWARE 70 /* internal software error */
#define EX_OSERR 71 /* system error (e.g., can't fork) */
#define EX_OSFILE 72 /* critical OS file missing */
#define EX_CANTCREAT 73 /* can't create (user) output file */
#define EX_IOERR 74 /* input/output error */
#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
#define EX_PROTOCOL 76 /* remote error in protocol */
#define EX_NOPERM 77 /* permission denied */
#define EX_CONFIG 78 /* configuration error */
#define EX__MAX 78 /* maximum listed value */
#endif /* !_SYSEXITS_H_ */
@@ -1,108 +0,0 @@
/*
* Mar 8, 2000 by Hajimu UMEMOTO <ume@mahoroba.org>
* $Id: gai.h,v 1.8 2006/04/10 13:36:20 mel Exp $
*
* This module is besed on ssh-1.2.27-IPv6-1.5 written by
* KIKUCHI Takahiro <kick@kyoto.wide.ad.jp>
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* fake library for ssh
*
* This file is included in getaddrinfo.c and getnameinfo.c.
* See getaddrinfo.c and getnameinfo.c.
*/
#ifndef _GAI_H_
#define _GAI_H_
#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
#endif
#ifndef NI_MAXSERV
#define NI_MAXSERV 32
#endif
/* for old netdb.h */
#ifndef EAI_NODATA
#define EAI_NODATA 1
#define EAI_MEMORY 2
#define EAI_FAMILY 5 /* ai_family not supported */
#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
#endif
/* dummy value for old netdb.h */
#ifndef AI_PASSIVE
#define AI_PASSIVE 1
#define AI_CANONNAME 2
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
int ai_family; /* PF_xxx */
int ai_socktype; /* SOCK_xxx */
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
size_t ai_addrlen; /* length of ai_addr */
char *ai_canonname; /* canonical name for hostname */
struct sockaddr *ai_addr; /* binary address */
struct addrinfo *ai_next; /* next structure in linked list */
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_GETNAMEINFO
int getnameinfo(const struct sockaddr *, socklen_t, char *,
size_t, char *, size_t, int);
#endif
#ifndef HAVE_GETADDRINFO
int getaddrinfo(const char *, const char *,
const struct addrinfo *, struct addrinfo **);
void freeaddrinfo(struct addrinfo *);
char *gai_strerror(int);
#endif
#ifdef __cplusplus
}
#endif
#endif
@@ -1,59 +0,0 @@
/* hmac-md5.h -- HMAC_MD5 functions
*/
#ifndef HMAC_MD5_H
#define HMAC_MD5_H 1
#define HMAC_MD5_SIZE 16
/* intermediate MD5 context */
typedef struct HMAC_MD5_CTX_s {
MD5_CTX ictx, octx;
} HMAC_MD5_CTX;
/* intermediate HMAC state
* values stored in network byte order (Big Endian)
*/
typedef struct HMAC_MD5_STATE_s {
UINT4 istate[4];
UINT4 ostate[4];
} HMAC_MD5_STATE;
#ifdef __cplusplus
extern "C" {
#endif
/* One step hmac computation
*
* digest may be same as text or key
*/
void _sasl_hmac_md5(const unsigned char *text, int text_len,
const unsigned char *key, int key_len,
unsigned char digest[HMAC_MD5_SIZE]);
/* create context from key
*/
void _sasl_hmac_md5_init(HMAC_MD5_CTX *hmac,
const unsigned char *key, int key_len);
/* precalculate intermediate state from key
*/
void _sasl_hmac_md5_precalc(HMAC_MD5_STATE *hmac,
const unsigned char *key, int key_len);
/* initialize context from intermediate state
*/
void _sasl_hmac_md5_import(HMAC_MD5_CTX *hmac, HMAC_MD5_STATE *state);
#define _sasl_hmac_md5_update(hmac, text, text_len) _sasl_MD5Update(&(hmac)->ictx, (text), (text_len))
/* finish hmac from intermediate result. Intermediate result is zeroed.
*/
void _sasl_hmac_md5_final(unsigned char digest[HMAC_MD5_SIZE],
HMAC_MD5_CTX *hmac);
#ifdef __cplusplus
}
#endif
#endif /* HMAC_MD5_H */
@@ -1,246 +0,0 @@
/* creates the md5global.h file.
* Derived from KTH kerberos library bits.c program
* Tim Martin
* $Id: makemd5.c,v 1.4 2003/02/13 19:55:52 rjs3 Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Kungliga Tekniska
* Högskolan and its contributors.
*
* 4. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
static void
my_strupr(char *s)
{
char *p = s;
while(*p){
if(islower((int) *p))
*p = toupper((int) *p);
p++;
}
}
#define BITSIZE(TYPE) \
{ \
int b = 0; TYPE x = 1, zero = 0; char *pre = "U"; \
char tmp[128], tmp2[128]; \
while(x){ x <<= 1; b++; if(x < zero) pre=""; } \
if(b >= len){ \
int tabs; \
sprintf(tmp, "%sINT%d" , pre, len/8); \
sprintf(tmp2, "typedef %s %s;", #TYPE, tmp); \
my_strupr(tmp); \
tabs = 5 - strlen(tmp2) / 8; \
fprintf(f, "%s", tmp2); \
while(tabs-- > 0) fprintf(f, "\t"); \
fprintf(f, "/* %2d bits */\n", b); \
return; \
} \
}
static void
try_signed(FILE *f, int len)
{
BITSIZE(signed char);
BITSIZE(short);
BITSIZE(int);
BITSIZE(long);
#ifdef HAVE_LONG_LONG
BITSIZE(long long);
#endif
fprintf(f, "/* There is no %d bit type */\n", len);
}
static void
try_unsigned(FILE *f, int len)
{
BITSIZE(unsigned char);
BITSIZE(unsigned short);
BITSIZE(unsigned int);
BITSIZE(unsigned long);
#ifdef HAVE_LONG_LONG
BITSIZE(unsigned long long);
#endif
fprintf(f, "/* There is no %d bit type */\n", len);
}
static int print_pre(FILE *f)
{
fprintf(f,
"/* GLOBAL.H - RSAREF types and constants\n"
" */\n"
"#ifndef MD5GLOBAL_H\n"
"#define MD5GLOBAL_H\n"
"\n"
"/* PROTOTYPES should be set to one if and only if the compiler supports\n"
" function argument prototyping.\n"
"The following makes PROTOTYPES default to 0 if it has not already\n"
" been defined with C compiler flags.\n"
" */\n"
"#ifndef PROTOTYPES\n"
"#define PROTOTYPES 0\n"
"#endif\n"
"\n"
"/* POINTER defines a generic pointer type */\n"
"typedef unsigned char *POINTER;\n"
"\n"
);
return 1;
}
static int print_post(FILE *f)
{
fprintf(f, "\n"
"/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.\n"
"If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it\n"
"returns an empty list.\n"
"*/\n"
"#if PROTOTYPES\n"
"#define PROTO_LIST(list) list\n"
"#else\n"
"#define PROTO_LIST(list) ()\n"
"#endif\n"
"\n"
"#endif /* MD5GLOBAL_H */\n\n"
);
return 1;
}
int main(int argc, char **argv)
{
FILE *f;
char *fn, *hb;
if(argc < 2){
fn = "bits.h";
hb = "__BITS_H__";
f = stdout;
} else {
char *p;
fn = argv[1];
hb = malloc(strlen(fn) + 5);
sprintf(hb, "__%s__", fn);
for(p = hb; *p; p++){
if(!isalnum((int) *p))
*p = '_';
}
f = fopen(argv[1], "w");
}
print_pre(f);
#ifndef HAVE_INT8_T
try_signed (f, 8);
#endif /* HAVE_INT8_T */
#ifndef HAVE_INT16_T
try_signed (f, 16);
#endif /* HAVE_INT16_T */
#ifndef HAVE_INT32_T
try_signed (f, 32);
#endif /* HAVE_INT32_T */
#ifndef HAVE_INT64_T
try_signed (f, 64);
#endif /* HAVE_INT64_T */
#ifndef HAVE_U_INT8_T
try_unsigned (f, 8);
#endif /* HAVE_INT8_T */
#ifndef HAVE_U_INT16_T
try_unsigned (f, 16);
#endif /* HAVE_U_INT16_T */
#ifndef HAVE_U_INT32_T
try_unsigned (f, 32);
#endif /* HAVE_U_INT32_T */
#ifndef HAVE_U_INT64_T
try_unsigned (f, 64);
#endif /* HAVE_U_INT64_T */
print_post(f);
fclose(f);
return 0;
}
@@ -1,42 +0,0 @@
/* MD5.H - header file for MD5C.C
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
/* MD5 context. */
typedef struct {
UINT4 state[4]; /* state (ABCD) */
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} MD5_CTX;
#ifdef __cplusplus
extern "C" {
#endif
void _sasl_MD5Init (MD5_CTX *);
void _sasl_MD5Update (MD5_CTX *, const unsigned char *, unsigned int);
void _sasl_MD5Final (unsigned char [16], MD5_CTX *);
#ifdef __cplusplus
}
#endif
@@ -1,38 +0,0 @@
/* GLOBAL.H - RSAREF types and constants
*/
#ifndef MD5GLOBAL_H
#define MD5GLOBAL_H
/* PROTOTYPES should be set to one if and only if the compiler supports
function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already
been defined with C compiler flags.
*/
#ifndef PROTOTYPES
#define PROTOTYPES 0
#endif
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
typedef signed char INT1; /* 8 bits */
typedef short INT2; /* 16 bits */
typedef int INT4; /* 32 bits */
/* There is no 64 bit type */
typedef unsigned char UINT1; /* 8 bits */
typedef unsigned short UINT2; /* 16 bits */
typedef unsigned int UINT4; /* 32 bits */
/* There is no 64 bit type */
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
returns an empty list.
*/
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif
#endif /* MD5GLOBAL_H */
@@ -1,186 +0,0 @@
/* prop.h -- property request/response management routines
*
* Author: Chris Newman
* Removal of implementation-specific details by: Rob Siemborski
*
* This is intended to be used to create a list of properties to request,
* and _then_ request values for all properties. Any change to the request
* list will discard any existing values. This assumption allows a very
* efficient and simple memory model. This was designed for SASL API auxiliary
* property support, but would be fine for other contexts where this property
* model is appropriate.
*
* The "struct propctx" is allocated by prop_new and is a fixed size structure.
* If a prop_init() call were added, it would be reasonable to embed a "struct
* propctx" in another structure. prop_new also allocates a pool of memory
* (in the vbase field) which will be used for an array of "struct propval"
* to list all the requested properties.
*
* Properties may be multi-valued.
*/
#ifndef PROP_H
#define PROP_H 1
/* The following ifdef block is the standard way of creating macros
* which make exporting from a DLL simpler. All files within this DLL
* are compiled with the LIBSASL_EXPORTS symbol defined on the command
* line. this symbol should not be defined on any project that uses
* this DLL. This way any other project whose source files include
* this file see LIBSASL_API functions as being imported from a DLL,
* wheras this DLL sees symbols defined with this macro as being
* exported. */
/* Under Unix, life is simpler: we just need to mark library functions
* as extern. (Technically, we don't even have to do that.) */
#ifdef WIN32
# ifdef LIBSASL_EXPORTS
# define LIBSASL_API extern __declspec(dllexport)
# else /* LIBSASL_EXPORTS */
# define LIBSASL_API extern __declspec(dllimport)
# endif /* LIBSASL_EXPORTS */
#else /* WIN32 */
# define LIBSASL_API extern
#endif /* WIN32 */
/* Same as above, but used during a variable declaration. */
#ifdef WIN32
# ifdef LIBSASL_EXPORTS
# define LIBSASL_VAR extern __declspec(dllexport)
# else /* LIBSASL_EXPORTS */
# define LIBSASL_VAR extern __declspec(dllimport)
# endif /* LIBSASL_EXPORTS */
#else /* WIN32 */
# define LIBSASL_VAR extern
#endif /* WIN32 */
/* the resulting structure for property values
*/
struct propval {
const char *name; /* name of property; NULL = end of list */
/* same pointer used in request will be used here */
const char **values; /* list of strings, values == NULL if property not
* found, *values == NULL if property found with
* no values */
unsigned nvalues; /* total number of value strings */
unsigned valsize; /* total size in characters of all value strings */
};
/*
* private internal structure
*/
#define PROP_DEFAULT 4 /* default number of propvals to assume */
struct propctx;
#ifdef __cplusplus
extern "C" {
#endif
/* create a property context
* estimate -- an estimate of the storage needed for requests & responses
* 0 will use module default
* returns a new property context on success and NULL on any error
*/
LIBSASL_API struct propctx *prop_new(unsigned estimate);
/* create new propctx which duplicates the contents of an existing propctx
* returns SASL_OK on success
* possible other return values include: SASL_NOMEM, SASL_BADPARAM
*/
LIBSASL_API int prop_dup(struct propctx *src_ctx, struct propctx **dst_ctx);
/* Add property names to request
* ctx -- context from prop_new()
* names -- list of property names; must persist until context freed
* or requests cleared (This extends to other contexts that
* are dup'ed from this one, and their children, etc)
*
* NOTE: may clear values from context as side-effect
* returns SASL_OK on success
* possible other return values include: SASL_NOMEM, SASL_BADPARAM
*/
LIBSASL_API int prop_request(struct propctx *ctx, const char **names);
/* return array of struct propval from the context
* return value persists until next call to
* prop_request, prop_clear or prop_dispose on context
*
* returns NULL on error
*/
LIBSASL_API const struct propval *prop_get(struct propctx *ctx);
/* Fill in an array of struct propval based on a list of property names
* return value persists until next call to
* prop_request, prop_clear or prop_dispose on context
* returns number of matching properties which were found (values != NULL)
* if a name requested here was never requested by a prop_request, then
* the name field of the associated vals entry will be set to NULL
*
* The vals array MUST be atleast as long as the names array.
*
* returns # of matching properties on success
* possible other return values include: SASL_BADPARAM
*/
LIBSASL_API int prop_getnames(struct propctx *ctx, const char **names,
struct propval *vals);
/* clear values and optionally requests from property context
* ctx -- property context
* requests -- 0 = don't clear requests, 1 = clear requests
*/
LIBSASL_API void prop_clear(struct propctx *ctx, int requests);
/* erase the value of a property
*/
LIBSASL_API void prop_erase(struct propctx *ctx, const char *name);
/* dispose of property context
* ctx -- is disposed and set to NULL; noop if ctx or *ctx is NULL
*/
LIBSASL_API void prop_dispose(struct propctx **ctx);
/****fetcher interfaces****/
/* format the requested property names into a string
* ctx -- context from prop_new()/prop_request()
* sep -- separator between property names (unused if none requested)
* seplen -- length of separator, if < 0 then strlen(sep) will be used
* outbuf -- output buffer
* outmax -- maximum length of output buffer including NUL terminator
* outlen -- set to length of output string excluding NUL terminator
* returns SASL_OK on success
* returns SASL_BADPARAM or amount of additional space needed on failure
*/
LIBSASL_API int prop_format(struct propctx *ctx, const char *sep, int seplen,
char *outbuf, unsigned outmax, unsigned *outlen);
/* add a property value to the context
* ctx -- context from prop_new()/prop_request()
* name -- name of property to which value will be added
* if NULL, add to the same name as previous prop_set/setvals call
* value -- a value for the property; will be copied into context
* if NULL, remove existing values
* vallen -- length of value, if <= 0 then strlen(value) will be used
* returns SASL_OK on success
* possible error return values include: SASL_BADPARAM, SASL_NOMEM
*/
LIBSASL_API int prop_set(struct propctx *ctx, const char *name,
const char *value, int vallen);
/* set the values for a property
* ctx -- context from prop_new()/prop_request()
* name -- name of property to which value will be added
* if NULL, add to the same name as previous prop_set/setvals call
* values -- array of values, ending in NULL. Each value is a NUL terminated
* string
* returns SASL_OK on success
* possible error return values include: SASL_BADPARAM, SASL_NOMEM
*/
LIBSASL_API int prop_setvals(struct propctx *ctx, const char *name,
const char **values);
#ifdef __cplusplus
}
#endif
#endif /* PROP_H */
File diff suppressed because it is too large Load Diff
@@ -1,986 +0,0 @@
/* saslplug.h -- API for SASL plug-ins
*/
#ifndef SASLPLUG_H
#define SASLPLUG_H 1
#ifndef MD5GLOBAL_H
#include "md5global.h"
#endif
#ifndef MD5_H
#include "md5.h"
#endif
#ifndef HMAC_MD5_H
#include "hmac-md5.h"
#endif
#ifndef PROP_H
#include "prop.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* callback to lookup a sasl_callback_t for a connection
* input:
* conn -- the connection to lookup a callback for
* callbacknum -- the number of the callback
* output:
* pproc -- pointer to the callback function (set to NULL on failure)
* pcontext -- pointer to the callback context (set to NULL on failure)
* returns:
* SASL_OK -- no error
* SASL_FAIL -- unable to find a callback of the requested type
* SASL_INTERACT -- caller must use interaction to get data
*/
typedef int (*sasl_callback_ft)(void);
typedef int sasl_getcallback_t(sasl_conn_t *conn,
unsigned long callbackid,
sasl_callback_ft * pproc,
void **pcontext);
/* The sasl_utils structure will remain backwards compatible unless
* the SASL_*_PLUG_VERSION is changed incompatibly
* higher SASL_UTILS_VERSION numbers indicate more functions are available
*/
#define SASL_UTILS_VERSION 4
/* utility function set for plug-ins
*/
typedef struct sasl_utils {
int version;
/* contexts */
sasl_conn_t *conn;
sasl_rand_t *rpool;
void *getopt_context;
/* option function */
sasl_getopt_t *getopt;
/* allocation functions: */
sasl_malloc_t *malloc;
sasl_calloc_t *calloc;
sasl_realloc_t *realloc;
sasl_free_t *free;
/* mutex functions: */
sasl_mutex_alloc_t *mutex_alloc;
sasl_mutex_lock_t *mutex_lock;
sasl_mutex_unlock_t *mutex_unlock;
sasl_mutex_free_t *mutex_free;
/* MD5 hash and HMAC functions */
void (*MD5Init)(MD5_CTX *);
void (*MD5Update)(MD5_CTX *, const unsigned char *text, unsigned int len);
void (*MD5Final)(unsigned char [16], MD5_CTX *);
void (*hmac_md5)(const unsigned char *text, int text_len,
const unsigned char *key, int key_len,
unsigned char [16]);
void (*hmac_md5_init)(HMAC_MD5_CTX *, const unsigned char *key, int len);
/* hmac_md5_update() is just a call to MD5Update on inner context */
void (*hmac_md5_final)(unsigned char [16], HMAC_MD5_CTX *);
void (*hmac_md5_precalc)(HMAC_MD5_STATE *,
const unsigned char *key, int len);
void (*hmac_md5_import)(HMAC_MD5_CTX *, HMAC_MD5_STATE *);
/* mechanism utility functions (same as above): */
int (*mkchal)(sasl_conn_t *conn, char *buf, unsigned maxlen,
unsigned hostflag);
int (*utf8verify)(const char *str, unsigned len);
void (*rand)(sasl_rand_t *rpool, char *buf, unsigned len);
void (*churn)(sasl_rand_t *rpool, const char *data, unsigned len);
/* This allows recursive calls to the sasl_checkpass() routine from
* within a SASL plug-in. This MUST NOT be used in the PLAIN mechanism
* as sasl_checkpass MAY be a front-end for the PLAIN mechanism.
* This is intended for use by the non-standard LOGIN mechanism and
* potentially by a future mechanism which uses public-key technology to
* set up a lightweight encryption layer just for sending a password.
*/
int (*checkpass)(sasl_conn_t *conn,
const char *user, unsigned userlen,
const char *pass, unsigned passlen);
/* Access to base64 encode/decode routines */
int (*decode64)(const char *in, unsigned inlen,
char *out, unsigned outmax, unsigned *outlen);
int (*encode64)(const char *in, unsigned inlen,
char *out, unsigned outmax, unsigned *outlen);
/* erase a buffer */
void (*erasebuffer)(char *buf, unsigned len);
/* callback to sasl_getprop() and sasl_setprop() */
int (*getprop)(sasl_conn_t *conn, int propnum, const void **pvalue);
int (*setprop)(sasl_conn_t *conn, int propnum, const void *value);
/* callback function */
sasl_getcallback_t *getcallback;
/* format a message and then pass it to the SASL_CB_LOG callback
*
* use syslog()-style formatting (printf with %m as a human readable text
* (strerror()) for the error specified as the parameter).
* The implementation may use a fixed size buffer not smaller
* than 512 octets if it securely truncates the message.
*
* level is a SASL_LOG_* level (see sasl.h)
*/
void (*log)(sasl_conn_t *conn, int level, const char *fmt, ...);
/* callback to sasl_seterror() */
void (*seterror)(sasl_conn_t *conn, unsigned flags, const char *fmt, ...);
/* spare function pointer */
int *(*spare_fptr)(void);
/* auxiliary property utilities */
struct propctx *(*prop_new)(unsigned estimate);
int (*prop_dup)(struct propctx *src_ctx, struct propctx **dst_ctx);
int (*prop_request)(struct propctx *ctx, const char **names);
const struct propval *(*prop_get)(struct propctx *ctx);
int (*prop_getnames)(struct propctx *ctx, const char **names,
struct propval *vals);
void (*prop_clear)(struct propctx *ctx, int requests);
void (*prop_dispose)(struct propctx **ctx);
int (*prop_format)(struct propctx *ctx, const char *sep, int seplen,
char *outbuf, unsigned outmax, unsigned *outlen);
int (*prop_set)(struct propctx *ctx, const char *name,
const char *value, int vallen);
int (*prop_setvals)(struct propctx *ctx, const char *name,
const char **values);
void (*prop_erase)(struct propctx *ctx, const char *name);
int (*auxprop_store)(sasl_conn_t *conn,
struct propctx *ctx, const char *user);
/* for additions which don't require a version upgrade; set to 0 */
int (*spare_fptr1)(void);
int (*spare_fptr2)(void);
} sasl_utils_t;
/*
* output parameters from SASL API
*
* created / destroyed by the glue code, though probably filled in
* by a combination of the plugin, the glue code, and the canon_user callback.
*
*/
typedef struct sasl_out_params {
unsigned doneflag; /* exchange complete */
const char *user; /* canonicalized user name */
const char *authid; /* canonicalized authentication id */
unsigned ulen; /* length of canonicalized user name */
unsigned alen; /* length of canonicalized authid */
/* security layer information */
unsigned maxoutbuf; /* Maximum buffer size, which will
produce buffer no bigger than the
negotiated SASL maximum buffer size */
sasl_ssf_t mech_ssf; /* Should be set non-zero if negotiation of a
* security layer was *attempted*, even if
* the negotiation failed */
void *encode_context;
int (*encode)(void *context, const struct iovec *invec, unsigned numiov,
const char **output, unsigned *outputlen);
void *decode_context;
int (*decode)(void *context, const char *input, unsigned inputlen,
const char **output, unsigned *outputlen);
/* Pointer to delegated (client's) credentials, if supported by
the SASL mechanism */
void *client_creds;
/* for additions which don't require a version upgrade; set to 0 */
const void *gss_peer_name;
const void *gss_local_name;
const char *cbindingname; /* channel binding name from packet */
int (*spare_fptr1)(void);
int (*spare_fptr2)(void);
unsigned int cbindingdisp; /* channel binding disposition from client */
int spare_int2;
int spare_int3;
int spare_int4;
/* set to 0 initially, this allows a plugin with extended parameters
* to work with an older framework by updating version as parameters
* are added.
*/
int param_version;
} sasl_out_params_t;
/* Used by both client and server side plugins */
typedef enum {
SASL_INFO_LIST_START = 0,
SASL_INFO_LIST_MECH,
SASL_INFO_LIST_END
} sasl_info_callback_stage_t;
/******************************
* Channel binding macros **
******************************/
typedef enum {
SASL_CB_DISP_NONE = 0, /* client did not support CB */
SASL_CB_DISP_WANT, /* client supports CB, thinks server does not */
SASL_CB_DISP_USED /* client supports and used CB */
} sasl_cbinding_disp_t;
/* TRUE if channel binding is non-NULL */
#define SASL_CB_PRESENT(params) ((params)->cbinding != NULL)
/* TRUE if channel binding is marked critical */
#define SASL_CB_CRITICAL(params) (SASL_CB_PRESENT(params) && \
(params)->cbinding->critical)
/******************************
* Client Mechanism Functions *
******************************/
/*
* input parameters to client SASL plugin
*
* created / destroyed by the glue code
*
*/
typedef struct sasl_client_params {
const char *service; /* service name */
const char *serverFQDN; /* server fully qualified domain name */
const char *clientFQDN; /* client's fully qualified domain name */
const sasl_utils_t *utils; /* SASL API utility routines --
* for a particular sasl_conn_t,
* MUST remain valid until mech_free is
* called */
const sasl_callback_t *prompt_supp; /* client callback list */
const char *iplocalport; /* server IP domain literal & port */
const char *ipremoteport; /* client IP domain literal & port */
unsigned servicelen; /* length of service */
unsigned slen; /* length of serverFQDN */
unsigned clen; /* length of clientFQDN */
unsigned iploclen; /* length of iplocalport */
unsigned ipremlen; /* length of ipremoteport */
/* application's security requirements & info */
sasl_security_properties_t props;
sasl_ssf_t external_ssf; /* external SSF active */
/* for additions which don't require a version upgrade; set to 0 */
const void *gss_creds; /* GSS credential handle */
const sasl_channel_binding_t *cbinding; /* client channel binding */
const sasl_http_request_t *http_request;/* HTTP Digest request method */
void *spare_ptr4;
/* Canonicalize a user name from on-wire to internal format
* added rjs3 2001-05-23
* Must be called once user name aquired if canon_user is non-NULL.
* conn connection context
* in user name from wire protocol (need not be NUL terminated)
* len length of user name from wire protocol (0 = strlen(user))
* flags for SASL_CU_* flags
* oparams the user, authid, ulen, alen, fields are
* set appropriately after canonicalization/copying and
* authorization of arguments
*
* responsible for setting user, ulen, authid, and alen in the oparams
* structure
*
* default behavior is to strip leading and trailing whitespace, as
* well as allocating space for and copying the parameters.
*
* results:
* SASL_OK -- success
* SASL_NOMEM -- out of memory
* SASL_BADPARAM -- invalid conn
* SASL_BADPROT -- invalid user/authid
*/
int (*canon_user)(sasl_conn_t *conn,
const char *in, unsigned len,
unsigned flags,
sasl_out_params_t *oparams);
int (*spare_fptr1)(void);
unsigned int cbindingdisp;
int spare_int2;
int spare_int3;
/* flags field as passed to sasl_client_new */
unsigned flags;
/* set to 0 initially, this allows a plugin with extended parameters
* to work with an older framework by updating version as parameters
* are added.
*/
int param_version;
} sasl_client_params_t;
/* features shared between client and server */
/* These allow the glue code to handle client-first and server-last issues */
/* This indicates that the mechanism prefers to do client-send-first
* if the protocol allows it. */
#define SASL_FEAT_WANT_CLIENT_FIRST 0x0002
/* This feature is deprecated. Instead, plugins should set *serverout to
* non-NULL and return SASL_OK intelligently to allow flexible use of
* server-last semantics
#define SASL_FEAT_WANT_SERVER_LAST 0x0004
*/
/* This feature is deprecated. Instead, plugins should correctly set
* SASL_FEAT_SERVER_FIRST as needed
#define SASL_FEAT_INTERNAL_CLIENT_FIRST 0x0008
*/
/* This indicates that the plugin is server-first only.
* Not defining either of SASL_FEAT_SERVER_FIRST or
* SASL_FEAT_WANT_CLIENT_FIRST indicates that the mechanism
* will handle the client-first situation internally.
*/
#define SASL_FEAT_SERVER_FIRST 0x0010
/* This plugin allows proxying */
#define SASL_FEAT_ALLOWS_PROXY 0x0020
/* server plugin don't use cleartext userPassword attribute */
#define SASL_FEAT_DONTUSE_USERPASSWD 0x0080
/* Underlying mechanism uses GSS framing */
#define SASL_FEAT_GSS_FRAMING 0x0100
/* Underlying mechanism supports channel binding */
#define SASL_FEAT_CHANNEL_BINDING 0x0800
/* This plugin can be used for HTTP authentication */
#define SASL_FEAT_SUPPORTS_HTTP 0x1000
/* client plug-in features */
#define SASL_FEAT_NEEDSERVERFQDN 0x0001
/* a C object for a client mechanism
*/
typedef struct sasl_client_plug {
/* mechanism name */
const char *mech_name;
/* best mech additional security layer strength factor */
sasl_ssf_t max_ssf;
/* best security flags, as defined in sasl_security_properties_t */
unsigned security_flags;
/* features of plugin */
unsigned features;
/* required prompt ids, NULL = user/pass only */
const unsigned long *required_prompts;
/* global state for mechanism */
void *glob_context;
/* create context for mechanism, using params supplied
* glob_context -- from above
* params -- params from sasl_client_new
* conn_context -- context for one connection
* returns:
* SASL_OK -- success
* SASL_NOMEM -- not enough memory
* SASL_WRONGMECH -- mech doesn't support security params
*/
int (*mech_new)(void *glob_context,
sasl_client_params_t *cparams,
void **conn_context);
/* perform one step of exchange. NULL is passed for serverin on
* first step.
* returns:
* SASL_OK -- success
* SASL_INTERACT -- user interaction needed to fill in prompts
* SASL_BADPROT -- server protocol incorrect/cancelled
* SASL_BADSERV -- server failed mutual auth
*/
int (*mech_step)(void *conn_context,
sasl_client_params_t *cparams,
const char *serverin,
unsigned serverinlen,
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams);
/* dispose of connection context from mech_new
*/
void (*mech_dispose)(void *conn_context, const sasl_utils_t *utils);
/* free all global space used by mechanism
* mech_dispose must be called on all mechanisms first
*/
void (*mech_free)(void *glob_context, const sasl_utils_t *utils);
/* perform precalculations during a network round-trip
* or idle period. conn_context may be NULL
* returns 1 if action taken, 0 if no action taken
*/
int (*idle)(void *glob_context,
void *conn_context,
sasl_client_params_t *cparams);
/* for additions which don't require a version upgrade; set to 0 */
int (*spare_fptr1)(void);
int (*spare_fptr2)(void);
} sasl_client_plug_t;
#define SASL_CLIENT_PLUG_VERSION 4
/* plug-in entry point:
* utils -- utility callback functions
* max_version -- highest client plug version supported
* returns:
* out_version -- client plug version of result
* pluglist -- list of mechanism plug-ins
* plugcount -- number of mechanism plug-ins
* results:
* SASL_OK -- success
* SASL_NOMEM -- failure
* SASL_BADVERS -- max_version too small
* SASL_BADPARAM -- bad config string
* ...
*/
typedef int sasl_client_plug_init_t(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount);
/* add a client plug-in
*/
LIBSASL_API int sasl_client_add_plugin(const char *plugname,
sasl_client_plug_init_t *cplugfunc);
typedef struct client_sasl_mechanism
{
int version;
char *plugname;
const sasl_client_plug_t *plug;
} client_sasl_mechanism_t;
typedef void sasl_client_info_callback_t (client_sasl_mechanism_t *m,
sasl_info_callback_stage_t stage,
void *rock);
/* Dump information about available client plugins */
LIBSASL_API int sasl_client_plugin_info (const char *mech_list,
sasl_client_info_callback_t *info_cb,
void *info_cb_rock);
/********************
* Server Functions *
********************/
/* log message formatting routine */
typedef void sasl_logmsg_p(sasl_conn_t *conn, const char *fmt, ...);
/*
* input parameters to server SASL plugin
*
* created / destroyed by the glue code
*
*/
typedef struct sasl_server_params {
const char *service; /* NULL = default service for user_exists
and setpass */
const char *appname; /* name of calling application */
const char *serverFQDN; /* server default fully qualified domain name
* (e.g., gethostname) */
const char *user_realm; /* realm for user (NULL = client supplied) */
const char *iplocalport; /* server IP domain literal & port */
const char *ipremoteport; /* client IP domain literal & port */
unsigned servicelen; /* length of service */
unsigned applen; /* length of appname */
unsigned slen; /* length of serverFQDN */
unsigned urlen; /* length of user_realm */
unsigned iploclen; /* length of iplocalport */
unsigned ipremlen; /* length of ipremoteport */
/* This indicates the level of logging desired. See SASL_LOG_*
* in sasl.h
*
* Plug-ins can ignore this and just pass their desired level to
* the log callback. This is primarily used to eliminate logging which
* might be a performance problem (e.g., full protocol trace) and
* to select between SASL_LOG_TRACE and SASL_LOG_PASS alternatives
*/
int log_level;
const sasl_utils_t *utils; /* SASL API utility routines --
* for a particular sasl_conn_t,
* MUST remain valid until mech_free is
* called */
const sasl_callback_t *callbacks; /* Callbacks from application */
/* application's security requirements */
sasl_security_properties_t props;
sasl_ssf_t external_ssf; /* external SSF active */
/* Pointer to the function which takes the plaintext passphrase and
* transitions a user to non-plaintext mechanisms via setpass calls.
* (NULL = auto transition not enabled/supported)
*
* If passlen is 0, it defaults to strlen(pass).
* returns 0 if no entry added, 1 if entry added
*/
int (*transition)(sasl_conn_t *conn, const char *pass, unsigned passlen);
/* Canonicalize a user name from on-wire to internal format
* added cjn 1999-09-21
* Must be called once user name acquired if canon_user is non-NULL.
* conn connection context
* user user name from wire protocol (need not be NUL terminated)
* ulen length of user name from wire protocol (0 = strlen(user))
* flags for SASL_CU_* flags
* oparams the user, authid, ulen, alen, fields are
* set appropriately after canonicalization/copying and
* authorization of arguments
*
* responsible for setting user, ulen, authid, and alen in the oparams
* structure
*
* default behavior is to strip leading and trailing whitespace, as
* well as allocating space for and copying the parameters.
*
* results:
* SASL_OK -- success
* SASL_NOMEM -- out of memory
* SASL_BADPARAM -- invalid conn
* SASL_BADPROT -- invalid user/authid
*/
int (*canon_user)(sasl_conn_t *conn,
const char *user, unsigned ulen,
unsigned flags,
sasl_out_params_t *oparams);
/* auxiliary property context (see definitions in prop.h)
* added cjn 2000-01-30
*
* NOTE: these properties are the ones associated with the
* canonicalized "user" (user to login as / authorization id), not
* the "authid" (user whose credentials are used / authentication id)
* Prefix the property name with a "*" if a property associated with
* the "authid" is interesting.
*/
struct propctx *propctx;
/* for additions which don't require a version upgrade; set to 0 */
const void *gss_creds; /* GSS credential handle */
const sasl_channel_binding_t *cbinding; /* server channel binding */
const sasl_http_request_t *http_request;/* HTTP Digest request method */
void *spare_ptr4;
int (*spare_fptr1)(void);
int (*spare_fptr2)(void);
int spare_int1;
int spare_int2;
int spare_int3;
/* flags field as passed to sasl_server_new */
unsigned flags;
/* set to 0 initially, this allows a plugin with extended parameters
* to work with an older framework by updating version as parameters
* are added.
*/
int param_version;
} sasl_server_params_t;
/* logging levels (more levels may be added later, if necessary):
*/
#define SASL_LOG_NONE 0 /* don't log anything */
#define SASL_LOG_ERR 1 /* log unusual errors (default) */
#define SASL_LOG_FAIL 2 /* log all authentication failures */
#define SASL_LOG_WARN 3 /* log non-fatal warnings */
#define SASL_LOG_NOTE 4 /* more verbose than LOG_WARN */
#define SASL_LOG_DEBUG 5 /* more verbose than LOG_NOTE */
#define SASL_LOG_TRACE 6 /* traces of internal protocols */
#define SASL_LOG_PASS 7 /* traces of internal protocols, including
* passwords */
/* additional flags for setpass() function below:
*/
/* SASL_SET_CREATE create user if pass non-NULL */
/* SASL_SET_DISABLE disable user */
#define SASL_SET_REMOVE SASL_SET_CREATE /* remove user if pass is NULL */
/* features for server plug-in
*/
#define SASL_FEAT_SERVICE 0x0200 /* service-specific passwords supported */
#define SASL_FEAT_GETSECRET 0x0400 /* sasl_server_{get,put}secret_t callbacks
* required by plug-in */
/* a C object for a server mechanism
*/
typedef struct sasl_server_plug {
/* mechanism name */
const char *mech_name;
/* best mech additional security layer strength factor */
sasl_ssf_t max_ssf;
/* best security flags, as defined in sasl_security_properties_t */
unsigned security_flags;
/* features of plugin */
unsigned features;
/* global state for mechanism */
void *glob_context;
/* create a new mechanism handler
* glob_context -- global context
* sparams -- server config params
* challenge -- server challenge from previous instance or NULL
* challen -- length of challenge from previous instance or 0
* out:
* conn_context -- connection context
* errinfo -- error information
*
* returns:
* SASL_OK -- successfully created mech instance
* SASL_* -- any other server error code
*/
int (*mech_new)(void *glob_context,
sasl_server_params_t *sparams,
const char *challenge,
unsigned challen,
void **conn_context);
/* perform one step in exchange
*
* returns:
* SASL_OK -- success, all done
* SASL_CONTINUE -- success, one more round trip
* SASL_* -- any other server error code
*/
int (*mech_step)(void *conn_context,
sasl_server_params_t *sparams,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams);
/* dispose of a connection state
*/
void (*mech_dispose)(void *conn_context, const sasl_utils_t *utils);
/* free global state for mechanism
* mech_dispose must be called on all mechanisms first
*/
void (*mech_free)(void *glob_context, const sasl_utils_t *utils);
/* set a password (optional)
* glob_context -- global context
* sparams -- service, middleware utilities, etc. props ignored
* user -- user name
* pass -- password/passphrase (NULL = disable/remove/delete)
* passlen -- length of password/passphrase
* oldpass -- old password/passphrase (NULL = transition)
* oldpasslen -- length of password/passphrase
* flags -- see above
*
* returns:
* SASL_NOCHANGE -- no change was needed
* SASL_NOUSER -- no entry for user
* SASL_NOVERIFY -- no mechanism compatible entry for user
* SASL_PWLOCK -- password locked
* SASL_DIABLED -- account disabled
* etc.
*/
int (*setpass)(void *glob_context,
sasl_server_params_t *sparams,
const char *user,
const char *pass, unsigned passlen,
const char *oldpass, unsigned oldpasslen,
unsigned flags);
/* query which mechanisms are available for user
* glob_context -- context
* sparams -- service, middleware utilities, etc. props ignored
* user -- NUL terminated user name
* maxmech -- max number of strings in mechlist (0 = no output)
* output:
* mechlist -- an array of C string pointers, filled in with
* mechanism names available to the user
*
* returns:
* SASL_OK -- success
* SASL_NOMEM -- not enough memory
* SASL_FAIL -- lower level failure
* SASL_DISABLED -- account disabled
* SASL_NOUSER -- user not found
* SASL_BUFOVER -- maxmech is too small
* SASL_NOVERIFY -- user found, but no mechanisms available
*/
int (*user_query)(void *glob_context,
sasl_server_params_t *sparams,
const char *user,
int maxmech,
const char **mechlist);
/* perform precalculations during a network round-trip
* or idle period. conn_context may be NULL (optional)
* returns 1 if action taken, 0 if no action taken
*/
int (*idle)(void *glob_context,
void *conn_context,
sasl_server_params_t *sparams);
/* check if mechanism is available
* optional--if NULL, mechanism is available based on ENABLE= in config
*
* If this routine sets conn_context to a non-NULL value, then the call
* to mech_new will be skipped. This should not be done unless
* there's a significant performance benefit, since it can cause
* additional memory allocation in SASL core code to keep track of
* contexts potentially for multiple mechanisms.
*
* This is called by the first call to sasl_listmech() for a
* given connection context, thus for a given protocol it may
* never be called. Note that if mech_avail returns SASL_NOMECH,
* then that mechanism is considered disabled for the remainder
* of the session. If mech_avail returns SASL_NOTDONE, then a
* future call to mech_avail may still return either SASL_OK
* or SASL_NOMECH.
*
* returns SASL_OK on success,
* SASL_NOTDONE if mech is not available now, but may be later
* (e.g. EXTERNAL w/o auth_id)
* SASL_NOMECH if mech disabled
*/
int (*mech_avail)(void *glob_context,
sasl_server_params_t *sparams,
void **conn_context);
/* for additions which don't require a version upgrade; set to 0 */
int (*spare_fptr2)(void);
} sasl_server_plug_t;
#define SASL_SERVER_PLUG_VERSION 4
/* plug-in entry point:
* utils -- utility callback functions
* plugname -- name of plug-in (may be NULL)
* max_version -- highest server plug version supported
* returns:
* out_version -- server plug-in version of result
* pluglist -- list of mechanism plug-ins
* plugcount -- number of mechanism plug-ins
* results:
* SASL_OK -- success
* SASL_NOMEM -- failure
* SASL_BADVERS -- max_version too small
* SASL_BADPARAM -- bad config string
* ...
*/
typedef int sasl_server_plug_init_t(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount);
/*
* add a server plug-in
*/
LIBSASL_API int sasl_server_add_plugin(const char *plugname,
sasl_server_plug_init_t *splugfunc);
typedef struct server_sasl_mechanism
{
int version;
int condition; /* set to SASL_NOUSER if no available users;
set to SASL_CONTINUE if delayed plugin loading */
char *plugname; /* for AUTHSOURCE tracking */
const sasl_server_plug_t *plug;
char *f; /* where should i load the mechanism from? */
} server_sasl_mechanism_t;
typedef void sasl_server_info_callback_t (server_sasl_mechanism_t *m,
sasl_info_callback_stage_t stage,
void *rock);
/* Dump information about available server plugins (separate functions are
used for canon and auxprop plugins) */
LIBSASL_API int sasl_server_plugin_info (const char *mech_list,
sasl_server_info_callback_t *info_cb,
void *info_cb_rock);
/*********************************************************
* user canonicalization plug-in -- added cjn 1999-09-29 *
*********************************************************/
typedef struct sasl_canonuser {
/* optional features of plugin (set to 0) */
int features;
/* spare integer (set to 0) */
int spare_int1;
/* global state for plugin */
void *glob_context;
/* name of plugin */
char *name;
/* free global state for plugin */
void (*canon_user_free)(void *glob_context, const sasl_utils_t *utils);
/* canonicalize a username
* glob_context -- global context from this structure
* sparams -- server params, note user_realm&propctx elements
* user -- user to login as (may not be NUL terminated)
* len -- length of user name (0 = strlen(user))
* flags -- for SASL_CU_* flags
* out -- buffer to copy user name
* out_max -- max length of user name
* out_len -- set to length of user name
*
* note that the output buffers MAY be the same as the input buffers.
*
* returns
* SASL_OK on success
* SASL_BADPROT username contains invalid character
*/
int (*canon_user_server)(void *glob_context,
sasl_server_params_t *sparams,
const char *user, unsigned len,
unsigned flags,
char *out,
unsigned out_umax, unsigned *out_ulen);
int (*canon_user_client)(void *glob_context,
sasl_client_params_t *cparams,
const char *user, unsigned len,
unsigned flags,
char *out,
unsigned out_max, unsigned *out_len);
/* for additions which don't require a version upgrade; set to 0 */
int (*spare_fptr1)(void);
int (*spare_fptr2)(void);
int (*spare_fptr3)(void);
} sasl_canonuser_plug_t;
#define SASL_CANONUSER_PLUG_VERSION 5
/* default name for canonuser plug-in entry point is "sasl_canonuser_init"
* similar to sasl_server_plug_init model, except only returns one
* sasl_canonuser_plug_t structure;
*/
typedef int sasl_canonuser_init_t(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_canonuser_plug_t **plug,
const char *plugname);
/* add a canonuser plugin
*/
LIBSASL_API int sasl_canonuser_add_plugin(const char *plugname,
sasl_canonuser_init_t *canonuserfunc);
/******************************************************
* auxiliary property plug-in -- added cjn 1999-09-29 *
******************************************************/
typedef struct sasl_auxprop_plug {
/* optional features of plugin (none defined yet, set to 0) */
int features;
/* spare integer, must be set to 0 */
int spare_int1;
/* global state for plugin */
void *glob_context;
/* free global state for plugin (OPTIONAL) */
void (*auxprop_free)(void *glob_context, const sasl_utils_t *utils);
/* fill in fields of an auxiliary property context
* last element in array has id of SASL_AUX_END
* elements with non-0 len should be ignored.
*/
int (*auxprop_lookup)(void *glob_context,
sasl_server_params_t *sparams,
unsigned flags,
const char *user, unsigned ulen);
/* name of the auxprop plugin */
char *name;
/* store the fields/values of an auxiliary property context (OPTIONAL)
*
* if ctx is NULL, just check if storing properties is enabled
*
* returns
* SASL_OK on success
* SASL_FAIL on failure
*/
int (*auxprop_store)(void *glob_context,
sasl_server_params_t *sparams,
struct propctx *ctx,
const char *user, unsigned ulen);
} sasl_auxprop_plug_t;
/* auxprop lookup flags */
#define SASL_AUXPROP_OVERRIDE 0x01 /* if clear, ignore auxiliary properties
* with non-zero len field. If set,
* override value of those properties */
#define SASL_AUXPROP_AUTHZID 0x02 /* if clear, we are looking up the
* authid flags (prefixed with *), otherwise
* we are looking up the authzid flags
* (no prefix) */
/* NOTE: Keep in sync with SASL_CU_<XXX> flags */
#define SASL_AUXPROP_VERIFY_AGAINST_HASH 0x10
#define SASL_AUXPROP_PLUG_VERSION 8
/* default name for auxprop plug-in entry point is "sasl_auxprop_init"
* similar to sasl_server_plug_init model, except only returns one
* sasl_auxprop_plug_t structure;
*/
typedef int sasl_auxprop_init_t(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_auxprop_plug_t **plug,
const char *plugname);
/* add an auxiliary property plug-in
*/
LIBSASL_API int sasl_auxprop_add_plugin(const char *plugname,
sasl_auxprop_init_t *auxpropfunc);
typedef void auxprop_info_callback_t (sasl_auxprop_plug_t *m,
sasl_info_callback_stage_t stage,
void *rock);
/* Dump information about available auxprop plugins (separate functions are
used for canon and server authentication plugins) */
LIBSASL_API int auxprop_plugin_info (const char *mech_list,
auxprop_info_callback_t *info_cb,
void *info_cb_rock);
#ifdef __cplusplus
}
#endif
#endif /* SASLPLUG_H */
@@ -1,99 +0,0 @@
/* saslutil.h -- various utility functions in SASL library
*/
#ifndef SASLUTIL_H
#define SASLUTIL_H 1
#ifndef SASL_H
#include "sasl.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* base64 decode
* in -- input data
* inlen -- length of input data
* out -- output data (may be same as in, must have enough space)
* outmax -- max size of output buffer
* result:
* outlen -- actual output length
*
* returns SASL_BADPROT on bad base64,
* SASL_BUFOVER if result won't fit
* SASL_OK on success
*/
LIBSASL_API int sasl_decode64(const char *in, unsigned inlen,
char *out, unsigned outmax, unsigned *outlen);
/* base64 encode
* in -- input data
* inlen -- input data length
* out -- output buffer (will be NUL terminated)
* outmax -- max size of output buffer
* result:
* outlen -- gets actual length of output buffer (optional)
*
* Returns SASL_OK on success, SASL_BUFOVER if result won't fit
*/
LIBSASL_API int sasl_encode64(const char *in, unsigned inlen,
char *out, unsigned outmax, unsigned *outlen);
/* make a challenge string (NUL terminated)
* buf -- buffer for result
* maxlen -- max length of result
* hostflag -- 0 = don't include hostname, 1 = include hostname
* returns final length or 0 if not enough space
*/
LIBSASL_API int sasl_mkchal(sasl_conn_t *conn, char *buf,
unsigned maxlen, unsigned hostflag);
/* verify a string is valid UTF-8
* if len == 0, strlen(str) will be used.
* returns SASL_BADPROT on error, SASL_OK on success
*/
LIBSASL_API int sasl_utf8verify(const char *str, unsigned len);
/* create random pool seeded with OS-based params */
LIBSASL_API int sasl_randcreate(sasl_rand_t **rpool);
/* free random pool from randcreate */
LIBSASL_API void sasl_randfree(sasl_rand_t **rpool);
/* seed random number generator */
LIBSASL_API void sasl_randseed(sasl_rand_t *rpool, const char *seed,
unsigned len);
/* generate random octets */
LIBSASL_API void sasl_rand(sasl_rand_t *rpool, char *buf, unsigned len);
/* churn data into random number generator */
LIBSASL_API void sasl_churn(sasl_rand_t *rpool, const char *data,
unsigned len);
/* erase a security sensitive buffer or password.
* Implementation may use recovery-resistant erase logic.
*/
LIBSASL_API void sasl_erasebuffer(char *pass, unsigned len);
/* Lowercase string in place */
LIBSASL_API char *sasl_strlower (char *val);
LIBSASL_API int sasl_config_init(const char *filename);
LIBSASL_API void sasl_config_done(void);
#ifdef WIN32
/* Just in case a different DLL defines this as well */
#if defined(NEED_GETOPT)
LIBSASL_API int getopt(int argc, char **argv, char *optstring);
#endif
LIBSASL_API char * getpass(const char *prompt);
#endif /* WIN32 */
#ifdef __cplusplus
}
#endif
#endif /* SASLUTIL_H */
-104
View File
@@ -1,104 +0,0 @@
# Makefile.am for the SASL library
# Rob Earhart
# $Id: Makefile.am,v 1.88 2011/09/05 14:18:10 murch Exp $
# Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Library version info - here at the top, for sanity
# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
# CURRENT:REVISION:AGE
sasl_version = 3:0:0
INCLUDES=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
EXTRA_DIST = windlopen.c staticopen.h NTMakefile
EXTRA_LIBRARIES = libsasl2.a
noinst_LIBRARIES = @SASL_STATIC_LIBS@
libsasl2_a_SOURCES=
BUILT_SOURCES = $(SASL_STATIC_SRCS)
common_headers = saslint.h
common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
LTLIBOBJS = @LTLIBOBJS@
LIBOBJS = @LIBOBJS@
LIB_DOOR= @LIB_DOOR@
lib_LTLIBRARIES = libsasl2.la
libsasl2_la_SOURCES = $(common_sources) $(common_headers)
libsasl2_la_LDFLAGS = -version-info $(sasl_version)
libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
if MACOSX
framedir = /Library/Frameworks/SASL2.framework
install-exec-hook:
$(mkinstalldirs) $(framedir)/Versions/A
ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
cd $(framedir) ; ln -fs Versions/A/SASL2 .
else
install-exec-hook:
endif
libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
@echo adding static plugins and dependencies
$(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
@for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
if test ! -f $$i; then continue; fi; . $$i; \
for j in $$dependency_libs foo; do \
case $$j in foo) ;; \
-L*) for k in $$depdirs foo; do \
if test $$k = $$j; then break; fi; done; \
if test $$k = foo; then depdirs="$$depdirs $$j"; fi ;; \
-l*) for k in $$deplibs foo; do \
if test $$k = $$j; then break; fi; done; \
if test $$k = foo; then deplibs="$$deplibs $$j"; fi ;; \
esac; done; dependency_libs=""; done; \
sed -e "/^dependency_libs=/s%=.*%='$${depdirs}$${deplibs}'%" \
libsasl2.la >TMP.$$ && mv TMP.$$ libsasl2.la
rm -f $@
ln -s .libs/$@ $@
$(SASL_STATIC_SRCS): linksrcs
linksrcs:
-ln -s $(SASL_STATIC_SRCS) .
-705
View File
@@ -1,705 +0,0 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for the SASL library
# Rob Earhart
# $Id: Makefile.am,v 1.88 2011/09/05 14:18:10 murch Exp $
# Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = lib
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
getaddrinfo.c getnameinfo.c getsubopt.c snprintf.c
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
$(top_srcdir)/config/sasldb.m4 \
$(top_srcdir)/cmulocal/berkdb.m4 \
$(top_srcdir)/cmulocal/bsd_sockets.m4 \
$(top_srcdir)/cmulocal/c-attribute.m4 \
$(top_srcdir)/cmulocal/common.m4 \
$(top_srcdir)/cmulocal/cyrus.m4 \
$(top_srcdir)/cmulocal/init_automake.m4 \
$(top_srcdir)/cmulocal/ipv6.m4 \
$(top_srcdir)/cmulocal/openldap.m4 \
$(top_srcdir)/cmulocal/openssl.m4 \
$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
libsasl2_a_AR = $(AR) $(ARFLAGS)
libsasl2_a_LIBADD =
am_libsasl2_a_OBJECTS =
libsasl2_a_OBJECTS = $(am_libsasl2_a_OBJECTS)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__objects_1 = auxprop.lo canonusr.lo checkpw.lo client.lo common.lo \
config.lo external.lo md5.lo saslutil.lo server.lo seterror.lo \
dlopen.lo plugin_common.lo
am__objects_2 =
am_libsasl2_la_OBJECTS = $(am__objects_1) $(am__objects_2)
libsasl2_la_OBJECTS = $(am_libsasl2_la_OBJECTS)
libsasl2_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libsasl2_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libsasl2_a_SOURCES) $(libsasl2_la_SOURCES)
DIST_SOURCES = $(libsasl2_a_SOURCES) $(libsasl2_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DIRS = @DIRS@
DMALLOC_LIBS = @DMALLOC_LIBS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETADDRINFOOBJS = @GETADDRINFOOBJS@
GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
GETSUBOPT = @GETSUBOPT@
GREP = @GREP@
GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
GSSAPI_LIBS = @GSSAPI_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPCTYPE = @IPCTYPE@
JAVAC = @JAVAC@
JAVADOC = @JAVADOC@
JAVAH = @JAVAH@
JAVAROOT = @JAVAROOT@
JAVA_INCLUDES = @JAVA_INCLUDES@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_CRYPT = @LIB_CRYPT@
LIB_DES = @LIB_DES@
LIB_DOOR = @LIB_DOOR@
LIB_LDAP = @LIB_LDAP@
LIB_MYSQL = @LIB_MYSQL@
LIB_PGSQL = @LIB_PGSQL@
LIB_SOCKET = @LIB_SOCKET@
LIB_SQLITE = @LIB_SQLITE@
LIB_SQLITE3 = @LIB_SQLITE3@
LN_S = @LN_S@
LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
LTLIBOBJS = @LTLIBOBJS@
LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NTLM_LIBS = @NTLM_LIBS@
OBJEXT = @OBJEXT@
OTP_LIBS = @OTP_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PASSDSS_LIBS = @PASSDSS_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PLAIN_LIBS = @PLAIN_LIBS@
PURECOV = @PURECOV@
PURIFY = @PURIFY@
PWCHECKMETH = @PWCHECKMETH@
RANLIB = @RANLIB@
SASL_DB_BACKEND = @SASL_DB_BACKEND@
SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
SASL_DB_INC = @SASL_DB_INC@
SASL_DB_LIB = @SASL_DB_LIB@
SASL_DB_MANS = @SASL_DB_MANS@
SASL_DB_UTILS = @SASL_DB_UTILS@
SASL_DL_LIB = @SASL_DL_LIB@
SASL_KRB_LIB = @SASL_KRB_LIB@
SASL_MECHS = @SASL_MECHS@
SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
SCRAM_LIBS = @SCRAM_LIBS@
SET_MAKE = @SET_MAKE@
SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
SHELL = @SHELL@
SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
SNPRINTFOBJS = @SNPRINTFOBJS@
SRP_LIBS = @SRP_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
configdir = @configdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Library version info - here at the top, for sanity
# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
# CURRENT:REVISION:AGE
sasl_version = 3:0:0
INCLUDES = -DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
EXTRA_DIST = windlopen.c staticopen.h NTMakefile
EXTRA_LIBRARIES = libsasl2.a
noinst_LIBRARIES = @SASL_STATIC_LIBS@
libsasl2_a_SOURCES =
BUILT_SOURCES = $(SASL_STATIC_SRCS)
common_headers = saslint.h
common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
lib_LTLIBRARIES = libsasl2.la
libsasl2_la_SOURCES = $(common_sources) $(common_headers)
libsasl2_la_LDFLAGS = -version-info $(sasl_version)
libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
@MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libsasl2.la: $(libsasl2_la_OBJECTS) $(libsasl2_la_DEPENDENCIES)
$(libsasl2_la_LINK) -rpath $(libdir) $(libsasl2_la_OBJECTS) $(libsasl2_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getnameinfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getsubopt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auxprop.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonusr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkpw.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlopen.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_common.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslutil.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seterror.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
plugin_common.lo: ../plugins/plugin_common.c
@am__fastdepCC_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plugin_common.lo -MD -MP -MF $(DEPDIR)/plugin_common.Tpo -c -o plugin_common.lo `test -f '../plugins/plugin_common.c' || echo '$(srcdir)/'`../plugins/plugin_common.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/plugin_common.Tpo $(DEPDIR)/plugin_common.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../plugins/plugin_common.c' object='plugin_common.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plugin_common.lo `test -f '../plugins/plugin_common.c' || echo '$(srcdir)/'`../plugins/plugin_common.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-libLTLIBRARIES
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstLIBRARIES ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-exec-hook install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-libLTLIBRARIES
@MACOSX_TRUE@install-exec-hook:
@MACOSX_TRUE@ $(mkinstalldirs) $(framedir)/Versions/A
@MACOSX_TRUE@ ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
@MACOSX_TRUE@ cd $(framedir) ; ln -fs Versions/A/SASL2 .
@MACOSX_FALSE@install-exec-hook:
libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
@echo adding static plugins and dependencies
$(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
@for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
if test ! -f $$i; then continue; fi; . $$i; \
for j in $$dependency_libs foo; do \
case $$j in foo) ;; \
-L*) for k in $$depdirs foo; do \
if test $$k = $$j; then break; fi; done; \
if test $$k = foo; then depdirs="$$depdirs $$j"; fi ;; \
-l*) for k in $$deplibs foo; do \
if test $$k = $$j; then break; fi; done; \
if test $$k = foo; then deplibs="$$deplibs $$j"; fi ;; \
esac; done; dependency_libs=""; done; \
sed -e "/^dependency_libs=/s%=.*%='$${depdirs}$${deplibs}'%" \
libsasl2.la >TMP.$$ && mv TMP.$$ libsasl2.la
rm -f $@
ln -s .libs/$@ $@
$(SASL_STATIC_SRCS): linksrcs
linksrcs:
-ln -s $(SASL_STATIC_SRCS) .
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-128
View File
@@ -1,128 +0,0 @@
!INCLUDE ..\win32\common.mak
# WS2tcpip.h included in Visual Studio 7 provides getaddrinfo, ...
# emulation on Windows, so there is no need to build getaddrinfo.c
!IF "$(VCVER)" == "6"
compat_sources = getaddrinfo.c getnameinfo.c
compat_objs = getaddrinfo.obj getnameinfo.obj
!ENDIF
libsasl_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c windlopen.c getsubopt.c plugin_common.c plugin_common.h $(compat_sources)
libsasl_objs = auxprop.obj canonusr.obj checkpw.obj client.obj common.obj config.obj external.obj md5.obj saslutil.obj server.obj seterror.obj windlopen.obj getsubopt.obj plugin_common.obj $(compat_objs)
libsasl_res = libsasl.res
libsasl_out = libsasl.dll libsasl.exp libsasl.lib $(libsasl_res)
CPPFLAGS = /wd4996 /Wp64 /D NEED_GETOPT /I "..\win32\include" /I "." /I "..\include" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBSASL_EXPORTS"
!IF $(TARGET_WIN_SYSTEM) >= 51
CPPFLAGS = /D TARGET_WIN_SYSTEM=$(TARGET_WIN_SYSTEM) $(CPPFLAGS)
!ENDIF
all_objs = $(libsasl_objs)
all_out = $(libsasl_out)
libdir = $(prefix)\lib
bindir = $(prefix)\bin
exclude_list = binexclude.lst
all: all-recursive
#
# /I flag to xcopy tells to treat the last parameter as directory and create all missing levels
#
# In order to force xcopy not to confirm if the second parameter is file or directory,
# the first parameter has to contain a wildcard character. For example, we use libsasl.l*,
# instead of libsasl.lib. Ugly, but works!
#
install: libsasl.dll
@echo libsasl.exp > $(exclude_list)
@echo libsasl.res >> $(exclude_list)
@echo libsasl.dll.manifest >> $(exclude_list)
# .lib is excluded only because it is copied separately below
@echo libsasl.lib >> $(exclude_list)
@xcopy libsasl.* $(bindir) /I /F /Y /EXCLUDE:$(exclude_list)
@xcopy libsasl.l* $(libdir) /I /F /Y
all-recursive: libsasl.dll
libsasl.dll: $(libsasl_objs) $(libsasl_res)
$(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"libsasl.dll" /implib:"libsasl.lib" /pdb:"libsasl.pdb" $(libsasl_objs) $(libsasl_res)
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
plugin_common.c: ..\plugins\plugin_common.c plugin_common.h
xcopy /D /Y ..\plugins\plugin_common.c .
plugin_common.h: ..\plugins\plugin_common.h
xcopy /D /Y ..\plugins\plugin_common.h .
auxprop.obj checkpw.obj client.obj common.obj external.obj plugin_common.obj server.obj seterror.obj: ..\include\saslplug.h
auxprop.obj canonusr.obj checkpw.obj client.obj common.obj config.obj external.obj getsubopt.obj md5.obj plugin_common.obj server.obj seterror.obj windlopen.obj: ..\include\sasl.h ..\include\prop.h
auxprop.obj canonusr.obj checkpw.obj client.obj common.obj config.obj dlopen.obj external.obj saslutil.obj server.obj seterror.obj windlopen.obj: saslint.h
CLEAN :
-@erase $(all_objs)
-@erase "*.idb"
-@erase "*.pdb"
-@erase "*.manifest"
-@erase $(all_out)
-@erase plugin_common.h
-@erase plugin_common.c
-@erase $(exclude_list)
$(libsasl_res): NTMakefile
rc /fo"$(libsasl_res)" <<
#include "windows.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION $(SASL_VERSION_MAJOR),$(SASL_VERSION_MINOR),$(SASL_VERSION_STEP),0
PRODUCTVERSION $(SASL_VERSION_MAJOR),$(SASL_VERSION_MINOR),$(SASL_VERSION_STEP),0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Carnegie Mellon University\0"
VALUE "FileDescription", "CMU SASL API v2\0"
VALUE "FileVersion", "$(SASL_VERSION_MAJOR).$(SASL_VERSION_MINOR).$(SASL_VERSION_STEP).0\0"
VALUE "InternalName", "libsasl\0"
VALUE "LegalCopyright", "Copyright (c) Carnegie Mellon University 2002-2012\0"
VALUE "OriginalFilename", "libsasl.dll\0"
VALUE "ProductName", "Carnegie Mellon University SASL\0"
VALUE "ProductVersion", "$(SASL_VERSION_MAJOR).$(SASL_VERSION_MINOR).$(SASL_VERSION_STEP)-0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
<<
.c.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
File diff suppressed because it is too large Load Diff
-462
View File
@@ -1,462 +0,0 @@
/* canonusr.c - user canonicalization support
* Rob Siemborski
* $Id: canonusr.c,v 1.22 2011/09/01 16:33:42 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <sasl.h>
#include <string.h>
#include <ctype.h>
#include <prop.h>
#include <stdio.h>
#include "saslint.h"
typedef struct canonuser_plug_list
{
struct canonuser_plug_list *next;
char name[PATH_MAX];
const sasl_canonuser_plug_t *plug;
} canonuser_plug_list_t;
static canonuser_plug_list_t *canonuser_head = NULL;
/* default behavior:
* eliminate leading & trailing whitespace,
* null-terminate, and get into the outparams
* (handled by INTERNAL plugin) */
/* a zero ulen or alen indicates that it is strlen(value) */
int _sasl_canon_user(sasl_conn_t *conn,
const char *user, unsigned ulen,
unsigned flags,
sasl_out_params_t *oparams)
{
canonuser_plug_list_t *ptr;
sasl_server_conn_t *sconn = NULL;
sasl_client_conn_t *cconn = NULL;
sasl_canon_user_t *cuser_cb;
sasl_getopt_t *getopt;
void *context;
int result;
const char *plugin_name = NULL;
char *user_buf;
unsigned *lenp;
if(!conn) return SASL_BADPARAM;
if(!user || !oparams) return SASL_BADPARAM;
if(flags & SASL_CU_AUTHID) {
user_buf = conn->authid_buf;
lenp = &(oparams->alen);
} else if (flags & SASL_CU_AUTHZID) {
user_buf = conn->user_buf;
lenp = &(oparams->ulen);
} else {
return SASL_BADPARAM;
}
if(conn->type == SASL_CONN_SERVER) sconn = (sasl_server_conn_t *)conn;
else if(conn->type == SASL_CONN_CLIENT) cconn = (sasl_client_conn_t *)conn;
else return SASL_FAIL;
if(!ulen) ulen = (unsigned int)strlen(user);
/* check to see if we have a callback to make*/
result = _sasl_getcallback(conn,
SASL_CB_CANON_USER,
(sasl_callback_ft *)&cuser_cb,
&context);
if(result == SASL_OK && cuser_cb) {
result = cuser_cb(conn,
context,
user,
ulen,
flags,
(conn->type == SASL_CONN_SERVER ?
sconn->user_realm :
NULL),
user_buf,
CANON_BUF_SIZE,
lenp);
if (result != SASL_OK) return result;
/* Point the input copy at the stored buffer */
user = user_buf;
ulen = *lenp;
}
/* which plugin are we supposed to use? */
result = _sasl_getcallback(conn,
SASL_CB_GETOPT,
(sasl_callback_ft *)&getopt,
&context);
if (result == SASL_OK && getopt) {
getopt(context, NULL, "canon_user_plugin", &plugin_name, NULL);
}
if (!plugin_name) {
/* Use Default */
plugin_name = "INTERNAL";
}
for (ptr = canonuser_head; ptr; ptr = ptr->next) {
/* A match is if we match the internal name of the plugin, or if
* we match the filename (old-style) */
if ((ptr->plug->name && !strcmp(plugin_name, ptr->plug->name))
|| !strcmp(plugin_name, ptr->name)) break;
}
/* We clearly don't have this one! */
if (!ptr) {
sasl_seterror(conn, 0, "desired canon_user plugin %s not found",
plugin_name);
return SASL_NOMECH;
}
if (sconn) {
/* we're a server */
result = ptr->plug->canon_user_server(ptr->plug->glob_context,
sconn->sparams,
user, ulen,
flags,
user_buf,
CANON_BUF_SIZE, lenp);
} else {
/* we're a client */
result = ptr->plug->canon_user_client(ptr->plug->glob_context,
cconn->cparams,
user, ulen,
flags,
user_buf,
CANON_BUF_SIZE, lenp);
}
if (result != SASL_OK) return result;
if ((flags & SASL_CU_AUTHID) && (flags & SASL_CU_AUTHZID)) {
/* We did both, so we need to copy the result into
* the buffer for the authzid from the buffer for the authid */
memcpy(conn->user_buf, conn->authid_buf, CANON_BUF_SIZE);
oparams->ulen = oparams->alen;
}
/* Set the appropriate oparams (lengths have already been set by lenp) */
if (flags & SASL_CU_AUTHID) {
oparams->authid = conn->authid_buf;
}
if (flags & SASL_CU_AUTHZID) {
oparams->user = conn->user_buf;
}
RETURN(conn, result);
}
/* Lookup all properties for authentication and/or authorization identity. */
static int _sasl_auxprop_lookup_user_props (sasl_conn_t *conn,
unsigned flags,
sasl_out_params_t *oparams)
{
sasl_server_conn_t *sconn = NULL;
int result = SASL_OK;
if (!conn) return SASL_BADPARAM;
if (!oparams) return SASL_BADPARAM;
#ifndef macintosh
if (conn->type == SASL_CONN_SERVER) sconn = (sasl_server_conn_t *)conn;
/* do auxprop lookups (server only) */
if (sconn) {
int authz_result;
unsigned auxprop_lookup_flags = flags & SASL_CU_ASIS_MASK;
if (flags & SASL_CU_OVERRIDE) {
auxprop_lookup_flags |= SASL_AUXPROP_OVERRIDE;
}
if (flags & SASL_CU_AUTHID) {
result = _sasl_auxprop_lookup(sconn->sparams,
auxprop_lookup_flags,
oparams->authid,
oparams->alen);
} else {
result = SASL_CONTINUE;
}
if (flags & SASL_CU_AUTHZID) {
authz_result = _sasl_auxprop_lookup(sconn->sparams,
auxprop_lookup_flags | SASL_AUXPROP_AUTHZID,
oparams->user,
oparams->ulen);
if (result == SASL_CONTINUE) {
/* Only SASL_CU_AUTHZID was requested.
The authz_result value is authoritative. */
result = authz_result;
} else if (result == SASL_OK && authz_result != SASL_NOUSER) {
/* Use the authz_result value, unless "result"
already contains an error */
result = authz_result;
}
}
if ((flags & SASL_CU_EXTERNALLY_VERIFIED) && (result == SASL_NOUSER || result == SASL_NOMECH)) {
/* The called has explicitly told us that the authentication identity
was already verified or will be verified independently.
So a failure to retrieve any associated properties
is not an error. For example the caller is using Kerberos to verify user,
but the LDAPDB/SASLDB auxprop plugin doesn't contain any auxprops for
the user.
Another case is PLAIN/LOGIN not using auxprop to verify user passwords. */
result = SASL_OK;
}
}
#endif
RETURN(conn, result);
}
/* default behavior:
* Eliminate leading & trailing whitespace,
* null-terminate, and get into the outparams
* (handled by INTERNAL plugin).
*
* Server only: Also does auxprop lookups once username
* is canonicalized. */
int _sasl_canon_user_lookup (sasl_conn_t *conn,
const char *user,
unsigned ulen,
unsigned flags,
sasl_out_params_t *oparams)
{
int result;
result = _sasl_canon_user (conn,
user,
ulen,
flags,
oparams);
if (result == SASL_OK) {
result = _sasl_auxprop_lookup_user_props (conn,
flags,
oparams);
}
RETURN(conn, result);
}
void _sasl_canonuser_free()
{
canonuser_plug_list_t *ptr, *ptr_next;
for(ptr = canonuser_head; ptr; ptr = ptr_next) {
ptr_next = ptr->next;
if(ptr->plug->canon_user_free)
ptr->plug->canon_user_free(ptr->plug->glob_context,
sasl_global_utils);
sasl_FREE(ptr);
}
canonuser_head = NULL;
}
int sasl_canonuser_add_plugin(const char *plugname,
sasl_canonuser_init_t *canonuserfunc)
{
int result, out_version;
canonuser_plug_list_t *new_item;
sasl_canonuser_plug_t *plug;
if(!plugname || strlen(plugname) > (PATH_MAX - 1)) {
sasl_seterror(NULL, 0,
"bad plugname passed to sasl_canonuser_add_plugin\n");
return SASL_BADPARAM;
}
result = canonuserfunc(sasl_global_utils, SASL_CANONUSER_PLUG_VERSION,
&out_version, &plug, plugname);
if(result != SASL_OK) {
_sasl_log(NULL, SASL_LOG_ERR, "%s_canonuser_plug_init() failed in sasl_canonuser_add_plugin(): %z\n",
plugname, result);
return result;
}
if(!plug->canon_user_server && !plug->canon_user_client) {
/* We need at least one of these implemented */
_sasl_log(NULL, SASL_LOG_ERR,
"canonuser plugin '%s' without either client or server side", plugname);
return SASL_BADPROT;
}
new_item = sasl_ALLOC(sizeof(canonuser_plug_list_t));
if(!new_item) return SASL_NOMEM;
strncpy(new_item->name, plugname, PATH_MAX);
new_item->plug = plug;
new_item->next = canonuser_head;
canonuser_head = new_item;
return SASL_OK;
}
#ifdef MIN
#undef MIN
#endif
#define MIN(a,b) (((a) < (b))? (a):(b))
static int _canonuser_internal(const sasl_utils_t *utils,
const char *user, unsigned ulen,
unsigned flags __attribute__((unused)),
char *out_user,
unsigned out_umax, unsigned *out_ulen)
{
unsigned i;
char *in_buf, *userin;
const char *begin_u;
unsigned u_apprealm = 0;
sasl_server_conn_t *sconn = NULL;
if(!utils || !user) return SASL_BADPARAM;
in_buf = sasl_ALLOC((ulen + 2) * sizeof(char));
if(!in_buf) return SASL_NOMEM;
userin = in_buf;
memcpy(userin, user, ulen);
userin[ulen] = '\0';
/* Strip User ID */
for(i=0;isspace((int)userin[i]) && i<ulen;i++);
begin_u = &(userin[i]);
if(i>0) ulen -= i;
for(;ulen > 0 && isspace((int)begin_u[ulen-1]); ulen--);
if(begin_u == &(userin[ulen])) {
sasl_FREE(in_buf);
utils->seterror(utils->conn, 0, "All-whitespace username.");
return SASL_FAIL;
}
if(utils->conn && utils->conn->type == SASL_CONN_SERVER)
sconn = (sasl_server_conn_t *)utils->conn;
/* Need to append realm if necessary (see sasl.h) */
if(sconn && sconn->user_realm && !strchr(user, '@')) {
u_apprealm = (unsigned) strlen(sconn->user_realm) + 1;
}
/* Now Copy */
memcpy(out_user, begin_u, MIN(ulen, out_umax));
if(sconn && u_apprealm) {
if(ulen >= out_umax) return SASL_BUFOVER;
out_user[ulen] = '@';
memcpy(&(out_user[ulen+1]), sconn->user_realm,
MIN(u_apprealm-1, out_umax-ulen-1));
}
out_user[MIN(ulen + u_apprealm,out_umax)] = '\0';
if(ulen + u_apprealm > out_umax) return SASL_BUFOVER;
if(out_ulen) *out_ulen = MIN(ulen + u_apprealm,out_umax);
sasl_FREE(in_buf);
return SASL_OK;
}
static int _cu_internal_server(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *user, unsigned ulen,
unsigned flags,
char *out_user,
unsigned out_umax, unsigned *out_ulen)
{
return _canonuser_internal(sparams->utils,
user, ulen,
flags, out_user, out_umax, out_ulen);
}
static int _cu_internal_client(void *glob_context __attribute__((unused)),
sasl_client_params_t *cparams,
const char *user, unsigned ulen,
unsigned flags,
char *out_user,
unsigned out_umax, unsigned *out_ulen)
{
return _canonuser_internal(cparams->utils,
user, ulen,
flags, out_user, out_umax, out_ulen);
}
static sasl_canonuser_plug_t canonuser_internal_plugin = {
0, /* features */
0, /* spare */
NULL, /* glob_context */
"INTERNAL", /* name */
NULL, /* canon_user_free */
_cu_internal_server,
_cu_internal_client,
NULL,
NULL,
NULL
};
int internal_canonuser_init(const sasl_utils_t *utils __attribute__((unused)),
int max_version,
int *out_version,
sasl_canonuser_plug_t **plug,
const char *plugname __attribute__((unused)))
{
if(!out_version || !plug) return SASL_BADPARAM;
if(max_version < SASL_CANONUSER_PLUG_VERSION) return SASL_BADVERS;
*out_version = SASL_CANONUSER_PLUG_VERSION;
*plug = &canonuser_internal_plugin;
return SASL_OK;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-168
View File
@@ -1,168 +0,0 @@
/* SASL Config file API
* Rob Siemborski
* Tim Martin (originally in Cyrus distribution)
* $Id: config.c,v 1.19 2011/11/08 17:22:40 murch Exp $
*/
/*
* Copyright (c) 1998-2009 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "sasl.h"
#include "saslint.h"
struct configlist {
char *key;
char *value;
};
static struct configlist *configlist = NULL;
static int nconfiglist = 0;
#define CONFIGLISTGROWSIZE 100
int sasl_config_init(const char *filename)
{
FILE *infile;
int lineno = 0;
int alloced = 0;
char buf[4096];
char *p, *key;
char *tail;
int result;
nconfiglist=0;
infile = fopen(filename, "r");
if (!infile) {
return SASL_CONTINUE;
}
while (fgets(buf, sizeof(buf), infile)) {
lineno++;
if (buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
for (p = buf; *p && isspace((int) *p); p++);
if (!*p || *p == '#') continue;
key = p;
while (*p && (isalnum((int) *p) || *p == '-' || *p == '_')) {
if (isupper((int) *p)) *p = (char) tolower(*p);
p++;
}
if (*p != ':') {
fclose(infile);
return SASL_FAIL;
}
*p++ = '\0';
while (*p && isspace((int) *p)) p++;
if (!*p) {
fclose(infile);
return SASL_FAIL;
}
/* Now strip trailing spaces, if any */
tail = p + strlen(p) - 1;
while (tail > p && isspace((int) *tail)) {
*tail = '\0';
tail--;
}
if (nconfiglist == alloced) {
alloced += CONFIGLISTGROWSIZE;
configlist=sasl_REALLOC((char *)configlist,
alloced * sizeof(struct configlist));
if (configlist == NULL) {
fclose(infile);
return SASL_NOMEM;
}
}
result = _sasl_strdup(key,
&(configlist[nconfiglist].key),
NULL);
if (result != SASL_OK) {
fclose(infile);
return result;
}
result = _sasl_strdup(p,
&(configlist[nconfiglist].value),
NULL);
if (result != SASL_OK) {
fclose(infile);
return result;
}
nconfiglist++;
}
fclose(infile);
return SASL_OK;
}
const char *sasl_config_getstring(const char *key,const char *def)
{
int opt;
for (opt = 0; opt < nconfiglist; opt++) {
if (*key == configlist[opt].key[0] &&
!strcmp(key, configlist[opt].key))
return configlist[opt].value;
}
return def;
}
void sasl_config_done(void)
{
int opt;
for (opt = 0; opt < nconfiglist; opt++) {
if (configlist[opt].key) sasl_FREE(configlist[opt].key);
if (configlist[opt].value) sasl_FREE(configlist[opt].value);
}
sasl_FREE(configlist);
configlist = NULL;
nconfiglist = 0;
}
-562
View File
@@ -1,562 +0,0 @@
/* dlopen.c--Unix dlopen() dynamic loader interface
* Rob Siemborski
* Rob Earhart
* $Id: dlopen.c,v 1.52 2009/04/11 10:21:43 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <limits.h>
#include <sasl.h>
#include "saslint.h"
#ifndef PIC
#include <saslplug.h>
#include "staticopen.h"
#endif
#ifdef DO_DLOPEN
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else /* HAVE_DIRENT_H */
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
#endif /* ! HAVE_DIRENT_H */
#ifndef NAME_MAX
# ifdef _POSIX_NAME_MAX
# define NAME_MAX _POSIX_NAME_MAX
# else
# define NAME_MAX 16
# endif
#endif
#if NAME_MAX < 8
# define NAME_MAX 8
#endif
#ifdef __hpux
#ifndef HAVE_DLFCN_H
#include <dl.h>
typedef shl_t * dll_handle;
typedef void * dll_func;
dll_handle
dlopen(char *fname, int mode)
{
shl_t h = shl_load(fname, BIND_DEFERRED, 0L);
shl_t *hp = NULL;
if (h) {
hp = (shl_t *)malloc(sizeof (shl_t));
if (!hp) {
shl_unload(h);
} else {
*hp = h;
}
}
return (dll_handle)hp;
}
int
dlclose(dll_handle hp)
{
shl_t h;
if (hp != NULL) {
h = *((shl_t *)hp);
free(hp);
return shl_unload(h);
} else {
/* Return error */
return -1;
}
}
dll_func
dlsym(dll_handle h, char *n)
{
dll_func handle;
if (shl_findsym ((shl_t *)h, n, TYPE_PROCEDURE, &handle))
return NULL;
return (dll_func)handle;
}
char *dlerror()
{
if (errno != 0) {
return strerror(errno);
}
return "Generic shared library error";
}
#endif /* HAVE_DLFCN_H */
#ifdef __ia64
#define SO_SUFFIX ".so"
#else
#define SO_SUFFIX ".sl"
#endif /* __ia64 */
#elif defined(__APPLE__)
#define SO_SUFFIX ".plugin"
#else /* __APPLE__ */
#define SO_SUFFIX ".so"
#endif
#define LA_SUFFIX ".la"
typedef struct lib_list
{
struct lib_list *next;
void *library;
} lib_list_t;
static lib_list_t *lib_list_head = NULL;
#endif /* DO_DLOPEN */
int _sasl_locate_entry(void *library, const char *entryname,
void **entry_point)
{
#ifdef DO_DLOPEN
/* note that we still check for known problem systems in
* case we are cross-compiling */
#if defined(DLSYM_NEEDS_UNDERSCORE) || (defined(__OpenBSD__) && !defined(__ELF__))
char adj_entryname[1024];
#else
#define adj_entryname entryname
#endif
if(!entryname) {
_sasl_log(NULL, SASL_LOG_ERR,
"no entryname in _sasl_locate_entry");
return SASL_BADPARAM;
}
if(!library) {
_sasl_log(NULL, SASL_LOG_ERR,
"no library in _sasl_locate_entry");
return SASL_BADPARAM;
}
if(!entry_point) {
_sasl_log(NULL, SASL_LOG_ERR,
"no entrypoint output pointer in _sasl_locate_entry");
return SASL_BADPARAM;
}
#if defined(DLSYM_NEEDS_UNDERSCORE) || (defined(__OpenBSD__) && !defined(__ELF__))
snprintf(adj_entryname, sizeof adj_entryname, "_%s", entryname);
#endif
*entry_point = NULL;
*entry_point = dlsym(library, adj_entryname);
if (*entry_point == NULL) {
#if 0 /* This message appears to confuse people */
_sasl_log(NULL, SASL_LOG_DEBUG,
"unable to get entry point %s: %s", adj_entryname,
dlerror());
#endif
return SASL_FAIL;
}
return SASL_OK;
#else
return SASL_FAIL;
#endif /* DO_DLOPEN */
}
#ifdef DO_DLOPEN
static int _sasl_plugin_load(char *plugin, void *library,
const char *entryname,
int (*add_plugin)(const char *, void *))
{
void *entry_point;
int result;
result = _sasl_locate_entry(library, entryname, &entry_point);
if(result == SASL_OK) {
result = add_plugin(plugin, entry_point);
if(result != SASL_OK)
_sasl_log(NULL, SASL_LOG_DEBUG,
"_sasl_plugin_load failed on %s for plugin: %s\n",
entryname, plugin);
}
return result;
}
/* this returns the file to actually open.
* out should be a buffer of size PATH_MAX
* and may be the same as in. */
/* We'll use a static buffer for speed unless someone complains */
#define MAX_LINE 2048
static int _parse_la(const char *prefix, const char *in, char *out)
{
FILE *file;
size_t length;
char line[MAX_LINE];
char *ntmp = NULL;
if(!in || !out || !prefix || out == in) return SASL_BADPARAM;
/* Set this so we can detect failure */
*out = '\0';
length = strlen(in);
if (strcmp(in + (length - strlen(LA_SUFFIX)), LA_SUFFIX)) {
if(!strcmp(in + (length - strlen(SO_SUFFIX)),SO_SUFFIX)) {
/* check for a .la file */
strcpy(line, prefix);
strcat(line, in);
length = strlen(line);
*(line + (length - strlen(SO_SUFFIX))) = '\0';
strcat(line, LA_SUFFIX);
file = fopen(line, "r");
if(file) {
/* We'll get it on the .la open */
fclose(file);
return SASL_FAIL;
}
}
strcpy(out, prefix);
strcat(out, in);
return SASL_OK;
}
strcpy(line, prefix);
strcat(line, in);
file = fopen(line, "r");
if(!file) {
_sasl_log(NULL, SASL_LOG_WARN,
"unable to open LA file: %s", line);
return SASL_FAIL;
}
while(!feof(file)) {
if(!fgets(line, MAX_LINE, file)) break;
if(line[strlen(line) - 1] != '\n') {
_sasl_log(NULL, SASL_LOG_WARN,
"LA file has too long of a line: %s", in);
return SASL_BUFOVER;
}
if(line[0] == '\n' || line[0] == '#') continue;
if(!strncmp(line, "dlname=", sizeof("dlname=") - 1)) {
/* We found the line with the name in it */
char *end;
char *start;
size_t len;
end = strrchr(line, '\'');
if(!end) continue;
start = &line[sizeof("dlname=")-1];
len = strlen(start);
if(len > 3 && start[0] == '\'') {
ntmp=&start[1];
*end='\0';
/* Do we have dlname="" ? */
if(ntmp == end) {
_sasl_log(NULL, SASL_LOG_DEBUG,
"dlname is empty in .la file: %s", in);
return SASL_FAIL;
}
strcpy(out, prefix);
strcat(out, ntmp);
}
break;
}
}
if(ferror(file) || feof(file)) {
_sasl_log(NULL, SASL_LOG_WARN,
"Error reading .la: %s\n", in);
fclose(file);
return SASL_FAIL;
}
fclose(file);
if(!(*out)) {
_sasl_log(NULL, SASL_LOG_WARN,
"Could not find a dlname line in .la file: %s", in);
return SASL_FAIL;
}
return SASL_OK;
}
#endif /* DO_DLOPEN */
/* loads a plugin library */
int _sasl_get_plugin(const char *file,
const sasl_callback_t *verifyfile_cb,
void **libraryptr)
{
#ifdef DO_DLOPEN
int r = 0;
int flag;
void *library;
lib_list_t *newhead;
r = ((sasl_verifyfile_t *)(verifyfile_cb->proc))
(verifyfile_cb->context, file, SASL_VRFY_PLUGIN);
if (r != SASL_OK) return r;
#ifdef RTLD_NOW
flag = RTLD_NOW;
#else
flag = 0;
#endif
newhead = sasl_ALLOC(sizeof(lib_list_t));
if(!newhead) return SASL_NOMEM;
if (!(library = dlopen(file, flag))) {
_sasl_log(NULL, SASL_LOG_ERR,
"unable to dlopen %s: %s", file, dlerror());
sasl_FREE(newhead);
return SASL_FAIL;
}
newhead->library = library;
newhead->next = lib_list_head;
lib_list_head = newhead;
*libraryptr = library;
return SASL_OK;
#else
return SASL_FAIL;
#endif /* DO_DLOPEN */
}
/* gets the list of mechanisms */
int _sasl_load_plugins(const add_plugin_list_t *entrypoints,
const sasl_callback_t *getpath_cb,
const sasl_callback_t *verifyfile_cb)
{
int result;
const add_plugin_list_t *cur_ep;
#ifdef DO_DLOPEN
char str[PATH_MAX], tmp[PATH_MAX+2], prefix[PATH_MAX+2];
/* 1 for '/' 1 for trailing '\0' */
char c;
int pos;
const char *path=NULL;
int position;
DIR *dp;
struct dirent *dir;
#endif
#ifndef PIC
add_plugin_t *add_plugin;
_sasl_plug_type type;
_sasl_plug_rec *p;
#endif
if (! entrypoints
|| ! getpath_cb
|| getpath_cb->id != SASL_CB_GETPATH
|| ! getpath_cb->proc
|| ! verifyfile_cb
|| verifyfile_cb->id != SASL_CB_VERIFYFILE
|| ! verifyfile_cb->proc)
return SASL_BADPARAM;
#ifndef PIC
/* do all the static plugins first */
for(cur_ep = entrypoints; cur_ep->entryname; cur_ep++) {
/* What type of plugin are we looking for? */
if(!strcmp(cur_ep->entryname, "sasl_server_plug_init")) {
type = SERVER;
add_plugin = (add_plugin_t *)sasl_server_add_plugin;
} else if (!strcmp(cur_ep->entryname, "sasl_client_plug_init")) {
type = CLIENT;
add_plugin = (add_plugin_t *)sasl_client_add_plugin;
} else if (!strcmp(cur_ep->entryname, "sasl_auxprop_plug_init")) {
type = AUXPROP;
add_plugin = (add_plugin_t *)sasl_auxprop_add_plugin;
} else if (!strcmp(cur_ep->entryname, "sasl_canonuser_init")) {
type = CANONUSER;
add_plugin = (add_plugin_t *)sasl_canonuser_add_plugin;
} else {
/* What are we looking for then? */
return SASL_FAIL;
}
for (p=_sasl_static_plugins; p->type; p++) {
if(type == p->type)
result = add_plugin(p->name, p->plug);
}
}
#endif /* !PIC */
/* only do the following if:
*
* we support dlopen()
* AND we are not staticly compiled
* OR we are staticly compiled and TRY_DLOPEN_WHEN_STATIC is defined
*/
#if defined(DO_DLOPEN) && (defined(PIC) || (!defined(PIC) && defined(TRY_DLOPEN_WHEN_STATIC)))
/* get the path to the plugins */
result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
&path);
if (result != SASL_OK) return result;
if (! path) return SASL_FAIL;
if (strlen(path) >= PATH_MAX) { /* no you can't buffer overrun */
return SASL_FAIL;
}
position=0;
do {
pos=0;
do {
c=path[position];
position++;
str[pos]=c;
pos++;
} while ((c!=':') && (c!='=') && (c!=0));
str[pos-1]='\0';
strcpy(prefix,str);
strcat(prefix,"/");
if ((dp=opendir(str)) !=NULL) /* ignore errors */
{
while ((dir=readdir(dp)) != NULL)
{
size_t length;
void *library;
char *c;
char plugname[PATH_MAX];
char name[PATH_MAX];
length = NAMLEN(dir);
if (length < 4)
continue; /* can not possibly be what we're looking for */
if (length + pos>=PATH_MAX) continue; /* too big */
if (strcmp(dir->d_name + (length - strlen(SO_SUFFIX)),
SO_SUFFIX)
&& strcmp(dir->d_name + (length - strlen(LA_SUFFIX)),
LA_SUFFIX))
continue;
memcpy(name,dir->d_name,length);
name[length]='\0';
result = _parse_la(prefix, name, tmp);
if(result != SASL_OK)
continue;
/* skip "lib" and cut off suffix --
this only need be approximate */
strcpy(plugname, name + 3);
c = strchr(plugname, (int)'.');
if(c) *c = '\0';
result = _sasl_get_plugin(tmp, verifyfile_cb, &library);
if(result != SASL_OK)
continue;
for(cur_ep = entrypoints; cur_ep->entryname; cur_ep++) {
_sasl_plugin_load(plugname, library, cur_ep->entryname,
cur_ep->add_plugin);
/* If this fails, it's not the end of the world */
}
}
closedir(dp);
} else {
_sasl_log(NULL, SASL_LOG_DEBUG,
"looking for plugins in '%s', failed to open directory, error: %s",
str,
strerror(errno));
}
} while ((c!='=') && (c!=0));
#endif /* defined(DO_DLOPEN) && (!defined(PIC) || (defined(PIC) && defined(TRY_DLOPEN_WHEN_STATIC))) */
return SASL_OK;
}
int
_sasl_done_with_plugins(void)
{
#ifdef DO_DLOPEN
lib_list_t *libptr, *libptr_next;
for(libptr = lib_list_head; libptr; libptr = libptr_next) {
libptr_next = libptr->next;
if(libptr->library)
dlclose(libptr->library);
sasl_FREE(libptr);
}
lib_list_head = NULL;
#endif /* DO_DLOPEN */
return SASL_OK;
}
-410
View File
@@ -1,410 +0,0 @@
/* SASL server API implementation
* Rob Siemborski
* Tim Martin
* $Id: external.c,v 1.24 2009/03/10 16:27:52 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
#include <string.h>
#include <sasl.h>
#include <saslplug.h>
#include "saslint.h"
#include "../plugins/plugin_common.h"
/***************************** Common Section *****************************/
static const char plugin_id[] = "$Id: external.c,v 1.24 2009/03/10 16:27:52 mel Exp $";
/***************************** Server Section *****************************/
static int
external_server_mech_new(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *challenge __attribute__((unused)),
unsigned challen __attribute__((unused)),
void **conn_context)
{
if (!conn_context
|| !sparams
|| !sparams->utils
|| !sparams->utils->conn)
return SASL_BADPARAM;
if (!sparams->utils->conn->external.auth_id)
return SASL_NOMECH;
*conn_context = NULL;
return SASL_OK;
}
static int
external_server_mech_step(void *conn_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams)
{
int result;
if (!sparams
|| !sparams->utils
|| !sparams->utils->conn
|| !sparams->utils->getcallback
|| !serverout
|| !serveroutlen
|| !oparams)
return SASL_BADPARAM;
if (!sparams->utils->conn->external.auth_id)
return SASL_BADPROT;
/* xxx arbitrary limit here */
if (clientinlen > 16384) return SASL_BADPROT;
if ((sparams->props.security_flags & SASL_SEC_NOANONYMOUS) &&
(!strcmp(sparams->utils->conn->external.auth_id, "anonymous"))) {
sasl_seterror(sparams->utils->conn,0,"anonymous login not allowed");
return SASL_NOAUTHZ;
}
*serverout = NULL;
*serveroutlen = 0;
if (!clientin) {
/* No initial data; we're in a protocol which doesn't support it.
* So we let the server app know that we need some... */
return SASL_CONTINUE;
}
if (clientinlen) { /* if we have a non-zero authorization id */
/* The user's trying to authorize as someone they didn't
* authenticate as */
result = sparams->canon_user(sparams->utils->conn,
clientin, 0,
SASL_CU_AUTHZID, oparams);
if(result != SASL_OK) return result;
result = sparams->canon_user(sparams->utils->conn,
sparams->utils->conn->external.auth_id, 0,
SASL_CU_AUTHID | SASL_CU_EXTERNALLY_VERIFIED, oparams);
} else {
result = sparams->canon_user(sparams->utils->conn,
sparams->utils->conn->external.auth_id, 0,
SASL_CU_AUTHID | SASL_CU_EXTERNALLY_VERIFIED | SASL_CU_AUTHZID, oparams);
}
if (result != SASL_OK) return result;
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
}
static int
external_server_mech_avail(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
void **conn_context __attribute__((unused)))
{
if (!sparams->utils->conn->external.auth_id) {
/* Return Temporary Failure */
return SASL_NOTDONE;
}
return SASL_OK;
}
static sasl_server_plug_t external_server_plugins[] =
{
{
"EXTERNAL", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOPLAINTEXT
| SASL_SEC_NOANONYMOUS
| SASL_SEC_NODICTIONARY, /* security_flags */
SASL_FEAT_WANT_CLIENT_FIRST
| SASL_FEAT_ALLOWS_PROXY, /* features */
NULL, /* glob_context */
&external_server_mech_new, /* mech_new */
&external_server_mech_step, /* mech_step */
NULL, /* mech_dispose */
NULL, /* mech_free */
NULL, /* setpass */
NULL, /* user_query */
NULL, /* idle */
&external_server_mech_avail, /* mech_avail */
NULL /* spare */
}
};
int external_server_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount)
{
if (!out_version || !pluglist || !plugcount)
return SASL_BADPARAM;
if (max_version != SASL_SERVER_PLUG_VERSION) {
SETERROR( utils, "EXTERNAL version mismatch" );
return SASL_BADVERS;
}
*out_version = SASL_SERVER_PLUG_VERSION;
*pluglist = external_server_plugins;
*plugcount = 1;
return SASL_OK;
}
/***************************** Client Section *****************************/
typedef struct client_context
{
char *out_buf;
size_t out_buf_len;
} client_context_t;
static int external_client_mech_new(void *glob_context __attribute__((unused)),
sasl_client_params_t *params,
void **conn_context)
{
client_context_t *text;
if (!params
|| !params->utils
|| !params->utils->conn
|| !conn_context)
return SASL_BADPARAM;
if (!params->utils->conn->external.auth_id)
return SASL_NOMECH;
text = sasl_ALLOC(sizeof(client_context_t));
if(!text) return SASL_NOMEM;
memset(text, 0, sizeof(client_context_t));
*conn_context = text;
return SASL_OK;
}
static int
external_client_mech_step(void *conn_context,
sasl_client_params_t *params,
const char *serverin __attribute__((unused)),
unsigned serverinlen,
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams)
{
client_context_t *text = (client_context_t *)conn_context;
const char *user = NULL;
int user_result = SASL_OK;
int result;
if (!params
|| !params->utils
|| !params->utils->conn
|| !params->utils->getcallback
|| !clientout
|| !clientoutlen
|| !oparams)
return SASL_BADPARAM;
if (!params->utils->conn->external.auth_id)
return SASL_BADPROT;
if (serverinlen != 0)
return SASL_BADPROT;
*clientout = NULL;
*clientoutlen = 0;
/* try to get the userid */
if (user == NULL) {
user_result = _plug_get_userid(params->utils, &user, prompt_need);
if ((user_result != SASL_OK) && (user_result != SASL_INTERACT))
return user_result;
}
/* free prompts we got */
if (prompt_need && *prompt_need) {
params->utils->free(*prompt_need);
*prompt_need = NULL;
}
/* if there are prompts not filled in */
if (user_result == SASL_INTERACT) {
/* make the prompt list */
int result =
_plug_make_prompts(params->utils, prompt_need,
user_result == SASL_INTERACT ?
"Please enter your authorization name" : NULL,
"",
NULL, NULL,
NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (result != SASL_OK) return result;
return SASL_INTERACT;
}
*clientoutlen = user ? (unsigned) strlen(user) : 0;
result = _buf_alloc(&text->out_buf, &text->out_buf_len, *clientoutlen + 1);
if (result != SASL_OK) return result;
if (user && *user) {
result = params->canon_user(params->utils->conn,
user, 0, SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) return result;
result = params->canon_user(params->utils->conn,
params->utils->conn->external.auth_id, 0,
SASL_CU_AUTHID, oparams);
if (result != SASL_OK) return result;
memcpy(text->out_buf, user, *clientoutlen);
} else {
result = params->canon_user(params->utils->conn,
params->utils->conn->external.auth_id, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) return result;
}
text->out_buf[*clientoutlen] = '\0';
*clientout = text->out_buf;
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
}
static void
external_client_mech_dispose(void *conn_context,
const sasl_utils_t *utils __attribute__((unused)))
{
client_context_t *text = (client_context_t *) conn_context;
if (!text) return;
if(text->out_buf) sasl_FREE(text->out_buf);
sasl_FREE(text);
}
static const unsigned long external_required_prompts[] = {
SASL_CB_LIST_END
};
static sasl_client_plug_t external_client_plugins[] =
{
{
"EXTERNAL", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOPLAINTEXT
| SASL_SEC_NOANONYMOUS
| SASL_SEC_NODICTIONARY, /* security_flags */
SASL_FEAT_WANT_CLIENT_FIRST
| SASL_FEAT_ALLOWS_PROXY, /* features */
external_required_prompts, /* required_prompts */
NULL, /* glob_context */
&external_client_mech_new, /* mech_new */
&external_client_mech_step, /* mech_step */
&external_client_mech_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* idle */
NULL, /* spare */
NULL /* spare */
}
};
int external_client_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount)
{
if (!utils || !out_version || !pluglist || !plugcount)
return SASL_BADPARAM;
if (max_version != SASL_CLIENT_PLUG_VERSION) {
SETERROR( utils, "EXTERNAL version mismatch" );
return SASL_BADVERS;
}
*out_version = SASL_CLIENT_PLUG_VERSION;
*pluglist = external_client_plugins;
*plugcount = 1;
return SASL_OK;
}
@@ -1,254 +0,0 @@
/*
* Mar 8, 2000 by Hajimu UMEMOTO <ume@mahoroba.org>
* $Id: getaddrinfo.c,v 1.8 2003/03/19 18:25:28 rjs3 Exp $
*
* This module is based on ssh-1.2.27-IPv6-1.5 written by
* KIKUCHI Takahiro <kick@kyoto.wide.ad.jp>
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* fake library for ssh
*
* This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
* These funtions are defined in rfc2133.
*
* But these functions are not implemented correctly. The minimum subset
* is implemented for ssh use only. For exapmle, this routine assumes
* that ai_family is AF_INET. Don't use it for another purpose.
*
* In the case not using 'configure --enable-ipv6', this getaddrinfo.c
* will be used if you have broken getaddrinfo or no getaddrinfo.
*/
#include "config.h"
#ifndef WIN32
#include <sys/param.h>
# ifndef macintosh
# include <arpa/inet.h>
# endif /* macintosh */
#endif /* WIN32 */
#include <ctype.h>
#ifdef WIN32
/* : Windows socket library is missing inet_aton, emulate it with
: inet_addr. inet_aton return 0 if the address is uncorrect, a non zero
: value otherwise */
int
inet_aton (const char *cp, struct in_addr *inp)
{
if (cp == NULL || inp == NULL) {
return (0);
}
/* : handle special case */
if (strcmp (cp, "255.255.255.255") == 0) {
inp->s_addr = (unsigned int) 0xFFFFFFFF;
return (1);
}
inp->s_addr = inet_addr (cp);
return (1);
}
#endif /* WIN32 */
static struct addrinfo *
malloc_ai(int port, unsigned long addr, int socktype, int proto)
{
struct addrinfo *ai;
ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) +
sizeof(struct sockaddr_in));
if (ai) {
memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
ai->ai_addr = (struct sockaddr *)(ai + 1);
/* XXX -- ssh doesn't use sa_len */
ai->ai_addrlen = sizeof(struct sockaddr_in);
#ifdef HAVE_SOCKADDR_SA_LEN
ai->ai_addr->sa_len = sizeof(struct sockaddr_in);
#endif
ai->ai_addr->sa_family = ai->ai_family = AF_INET;
((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
ai->ai_socktype = socktype;
ai->ai_protocol = proto;
return ai;
} else {
return NULL;
}
}
char *
gai_strerror(int ecode)
{
switch (ecode) {
case EAI_NODATA:
return "no address associated with hostname.";
case EAI_MEMORY:
return "memory allocation failure.";
case EAI_FAMILY:
return "ai_family not supported.";
case EAI_SERVICE:
return "servname not supported for ai_socktype.";
default:
return "unknown error.";
}
}
void
freeaddrinfo(struct addrinfo *ai)
{
struct addrinfo *next;
if (ai->ai_canonname)
free(ai->ai_canonname);
do {
next = ai->ai_next;
free(ai);
} while ((ai = next) != NULL);
}
int
getaddrinfo(const char *hostname, const char *servname,
const struct addrinfo *hints, struct addrinfo **res)
{
struct addrinfo *cur, *prev = NULL;
struct hostent *hp;
struct in_addr in;
int i, port = 0, socktype, proto;
if (hints && hints->ai_family != PF_INET && hints->ai_family != PF_UNSPEC)
return EAI_FAMILY;
socktype = (hints && hints->ai_socktype) ? hints->ai_socktype
: SOCK_STREAM;
if (hints && hints->ai_protocol)
proto = hints->ai_protocol;
else {
switch (socktype) {
case SOCK_DGRAM:
proto = IPPROTO_UDP;
break;
case SOCK_STREAM:
proto = IPPROTO_TCP;
break;
default:
proto = 0;
break;
}
}
if (servname) {
if (isdigit((int)*servname))
port = htons((short) atoi(servname));
else {
struct servent *se;
char *pe_proto;
switch (socktype) {
case SOCK_DGRAM:
pe_proto = "udp";
break;
case SOCK_STREAM:
pe_proto = "tcp";
break;
default:
pe_proto = NULL;
break;
}
/* xxx thread safety ? */
if ((se = getservbyname(servname, pe_proto)) == NULL)
return EAI_SERVICE;
port = se->s_port;
}
}
if (!hostname) {
if (hints && hints->ai_flags & AI_PASSIVE)
*res = malloc_ai(port, htonl(0x00000000), socktype, proto);
else
*res = malloc_ai(port, htonl(0x7f000001), socktype, proto);
if (*res)
return 0;
else
return EAI_MEMORY;
}
#if HAVE_INET_ATON
if (inet_aton(hostname, &in))
#else
if ((in.s_addr = inet_addr(hostname)) != -1)
#endif
{
*res = malloc_ai(port, in.s_addr, socktype, proto);
if (*res)
return 0;
else
return EAI_MEMORY;
}
if (hints && hints->ai_flags & AI_NUMERICHOST)
return EAI_NODATA;
#ifndef macintosh
/* xxx thread safety? / gethostbyname_r */
if ((hp = gethostbyname(hostname)) &&
hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
for (i = 0; hp->h_addr_list[i]; i++) {
if ((cur = malloc_ai(port,
((struct in_addr *)hp->h_addr_list[i])->s_addr,
socktype, proto)) == NULL) {
if (*res)
freeaddrinfo(*res);
return EAI_MEMORY;
}
if (prev)
prev->ai_next = cur;
else
*res = cur;
prev = cur;
}
if (hints && hints->ai_flags & AI_CANONNAME && *res) {
/* NOT sasl_strdup for compatibility */
if (((*res)->ai_canonname = strdup(hp->h_name)) == NULL) {
freeaddrinfo(*res);
return EAI_MEMORY;
}
}
return 0;
}
#endif
return EAI_NODATA;
}
@@ -1,108 +0,0 @@
/*
* Mar 8, 2000 by Hajimu UMEMOTO <ume@mahoroba.org>
* $Id: getnameinfo.c,v 1.5 2003/02/13 19:55:54 rjs3 Exp $
*
* This module is besed on ssh-1.2.27-IPv6-1.5 written by
* KIKUCHI Takahiro <kick@kyoto.wide.ad.jp>
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* fake library for ssh
*
* This file includes getnameinfo().
* These funtions are defined in rfc2133.
*
* But these functions are not implemented correctly. The minimum subset
* is implemented for ssh use only. For exapmle, this routine assumes
* that ai_family is AF_INET. Don't use it for another purpose.
*
* In the case not using 'configure --enable-ipv6', this getnameinfo.c
* will be used if you have broken getnameinfo or no getnameinfo.
*/
#include "config.h"
#ifndef WIN32
# include <arpa/inet.h>
#endif /* WIN32 */
#include <stdio.h>
#include <string.h>
int
getnameinfo(const struct sockaddr *sa, socklen_t salen __attribute__((unused)),
char *host, size_t hostlen, char *serv, size_t servlen, int flags)
{
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
struct hostent *hp;
char tmpserv[16];
if (serv) {
sprintf(tmpserv, "%d", ntohs(sin->sin_port));
if (strlen(tmpserv) > servlen)
return EAI_MEMORY;
else
strcpy(serv, tmpserv);
}
if (host) {
if (flags & NI_NUMERICHOST) {
if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
return EAI_MEMORY;
else {
strcpy(host, inet_ntoa(sin->sin_addr));
return 0;
}
} else {
hp = gethostbyaddr((char *)&sin->sin_addr,
sizeof(struct in_addr), AF_INET);
if (hp) {
if (strlen(hp->h_name) >= hostlen)
return EAI_MEMORY;
else {
strcpy(host, hp->h_name);
return 0;
}
}
else
return EAI_NODATA;
}
}
return 0;
}
-114
View File
@@ -1,114 +0,0 @@
/* $NetBSD: getsubopt.c,v 1.4 1998/02/03 18:44:15 perry Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if ((!defined(WIN32))&&(!defined(macintosh)))
#include <sys/cdefs.h>
#endif /* WIN32 */
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)getsubopt.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: getsubopt.c,v 1.4 1998/02/03 18:44:15 perry Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#if (defined(WIN32)||(defined(macintosh)))
#include "sasl.h"
LIBSASL_API int getsubopt(char **optionp, char * const *tokens, char **valuep);
#endif /* WIN32 */
/*
* The SVID interface to getsubopt provides no way of figuring out which
* part of the suboptions list wasn't matched. This makes error messages
* tricky... The extern variable suboptarg is a pointer to the token
* which didn't match.
*/
char *suboptarg;
int
getsubopt(optionp, tokens, valuep)
char **optionp, **valuep;
char * const *tokens;
{
int cnt;
char *p;
suboptarg = *valuep = NULL;
if (!optionp || !*optionp)
return(-1);
/* skip leading white-space, commas */
for (p = *optionp; *p && (*p == ',' || *p == ' ' || *p == '\t'); ++p);
if (!*p) {
*optionp = p;
return(-1);
}
/* save the start of the token, and skip the rest of the token. */
for (suboptarg = p;
*++p && *p != ',' && *p != '=' && *p != ' ' && *p != '\t';);
if (*p) {
/*
* If there's an equals sign, set the value pointer, and
* skip over the value part of the token. Terminate the
* token.
*/
if (*p == '=') {
*p = '\0';
for (*valuep = ++p;
*p && *p != ',' && *p != ' ' && *p != '\t'; ++p);
if (*p)
*p++ = '\0';
} else
*p++ = '\0';
/* Skip any whitespace or commas after this token. */
for (; *p && (*p == ',' || *p == ' ' || *p == '\t'); ++p);
}
/* set optionp for next round. */
*optionp = p;
for (cnt = 0; *tokens; ++tokens, ++cnt)
if (!strcmp(suboptarg, *tokens))
return(cnt);
return(-1);
}
-527
View File
@@ -1,527 +0,0 @@
/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
*/
/* Function names changed to avoid namespace collisions: Rob Siemborski */
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#include <config.h>
#include "md5global.h"
#include "md5.h"
#include "hmac-md5.h"
#ifndef WIN32
# include <arpa/inet.h>
#endif
/* Constants for MD5Transform routine.
*/
#define S11 7
#define S12 12
#define S13 17
#define S14 22
#define S21 5
#define S22 9
#define S23 14
#define S24 20
#define S31 4
#define S32 11
#define S33 16
#define S34 23
#define S41 6
#define S42 10
#define S43 15
#define S44 21
static void MD5Transform PROTO_LIST ((UINT4 [4], const unsigned char [64]));
static void Encode PROTO_LIST
((unsigned char *, UINT4 *, unsigned int));
static void Decode PROTO_LIST
((UINT4 *, const unsigned char *, unsigned int));
static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/* F, G, H and I are basic MD5 functions.
*/
#ifdef I
/* This might be defined via NANA */
#undef I
#endif
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
/* ROTATE_LEFT rotates x left n bits.
*/
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
Rotation is separate from addition to prevent recomputation.
*/
#define FF(a, b, c, d, x, s, ac) { (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
#define GG(a, b, c, d, x, s, ac) { (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
#define HH(a, b, c, d, x, s, ac) { (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
#define II(a, b, c, d, x, s, ac) { (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); (a) = ROTATE_LEFT ((a), (s)); (a) += (b); }
/* MD5 initialization. Begins an MD5 operation, writing a new context.
*/
void _sasl_MD5Init (context)
MD5_CTX *context; /* context */
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants. */
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
/* MD5 block update operation. Continues an MD5 message-digest
operation, processing another message block, and updating the context.
*/
void _sasl_MD5Update (context, input, inputLen)
MD5_CTX *context; /* context */
const unsigned char *input; /* input block */
unsigned int inputLen; /* length of input block */
{
unsigned int i, index, partLen;
/* Compute number of bytes mod 64 */
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((UINT4)inputLen << 3))
< ((UINT4)inputLen << 3))
context->count[1]++;
context->count[1] += ((UINT4)inputLen >> 29);
partLen = 64 - index;
/* Transform as many times as possible.
*/
if (inputLen >= partLen) {
MD5_memcpy
((POINTER)&context->buffer[index], (POINTER)input, partLen); MD5Transform
(context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
index = 0;
}
else
i = 0;
/* Buffer remaining input */
MD5_memcpy
((POINTER)&context->buffer[index], (POINTER)&input[i],
inputLen-i);
}
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
void _sasl_MD5Final (digest, context)
unsigned char digest[16]; /* message digest */
MD5_CTX *context; /* context */
{
unsigned char bits[8];
unsigned int index, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64. */
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (index < 56) ? (56 - index) : (120 - index);
_sasl_MD5Update (context, PADDING, padLen);
/* Append length (before padding) */
_sasl_MD5Update (context, bits, 8);
/* Store state in digest */
Encode (digest, context->state, 16);
/* Zeroize sensitive information. */
MD5_memset ((POINTER)context, 0, sizeof (*context));
}
/* MD5 basic transformation. Transforms state based on block. */
static void MD5Transform (state, block)
UINT4 state[4];
const unsigned char block[64];
{
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode (x, block, 64);
/* Round 1 */
FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
/* Round 2 */
GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
/* Round 3 */
HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
/* Round 4 */
II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
/* Zeroize sensitive information.
*/
MD5_memset ((POINTER)x, 0, sizeof (x));
}
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static void Encode (output, input, len)
unsigned char *output;
UINT4 *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4) {
output[j] = (unsigned char)(input[i] & 0xff);
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
}
}
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
a multiple of 4.
*/
static void Decode (output, input, len)
UINT4 *output;
const unsigned char *input;
unsigned int len;
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | (((UINT4)input[j+2]) << 16)
| (((UINT4)input[j+3]) << 24);
}
/* Note: Replace "for loop" with standard memcpy if possible.
*/
static void MD5_memcpy (output, input, len)
POINTER output;
POINTER input;
unsigned int len;
{
unsigned int i;
for (i = 0; i < len; i++)
output[i] = input[i];
}
/* Note: Replace "for loop" with standard memset if possible.
*/
static void MD5_memset (output, value, len)
POINTER output;
int value;
unsigned int len;
{
unsigned int i;
for (i = 0; i < len; i++)
((char *)output)[i] = (char)value;
}
void _sasl_hmac_md5_init(HMAC_MD5_CTX *hmac,
const unsigned char *key,
int key_len)
{
unsigned char k_ipad[65]; /* inner padding -
* key XORd with ipad
*/
unsigned char k_opad[65]; /* outer padding -
* key XORd with opad
*/
unsigned char tk[16];
int i;
/* if key is longer than 64 bytes reset it to key=MD5(key) */
if (key_len > 64) {
MD5_CTX tctx;
_sasl_MD5Init(&tctx);
_sasl_MD5Update(&tctx, key, key_len);
_sasl_MD5Final(tk, &tctx);
key = tk;
key_len = 16;
}
/*
* the HMAC_MD5 transform looks like:
*
* MD5(K XOR opad, MD5(K XOR ipad, text))
*
* where K is an n byte key
* ipad is the byte 0x36 repeated 64 times
* opad is the byte 0x5c repeated 64 times
* and text is the data being protected
*/
/* start out by storing key in pads */
MD5_memset((POINTER)k_ipad, '\0', sizeof k_ipad);
MD5_memset((POINTER)k_opad, '\0', sizeof k_opad);
MD5_memcpy( k_ipad, (POINTER)key, key_len);
MD5_memcpy( k_opad, (POINTER)key, key_len);
/* XOR key with ipad and opad values */
for (i=0; i<64; i++) {
k_ipad[i] ^= 0x36;
k_opad[i] ^= 0x5c;
}
_sasl_MD5Init(&hmac->ictx); /* init inner context */
_sasl_MD5Update(&hmac->ictx, k_ipad, 64); /* apply inner pad */
_sasl_MD5Init(&hmac->octx); /* init outer context */
_sasl_MD5Update(&hmac->octx, k_opad, 64); /* apply outer pad */
/* scrub the pads and key context (if used) */
MD5_memset((POINTER)&k_ipad, 0, sizeof(k_ipad));
MD5_memset((POINTER)&k_opad, 0, sizeof(k_opad));
MD5_memset((POINTER)&tk, 0, sizeof(tk));
/* and we're done. */
}
/* The precalc and import routines here rely on the fact that we pad
* the key out to 64 bytes and use that to initialize the md5
* contexts, and that updating an md5 context with 64 bytes of data
* leaves nothing left over; all of the interesting state is contained
* in the state field, and none of it is left over in the count and
* buffer fields. So all we have to do is save the state field; we
* can zero the others when we reload it. Which is why the decision
* was made to pad the key out to 64 bytes in the first place. */
void _sasl_hmac_md5_precalc(HMAC_MD5_STATE *state,
const unsigned char *key,
int key_len)
{
HMAC_MD5_CTX hmac;
unsigned lupe;
_sasl_hmac_md5_init(&hmac, key, key_len);
for (lupe = 0; lupe < 4; lupe++) {
state->istate[lupe] = htonl(hmac.ictx.state[lupe]);
state->ostate[lupe] = htonl(hmac.octx.state[lupe]);
}
MD5_memset((POINTER)&hmac, 0, sizeof(hmac));
}
void _sasl_hmac_md5_import(HMAC_MD5_CTX *hmac,
HMAC_MD5_STATE *state)
{
unsigned lupe;
MD5_memset((POINTER)hmac, 0, sizeof(HMAC_MD5_CTX));
for (lupe = 0; lupe < 4; lupe++) {
hmac->ictx.state[lupe] = ntohl(state->istate[lupe]);
hmac->octx.state[lupe] = ntohl(state->ostate[lupe]);
}
/* Init the counts to account for our having applied
* 64 bytes of key; this works out to 0x200 (64 << 3; see
* MD5Update above...) */
hmac->ictx.count[0] = hmac->octx.count[0] = 0x200;
}
void _sasl_hmac_md5_final(unsigned char digest[HMAC_MD5_SIZE],
HMAC_MD5_CTX *hmac)
{
_sasl_MD5Final(digest, &hmac->ictx); /* Finalize inner md5 */
_sasl_MD5Update(&hmac->octx, digest, 16); /* Update outer ctx */
_sasl_MD5Final(digest, &hmac->octx); /* Finalize outer md5 */
}
void _sasl_hmac_md5(text, text_len, key, key_len, digest)
const unsigned char* text; /* pointer to data stream */
int text_len; /* length of data stream */
const unsigned char* key; /* pointer to authentication key */
int key_len; /* length of authentication key */
unsigned char *digest; /* caller digest to be filled in */
{
MD5_CTX context;
unsigned char k_ipad[65]; /* inner padding -
* key XORd with ipad
*/
unsigned char k_opad[65]; /* outer padding -
* key XORd with opad
*/
unsigned char tk[16];
int i;
/* if key is longer than 64 bytes reset it to key=MD5(key) */
if (key_len > 64) {
MD5_CTX tctx;
_sasl_MD5Init(&tctx);
_sasl_MD5Update(&tctx, key, key_len);
_sasl_MD5Final(tk, &tctx);
key = tk;
key_len = 16;
}
/*
* the HMAC_MD5 transform looks like:
*
* MD5(K XOR opad, MD5(K XOR ipad, text))
*
* where K is an n byte key
* ipad is the byte 0x36 repeated 64 times
* opad is the byte 0x5c repeated 64 times
* and text is the data being protected
*/
/* start out by storing key in pads */
MD5_memset(k_ipad, '\0', sizeof k_ipad);
MD5_memset(k_opad, '\0', sizeof k_opad);
MD5_memcpy( k_ipad, (POINTER)key, key_len);
MD5_memcpy( k_opad, (POINTER)key, key_len);
/* XOR key with ipad and opad values */
for (i=0; i<64; i++) {
k_ipad[i] ^= 0x36;
k_opad[i] ^= 0x5c;
}
/*
* perform inner MD5
*/
_sasl_MD5Init(&context); /* init context for 1st
* pass */
_sasl_MD5Update(&context, k_ipad, 64); /* start with inner pad */
_sasl_MD5Update(&context, text, text_len); /* then text of datagram */
_sasl_MD5Final(digest, &context); /* finish up 1st pass */
/*
* perform outer MD5
*/
_sasl_MD5Init(&context); /* init context for 2nd
* pass */
_sasl_MD5Update(&context, k_opad, 64); /* start with outer pad */
_sasl_MD5Update(&context, digest, 16); /* then results of 1st
* hash */
_sasl_MD5Final(digest, &context); /* finish up 2nd pass */
}
-528
View File
@@ -1,528 +0,0 @@
/* saslint.h - internal SASL library definitions
* Rob Siemborski
* Tim Martin
* $Id: saslint.h,v 1.73 2011/09/01 14:12:53 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef SASLINT_H
#define SASLINT_H
#include <config.h>
#include "sasl.h"
#include "saslplug.h"
#include "saslutil.h"
#include "prop.h"
#ifndef INLINE
#if defined (WIN32)
/* Visual Studio: "inline" keyword is not available in C, only in C++ */
#define INLINE __inline
#else
#define INLINE inline
#endif
#endif
/* #define'd constants */
#define CANON_BUF_SIZE 1024
/* Error Handling Foo */
/* Helpful Hints:
* -Error strings are set as soon as possible (first function in stack trace
* with a pointer to the sasl_conn_t.
* -Error codes are set as late as possible (only in the sasl api functions),
* though "as often as possible" also comes to mind to ensure correctness
* -Errors from calls to _buf_alloc, _sasl_strdup, etc are assumed to be
* memory errors.
* -Only errors (error codes < SASL_OK) should be remembered
*/
#define RETURN(conn, val) { if(conn && (val) < SASL_OK) \
(conn)->error_code = (val); \
return (val); }
#define MEMERROR(conn) {\
if(conn) sasl_seterror( (conn), 0, \
"Out of Memory in " __FILE__ " near line %d", __LINE__ ); \
RETURN(conn, SASL_NOMEM) }
#define PARAMERROR(conn) {\
if(conn) sasl_seterror( (conn), SASL_NOLOG, \
"Parameter error in " __FILE__ " near line %d", __LINE__ ); \
RETURN(conn, SASL_BADPARAM) }
#define INTERROR(conn, val) {\
if(conn) sasl_seterror( (conn), 0, \
"Internal Error %d in " __FILE__ " near line %d", (val),\
__LINE__ ); \
RETURN(conn, (val)) }
#ifndef PATH_MAX
# ifdef WIN32
# define PATH_MAX MAX_PATH
# else
# ifdef _POSIX_PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX
# else
# define PATH_MAX 1024 /* arbitrary; probably big enough.
* will probably only be 256+64 on
* pre-posix machines */
# endif /* _POSIX_PATH_MAX */
# endif /* WIN32 */
#endif
/* : Define directory delimiter in SASL_PATH/SASL_CONF_PATH variables */
#ifdef WIN32
#define PATHS_DELIMITER ';'
#else
#define PATHS_DELIMITER ':'
#endif
/* Datatype Definitions */
typedef struct {
const sasl_callback_t *callbacks;
const char *appname;
} sasl_global_callbacks_t;
typedef struct _sasl_external_properties
{
sasl_ssf_t ssf;
char *auth_id;
} _sasl_external_properties_t;
typedef struct sasl_string_list
{
const char *d;
struct sasl_string_list *next;
} sasl_string_list_t;
typedef struct buffer_info
{
char *data;
size_t curlen;
size_t reallen;
} buffer_info_t;
typedef int add_plugin_t(const char *, void *);
typedef struct add_plugin_list
{
const char *entryname;
add_plugin_t *add_plugin;
} add_plugin_list_t;
enum Sasl_conn_type { SASL_CONN_UNKNOWN = 0,
SASL_CONN_SERVER = 1,
SASL_CONN_CLIENT = 2 };
struct sasl_conn {
enum Sasl_conn_type type;
void (*destroy_conn)(sasl_conn_t *); /* destroy function */
char *service;
unsigned int flags; /* flags passed to sasl_*_new */
/* IP information. A buffer of size 52 is adequate for this in its
longest format (see sasl.h) */
int got_ip_local, got_ip_remote;
char iplocalport[NI_MAXHOST + NI_MAXSERV];
char ipremoteport[NI_MAXHOST + NI_MAXSERV];
void *context;
sasl_out_params_t oparams;
sasl_security_properties_t props;
_sasl_external_properties_t external;
sasl_secret_t *secret;
int (*idle_hook)(sasl_conn_t *conn);
const sasl_callback_t *callbacks;
const sasl_global_callbacks_t *global_callbacks; /* global callbacks
* connection */
char *serverFQDN;
/* Pointers to memory that we are responsible for */
buffer_info_t *encode_buf;
int error_code;
char *error_buf, *errdetail_buf;
size_t error_buf_len, errdetail_buf_len;
char *mechlist_buf;
size_t mechlist_buf_len;
char *decode_buf;
char user_buf[CANON_BUF_SIZE+1], authid_buf[CANON_BUF_SIZE+1];
/* Allocated by sasl_encodev if the output contains multiple SASL packet. */
buffer_info_t multipacket_encoded_data;
};
/* Server Conn Type Information */
typedef struct mechanism
{
server_sasl_mechanism_t m;
struct mechanism *next;
} mechanism_t;
typedef struct mech_list {
const sasl_utils_t *utils; /* gotten from plug_init */
void *mutex; /* mutex for this data */
mechanism_t *mech_list; /* list of loaded mechanisms */
int mech_length; /* number of loaded mechanisms */
} mech_list_t;
typedef struct context_list
{
mechanism_t *mech;
void *context; /* if NULL, this mech is disabled for this connection
* otherwise, use this context instead of a call
* to mech_new */
struct context_list *next;
} context_list_t;
typedef struct sasl_server_conn {
sasl_conn_t base; /* parts common to server + client */
char *appname; /* application name buffer (for sparams) */
char *user_realm; /* domain the user authenticating is in */
int sent_last; /* Have we already done the last send? */
int authenticated;
mechanism_t *mech; /* mechanism trying to use */
sasl_server_params_t *sparams;
context_list_t *mech_contexts;
mechanism_t *mech_list; /* list of available mechanisms */
int mech_length; /* number of available mechanisms */
} sasl_server_conn_t;
/* Client Conn Type Information */
typedef struct cmechanism
{
client_sasl_mechanism_t m;
struct cmechanism *next;
} cmechanism_t;
typedef struct cmech_list {
const sasl_utils_t *utils;
void *mutex; /* mutex for this data */
cmechanism_t *mech_list; /* list of mechanisms */
int mech_length; /* number of mechanisms */
} cmech_list_t;
typedef struct sasl_client_conn {
sasl_conn_t base; /* parts common to server + client */
cmechanism_t *mech;
sasl_client_params_t *cparams;
char *clientFQDN;
cmechanism_t *mech_list; /* list of available mechanisms */
int mech_length; /* number of available mechanisms */
} sasl_client_conn_t;
typedef struct sasl_allocation_utils {
sasl_malloc_t *malloc;
sasl_calloc_t *calloc;
sasl_realloc_t *realloc;
sasl_free_t *free;
} sasl_allocation_utils_t;
typedef struct sasl_mutex_utils {
sasl_mutex_alloc_t *alloc;
sasl_mutex_lock_t *lock;
sasl_mutex_unlock_t *unlock;
sasl_mutex_free_t *free;
} sasl_mutex_utils_t;
typedef struct sasl_log_utils_s {
sasl_log_t *log;
} sasl_log_utils_t;
typedef int sasl_plaintext_verifier(sasl_conn_t *conn,
const char *userid,
const char *passwd,
const char *service,
const char *user_realm);
struct sasl_verify_password_s {
char *name;
sasl_plaintext_verifier *verify;
};
/*
* globals & constants
*/
/*
* common.c
*/
LIBSASL_API const sasl_utils_t *sasl_global_utils;
extern int (*_sasl_client_idle_hook)(sasl_conn_t *conn);
extern int (*_sasl_server_idle_hook)(sasl_conn_t *conn);
/* These return SASL_OK if we've actually finished cleanup,
* SASL_NOTINIT if that part of the library isn't initialized, and
* SASL_CONTINUE if we need to call them again */
extern int (*_sasl_client_cleanup_hook)(void);
extern int (*_sasl_server_cleanup_hook)(void);
extern sasl_allocation_utils_t _sasl_allocation_utils;
extern sasl_mutex_utils_t _sasl_mutex_utils;
extern int _sasl_allocation_locked;
void sasl_common_done(void);
extern int _sasl_is_equal_mech(const char *req_mech,
const char *plug_mech,
size_t req_mech_len,
int *plus);
/*
* checkpw.c
*/
extern struct sasl_verify_password_s _sasl_verify_password[];
/*
* server.c
*/
/* (this is a function call to ensure this is read-only to the outside) */
extern int _is_sasl_server_active(void);
/*
* Allocation and Mutex utility macros
*/
#define sasl_ALLOC(__size__) (_sasl_allocation_utils.malloc((__size__)))
#define sasl_CALLOC(__nelem__, __size__) \
(_sasl_allocation_utils.calloc((__nelem__), (__size__)))
#define sasl_REALLOC(__ptr__, __size__) \
(_sasl_allocation_utils.realloc((__ptr__), (__size__)))
#define sasl_FREE(__ptr__) (_sasl_allocation_utils.free((__ptr__)))
#define sasl_MUTEX_ALLOC() (_sasl_mutex_utils.alloc())
#define sasl_MUTEX_LOCK(__mutex__) (_sasl_mutex_utils.lock((__mutex__)))
#define sasl_MUTEX_UNLOCK(__mutex__) (_sasl_mutex_utils.unlock((__mutex__)))
#define sasl_MUTEX_FREE(__mutex__) \
(_sasl_mutex_utils.free((__mutex__)))
/* function prototypes */
/*
* dlopen.c and staticopen.c
*/
/*
* The differences here are:
* _sasl_load_plugins loads all plugins from all files
* _sasl_get_plugin loads the LIBRARY for an individual file
* _sasl_done_with_plugins frees the LIBRARIES loaded by the above 2
* _sasl_locate_entry locates an entrypoint in a given library
*/
extern int _sasl_load_plugins(const add_plugin_list_t *entrypoints,
const sasl_callback_t *getpath_callback,
const sasl_callback_t *verifyfile_callback);
extern int _sasl_get_plugin(const char *file,
const sasl_callback_t *verifyfile_cb,
void **libraryptr);
extern int _sasl_locate_entry(void *library, const char *entryname,
void **entry_point);
extern int _sasl_done_with_plugins();
/*
* common.c
*/
extern const sasl_callback_t *
_sasl_find_getpath_callback(const sasl_callback_t *callbacks);
extern const sasl_callback_t *
_sasl_find_getconfpath_callback(const sasl_callback_t *callbacks);
extern const sasl_callback_t *
_sasl_find_verifyfile_callback(const sasl_callback_t *callbacks);
extern int _sasl_common_init(sasl_global_callbacks_t *global_callbacks);
extern int _sasl_conn_init(sasl_conn_t *conn,
const char *service,
unsigned int flags,
enum Sasl_conn_type type,
int (*idle_hook)(sasl_conn_t *conn),
const char *serverFQDN,
const char *iplocalport,
const char *ipremoteport,
const sasl_callback_t *callbacks,
const sasl_global_callbacks_t *global_callbacks);
extern void _sasl_conn_dispose(sasl_conn_t *conn);
extern sasl_utils_t *
_sasl_alloc_utils(sasl_conn_t *conn,
sasl_global_callbacks_t *global_callbacks);
extern int _sasl_free_utils(const sasl_utils_t ** utils);
extern int
_sasl_getcallback(sasl_conn_t * conn,
unsigned long callbackid,
sasl_callback_ft * pproc,
void **pcontext);
extern void
_sasl_log(sasl_conn_t *conn,
int level,
const char *fmt,
...);
void _sasl_get_errorbuf(sasl_conn_t *conn, char ***bufhdl, size_t **lenhdl);
int _sasl_add_string(char **out, size_t *alloclen,
size_t *outlen, const char *add);
/* More Generic Utilities in common.c */
extern int _sasl_strdup(const char *in, char **out, size_t *outlen);
/* Basically a conditional call to realloc(), if we need more */
int _buf_alloc(char **rwbuf, size_t *curlen, size_t newlen);
/* convert an iovec to a single buffer */
int _iovec_to_buf(const struct iovec *vec,
unsigned numiov, buffer_info_t **output);
/* Convert between string formats and sockaddr formats */
int _sasl_iptostring(const struct sockaddr *addr, socklen_t addrlen,
char *out, unsigned outlen);
int _sasl_ipfromstring(const char *addr, struct sockaddr *out,
socklen_t outlen);
/*
* external plugin (external.c)
*/
int external_client_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount);
int external_server_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount);
/* Mech Listing Functions */
int _sasl_build_mechlist(void);
int _sasl_server_listmech(sasl_conn_t *conn,
const char *user,
const char *prefix,
const char *sep,
const char *suffix,
const char **result,
unsigned *plen,
int *pcount);
int _sasl_client_listmech(sasl_conn_t *conn,
const char *prefix,
const char *sep,
const char *suffix,
const char **result,
unsigned *plen,
int *pcount);
/* Just create a straight list of them */
sasl_string_list_t *_sasl_client_mechs(void);
sasl_string_list_t *_sasl_server_mechs(void);
/*
* config file declarations (config.c)
*/
extern const char *sasl_config_getstring(const char *key,const char *def);
/* checkpw.c */
#ifdef DO_SASL_CHECKAPOP
extern int _sasl_auxprop_verify_apop(sasl_conn_t *conn,
const char *userstr,
const char *challenge,
const char *response,
const char *user_realm);
#endif /* DO_SASL_CHECKAPOP */
/* Auxprop Plugin (sasldb.c) */
extern int sasldb_auxprop_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_auxprop_plug_t **plug,
const char *plugname);
/*
* auxprop.c
*/
extern int _sasl_auxprop_add_plugin(void *p, void *library);
extern void _sasl_auxprop_free(void);
extern int _sasl_auxprop_lookup(sasl_server_params_t *sparams,
unsigned flags,
const char *user, unsigned ulen);
/*
* canonusr.c
*/
void _sasl_canonuser_free();
extern int internal_canonuser_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_canonuser_plug_t **plug,
const char *plugname);
extern int _sasl_canon_user(sasl_conn_t *conn,
const char *user,
unsigned ulen,
unsigned flags,
sasl_out_params_t *oparams);
int _sasl_canon_user_lookup (sasl_conn_t *conn,
const char *user,
unsigned ulen,
unsigned flags,
sasl_out_params_t *oparams);
/*
* saslutil.c
*/
int get_fqhostname(
char *name,
int namelen,
int abort_if_no_fqdn
);
#endif /* SASLINT_H */
-812
View File
@@ -1,812 +0,0 @@
/* saslutil.c
* Rob Siemborski
* Tim Martin
* $Id: saslutil.c,v 1.52 2011/09/22 14:43:01 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#if defined(WIN32)
#define _CRT_RAND_S
#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include "saslint.h"
#include <saslutil.h>
/* Contains:
*
* sasl_decode64
* sasl_encode64
* sasl_mkchal
* sasl_utf8verify
* sasl_randcreate
* sasl_randfree
* sasl_randseed
* sasl_rand
* sasl_churn
* sasl_erasebuffer
*/
#ifdef sun
/* gotta define gethostname ourselves on suns */
extern int gethostname(char *, int);
#endif
char *encode_table;
char *decode_table;
#define RPOOL_SIZE 3
struct sasl_rand_s {
unsigned short pool[RPOOL_SIZE];
/* since the init time might be really bad let's make this lazy */
int initialized;
};
#define CHAR64(c) (((c) < 0 || (c) > 127) ? -1 : index_64[(c)])
static char basis_64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????";
static char index_64[128] = {
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
-1, 0, 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,-1, -1,-1,-1,-1,
-1,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,-1, -1,-1,-1,-1
};
/* base64 encode
* in -- input data
* inlen -- input data length
* out -- output buffer (will be NUL terminated)
* outmax -- max size of output buffer
* result:
* outlen -- gets actual length of output buffer (optional)
*
* Returns SASL_OK on success, SASL_BUFOVER if result won't fit
*/
int sasl_encode64(const char *_in,
unsigned inlen,
char *_out,
unsigned outmax,
unsigned *outlen)
{
const unsigned char *in = (const unsigned char *)_in;
unsigned char *out = (unsigned char *)_out;
unsigned char oval;
char *blah;
unsigned olen;
/* check params */
if ((inlen > 0) && (in == NULL)) return SASL_BADPARAM;
/* Will it fit? */
olen = (inlen + 2) / 3 * 4;
if (outlen) {
*outlen = olen;
}
if (outmax <= olen) {
return SASL_BUFOVER;
}
/* Do the work... */
blah = (char *) out;
while (inlen >= 3) {
/* user provided max buffer size; make sure we don't go over it */
*out++ = basis_64[in[0] >> 2];
*out++ = basis_64[((in[0] << 4) & 0x30) | (in[1] >> 4)];
*out++ = basis_64[((in[1] << 2) & 0x3c) | (in[2] >> 6)];
*out++ = basis_64[in[2] & 0x3f];
in += 3;
inlen -= 3;
}
if (inlen > 0) {
/* user provided max buffer size; make sure we don't go over it */
*out++ = basis_64[in[0] >> 2];
oval = (in[0] << 4) & 0x30;
if (inlen > 1) oval |= in[1] >> 4;
*out++ = basis_64[oval];
*out++ = (inlen < 2) ? '=' : basis_64[(in[1] << 2) & 0x3c];
*out++ = '=';
}
*out = '\0';
return SASL_OK;
}
/* base64 decode
* in -- input data
* inlen -- length of input data
* out -- output data (may be same as in, must have enough space)
* outmax -- max size of output buffer
* result:
* outlen -- actual output length
*
* returns:
* SASL_BADPROT on bad base64,
* SASL_BUFOVER if result won't fit,
* SASL_CONTINUE on a partial block,
* SASL_OK on success
*/
int sasl_decode64(const char *in,
unsigned inlen,
char *out,
unsigned outmax, /* size of the buffer, not counting the NUL */
unsigned *outlen)
{
unsigned len = 0;
unsigned j;
int c[4];
int saw_equal = 0;
/* check parameters */
if (out == NULL) return SASL_FAIL;
if (inlen > 0 && *in == '\r') return SASL_FAIL;
while (inlen > 3) {
/* No data is valid after an '=' character */
if (saw_equal) {
return SASL_BADPROT;
}
for (j = 0; j < 4; j++) {
c[j] = in[0];
in++;
inlen--;
}
if (CHAR64(c[0]) == -1 || CHAR64(c[1]) == -1) return SASL_BADPROT;
if (c[2] != '=' && CHAR64(c[2]) == -1) return SASL_BADPROT;
if (c[3] != '=' && CHAR64(c[3]) == -1) return SASL_BADPROT;
/* No data is valid after a '=' character, unless it is another '=' */
if (c[2] == '=' && c[3] != '=') return SASL_BADPROT;
if (c[2] == '=' || c[3] == '=') {
saw_equal = 1;
}
*out++ = (CHAR64(c[0]) << 2) | (CHAR64(c[1]) >> 4);
if (++len >= outmax) return SASL_BUFOVER;
if (c[2] != '=') {
*out++ = ((CHAR64(c[1]) << 4) & 0xf0) | (CHAR64(c[2]) >> 2);
if (++len >= outmax) return SASL_BUFOVER;
if (c[3] != '=') {
*out++ = ((CHAR64(c[2]) << 6) & 0xc0) | CHAR64(c[3]);
if (++len >= outmax) return SASL_BUFOVER;
}
}
}
*out = '\0'; /* NUL terminate the output string */
if (outlen) *outlen = len;
if (inlen != 0) {
if (saw_equal) {
/* Unless there is CRLF at the end? */
return SASL_BADPROT;
} else {
return (SASL_CONTINUE);
}
}
return SASL_OK;
}
/* make a challenge string (NUL terminated)
* buf -- buffer for result
* maxlen -- max length of result
* hostflag -- 0 = don't include hostname, 1 = include hostname
* returns final length or 0 if not enough space
*/
int sasl_mkchal(sasl_conn_t *conn,
char *buf,
unsigned maxlen,
unsigned hostflag)
{
sasl_rand_t *pool = NULL;
unsigned long randnum;
int ret;
time_t now;
unsigned len;
len = 4 /* <.>\0 */
+ (2 * 20); /* 2 numbers, 20 => max size of 64bit
* ulong in base 10 */
if (hostflag && conn->serverFQDN)
len += (unsigned) strlen(conn->serverFQDN) + 1 /* for the @ */;
if (maxlen < len)
return 0;
ret = sasl_randcreate(&pool);
if(ret != SASL_OK) return 0; /* xxx sasl return code? */
sasl_rand(pool, (char *)&randnum, sizeof(randnum));
sasl_randfree(&pool);
time(&now);
if (hostflag && conn->serverFQDN)
snprintf(buf,maxlen, "<%lu.%lu@%s>", randnum, now, conn->serverFQDN);
else
snprintf(buf,maxlen, "<%lu.%lu>", randnum, now);
return (int) strlen(buf);
}
/* borrowed from larry. probably works :)
* probably is also in acap server somewhere
*/
int sasl_utf8verify(const char *str, unsigned len)
{
unsigned i;
for (i = 0; i < len; i++) {
/* how many octets? */
int seqlen = 0;
while (str[i] & (0x80 >> seqlen)) ++seqlen;
if (seqlen == 0) continue; /* this is a valid US-ASCII char */
if (seqlen == 1) return SASL_BADPROT; /* this shouldn't happen here */
if (seqlen > 6) return SASL_BADPROT; /* illegal */
while (--seqlen)
if ((str[++i] & 0xC0) != 0xF0) return SASL_BADPROT; /* needed a 10 octet */
}
return SASL_OK;
}
/*
* To see why this is really bad see RFC 1750
*
* unfortunatly there currently is no way to make
* cryptographically secure pseudo random numbers
* without specialized hardware etc...
* thus, this is for nonce use only
*/
void getranddata(unsigned short ret[RPOOL_SIZE])
{
long curtime;
memset(ret, 0, RPOOL_SIZE*sizeof(unsigned short));
#ifdef DEV_RANDOM
{
int fd;
fd = open(DEV_RANDOM, O_RDONLY);
if(fd != -1) {
unsigned char *buf = (unsigned char *)ret;
ssize_t bytesread = 0;
size_t bytesleft = RPOOL_SIZE*sizeof(unsigned short);
do {
bytesread = read(fd, buf, bytesleft);
if(bytesread == -1 && errno == EINTR) continue;
else if(bytesread <= 0) break;
bytesleft -= bytesread;
buf += bytesread;
} while(bytesleft != 0);
close(fd);
}
}
#endif
#ifdef HAVE_GETPID
ret[0] ^= (unsigned short) getpid();
#endif
#ifdef HAVE_GETTIMEOFDAY
{
struct timeval tv;
/* xxx autoconf macro */
#ifdef _SVID_GETTOD
if (!gettimeofday(&tv))
#else
if (!gettimeofday(&tv, NULL))
#endif
{
/* longs are guaranteed to be at least 32 bits; we need
16 bits in each short */
ret[0] ^= (unsigned short) (tv.tv_sec & 0xFFFF);
ret[1] ^= (unsigned short) (clock() & 0xFFFF);
ret[1] ^= (unsigned short) (tv.tv_usec >> 16);
ret[2] ^= (unsigned short) (tv.tv_usec & 0xFFFF);
return;
}
}
#endif /* HAVE_GETTIMEOFDAY */
/* if all else fails just use time() */
curtime = (long) time(NULL); /* better be at least 32 bits */
ret[0] ^= (unsigned short) (curtime >> 16);
ret[1] ^= (unsigned short) (curtime & 0xFFFF);
ret[2] ^= (unsigned short) (clock() & 0xFFFF);
return;
}
int sasl_randcreate(sasl_rand_t **rpool)
{
(*rpool)=sasl_ALLOC(sizeof(sasl_rand_t));
if ((*rpool) == NULL) return SASL_NOMEM;
/* init is lazy */
(*rpool)->initialized = 0;
return SASL_OK;
}
void sasl_randfree(sasl_rand_t **rpool)
{
sasl_FREE(*rpool);
}
void sasl_randseed (sasl_rand_t *rpool, const char *seed, unsigned len)
{
/* is it acceptable to just use the 1st 3 char's given??? */
unsigned int lup;
/* check params */
if (seed == NULL) return;
if (rpool == NULL) return;
rpool->initialized = 1;
if (len > sizeof(unsigned short)*RPOOL_SIZE)
len = sizeof(unsigned short)*RPOOL_SIZE;
for (lup = 0; lup < len; lup += 2)
rpool->pool[lup/2] = (seed[lup] << 8) + seed[lup + 1];
}
static void randinit(sasl_rand_t *rpool)
{
if (!rpool) return;
if (!rpool->initialized) {
getranddata(rpool->pool);
rpool->initialized = 1;
#if !(defined(WIN32)||defined(macintosh))
#ifndef HAVE_JRAND48
{
/* xxx varies by platform */
unsigned int *foo = (unsigned int *)rpool->pool;
srandom(*foo);
}
#endif /* HAVE_JRAND48 */
#elif defined(WIN32)
{
unsigned int *foo = (unsigned int *)rpool->pool;
srand(*foo);
}
#endif /* WIN32 */
}
}
void sasl_rand (sasl_rand_t *rpool, char *buf, unsigned len)
{
unsigned int lup;
#if defined(WIN32) && !defined(__MINGW32__)
unsigned int randomValue;
#endif
/* check params */
if (!rpool || !buf) return;
/* init if necessary */
randinit(rpool);
for (lup = 0; lup < len; lup++) {
#if defined(__MINGW32__)
buf[lup] = (char) (rand() >> 8);
#elif defined(WIN32)
if (rand_s(&randomValue) != 0) {
randomValue = rand();
}
buf[lup] = (char) (randomValue >> 8);
#elif defined(macintosh)
buf[lup] = (char) (rand() >> 8);
#else /* !WIN32 && !macintosh */
#ifdef HAVE_JRAND48
buf[lup] = (char) (jrand48(rpool->pool) >> 8);
#else
buf[lup] = (char) (random() >> 8);
#endif /* HAVE_JRAND48 */
#endif /* WIN32 */
}
}
/* this function is just a bad idea all around, since we're not trying to
implement a true random number generator */
void sasl_churn (sasl_rand_t *rpool, const char *data, unsigned len)
{
unsigned int lup;
/* check params */
if (!rpool || !data) return;
/* init if necessary */
randinit(rpool);
for (lup=0; lup<len; lup++)
rpool->pool[lup % RPOOL_SIZE] ^= data[lup];
}
void sasl_erasebuffer(char *buf, unsigned len) {
memset(buf, 0, len);
}
/* Lowercase string in place */
char *sasl_strlower (
char *val
)
{
int i;
if (val == NULL) {
return (NULL);
}
/* don't use tolower(), as it is locale dependent */
for (i = 0; val[i] != '\0'; i++) {
if (val[i] >= 'A' && val[i] <= 'Z') {
val[i] = val[i] - 'A' + 'a';
}
}
return (val);
}
/* A version of gethostname that tries hard to return a FQDN */
int get_fqhostname(
char *name,
int namelen,
int abort_if_no_fqdn
)
{
int return_value;
struct addrinfo hints;
struct addrinfo *result;
return_value = gethostname (name, namelen);
if (return_value != 0) {
return (return_value);
}
if (strchr (name, '.') != NULL) {
goto LOWERCASE;
}
/* gethostname hasn't returned a FQDN, we have to canonify it ourselves */
hints.ai_family = PF_UNSPEC;
hints.ai_flags = AI_CANONNAME;
hints.ai_socktype = SOCK_STREAM; /* TCP only */
/* A value of zero for ai_protocol indicates the caller will accept any protocol. or IPPROTO_TCP? */
hints.ai_protocol = 0; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
hints.ai_addrlen = 0;
hints.ai_canonname = NULL;
hints.ai_addr = NULL;
hints.ai_next = NULL;
if (getaddrinfo(name,
NULL, /* don't care abour service/port */
&hints,
&result) != 0) {
if (abort_if_no_fqdn) {
/* errno on Unix, WSASetLastError on Windows are already done by the function */
return (-1);
} else {
goto LOWERCASE;
}
}
if (result == NULL || result->ai_canonname == NULL) {
freeaddrinfo (result);
if (abort_if_no_fqdn) {
#ifdef WIN32
WSASetLastError (WSANO_DATA);
#elif defined(ENODATA)
errno = ENODATA;
#elif defined(EADDRNOTAVAIL)
errno = EADDRNOTAVAIL;
#endif
return (-1);
} else {
goto LOWERCASE;
}
}
if (strchr (result->ai_canonname, '.') == NULL) {
freeaddrinfo (result);
if (abort_if_no_fqdn) {
#ifdef WIN32
WSASetLastError (WSANO_DATA);
#elif defined(ENODATA)
errno = ENODATA;
#elif defined(EADDRNOTAVAIL)
errno = EADDRNOTAVAIL;
#endif
return (-1);
} else {
goto LOWERCASE;
}
}
/* Do we need to check for buffer overflow and set errno? */
strncpy (name, result->ai_canonname, namelen);
freeaddrinfo (result);
LOWERCASE:
sasl_strlower (name);
return (0);
}
#ifdef WIN32
/*****************************************************************************
*
* MODULE NAME : GETOPT.C
*
* COPYRIGHTS:
* This module contains code made available by IBM
* Corporation on an AS IS basis. Any one receiving the
* module is considered to be licensed under IBM copyrights
* to use the IBM-provided source code in any way he or she
* deems fit, including copying it, compiling it, modifying
* it, and redistributing it, with or without
* modifications. No license under any IBM patents or
* patent applications is to be implied from this copyright
* license.
*
* A user of the module should understand that IBM cannot
* provide technical support for the module and will not be
* responsible for any consequences of use of the program.
*
* Any notices, including this one, are not to be removed
* from the module without the prior written consent of
* IBM.
*
* AUTHOR: Original author:
* G. R. Blair (BOBBLAIR at AUSVM1)
* Internet: bobblair@bobblair.austin.ibm.com
*
* Extensively revised by:
* John Q. Walker II, Ph.D. (JOHHQ at RALVM6)
* Internet: johnq@ralvm6.vnet.ibm.com
*
*****************************************************************************/
/******************************************************************************
* getopt()
*
* The getopt() function is a command line parser. It returns the next
* option character in argv that matches an option character in opstring.
*
* The argv argument points to an array of argc+1 elements containing argc
* pointers to character strings followed by a null pointer.
*
* The opstring argument points to a string of option characters; if an
* option character is followed by a colon, the option is expected to have
* an argument that may or may not be separated from it by white space.
* The external variable optarg is set to point to the start of the option
* argument on return from getopt().
*
* The getopt() function places in optind the argv index of the next argument
* to be processed. The system initializes the external variable optind to
* 1 before the first call to getopt().
*
* When all options have been processed (that is, up to the first nonoption
* argument), getopt() returns EOF. The special option "--" may be used to
* delimit the end of the options; EOF will be returned, and "--" will be
* skipped.
*
* The getopt() function returns a question mark (?) when it encounters an
* option character not included in opstring. This error message can be
* disabled by setting opterr to zero. Otherwise, it returns the option
* character that was detected.
*
* If the special option "--" is detected, or all options have been
* processed, EOF is returned.
*
* Options are marked by either a minus sign (-) or a slash (/).
*
* No errors are defined.
*****************************************************************************/
#include <string.h> /* for strchr() */
/* static (global) variables that are specified as exported by getopt() */
__declspec(dllexport) char *optarg = NULL; /* pointer to the start of the option argument */
__declspec(dllexport) int optind = 1; /* number of the next argv[] to be evaluated */
__declspec(dllexport) int opterr = 1; /* non-zero if a question mark should be returned */
/* handle possible future character set concerns by putting this in a macro */
#define _next_char(string) (char)(*(string+1))
int getopt(int argc, char *argv[], char *opstring)
{
static char *pIndexPosition = NULL; /* place inside current argv string */
char *pArgString = NULL; /* where to start from next */
char *pOptString; /* the string in our program */
if (pIndexPosition != NULL) {
/* we last left off inside an argv string */
if (*(++pIndexPosition)) {
/* there is more to come in the most recent argv */
pArgString = pIndexPosition;
}
}
if (pArgString == NULL) {
/* we didn't leave off in the middle of an argv string */
if (optind >= argc) {
/* more command-line arguments than the argument count */
pIndexPosition = NULL; /* not in the middle of anything */
return EOF; /* used up all command-line arguments */
}
/*---------------------------------------------------------------------
* If the next argv[] is not an option, there can be no more options.
*-------------------------------------------------------------------*/
pArgString = argv[optind++]; /* set this to the next argument ptr */
if (('/' != *pArgString) && /* doesn't start with a slash or a dash? */
('-' != *pArgString)) {
--optind; /* point to current arg once we're done */
optarg = NULL; /* no argument follows the option */
pIndexPosition = NULL; /* not in the middle of anything */
return EOF; /* used up all the command-line flags */
}
/* check for special end-of-flags markers */
if ((strcmp(pArgString, "-") == 0) ||
(strcmp(pArgString, "--") == 0)) {
optarg = NULL; /* no argument follows the option */
pIndexPosition = NULL; /* not in the middle of anything */
return EOF; /* encountered the special flag */
}
pArgString++; /* look past the / or - */
}
if (':' == *pArgString) { /* is it a colon? */
/*---------------------------------------------------------------------
* Rare case: if opterr is non-zero, return a question mark;
* otherwise, just return the colon we're on.
*-------------------------------------------------------------------*/
return (opterr ? (int)'?' : (int)':');
}
else if ((pOptString = strchr(opstring, *pArgString)) == 0) {
/*---------------------------------------------------------------------
* The letter on the command-line wasn't any good.
*-------------------------------------------------------------------*/
optarg = NULL; /* no argument follows the option */
pIndexPosition = NULL; /* not in the middle of anything */
return (opterr ? (int)'?' : (int)*pArgString);
}
else {
/*---------------------------------------------------------------------
* The letter on the command-line matches one we expect to see
*-------------------------------------------------------------------*/
if (':' == _next_char(pOptString)) { /* is the next letter a colon? */
/* It is a colon. Look for an argument string. */
if ('\0' != _next_char(pArgString)) { /* argument in this argv? */
optarg = &pArgString[1]; /* Yes, it is */
}
else {
/*-------------------------------------------------------------
* The argument string must be in the next argv.
* But, what if there is none (bad input from the user)?
* In that case, return the letter, and optarg as NULL.
*-----------------------------------------------------------*/
if (optind < argc)
optarg = argv[optind++];
else {
optarg = NULL;
return (opterr ? (int)'?' : (int)*pArgString);
}
}
pIndexPosition = NULL; /* not in the middle of anything */
}
else {
/* it's not a colon, so just return the letter */
optarg = NULL; /* no argument follows the option */
pIndexPosition = pArgString; /* point to the letter we're on */
}
return (int)*pArgString; /* return the letter that matched */
}
}
#ifndef PASSWORD_MAX
# define PASSWORD_MAX 255
#endif
#include <conio.h>
char *
getpass(prompt)
const char *prompt;
{
register char *p;
register int c;
static char pbuf[PASSWORD_MAX];
fprintf(stderr, "%s", prompt); (void) fflush(stderr);
for (p=pbuf; (c = _getch())!=13 && c!=EOF;) {
if (p < &pbuf[sizeof(pbuf)-1])
*p++ = (char) c;
}
*p = '\0';
fprintf(stderr, "\n"); (void) fflush(stderr);
return(pbuf);
}
#endif /* WIN32 */
File diff suppressed because it is too large Load Diff
-263
View File
@@ -1,263 +0,0 @@
/* seterror.c - sasl_seterror split out because glue libraries
* can't pass varargs lists
* Rob Siemborski
* Tim Martin
* split from common.c by Rolf Braun
* $Id: seterror.c,v 1.10 2011/09/01 14:12:53 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#ifdef HAVE_SYSLOG
#include <syslog.h>
#endif
#include <stdarg.h>
#include <ctype.h>
#include <sasl.h>
#include <saslutil.h>
#include <saslplug.h>
#include "saslint.h"
#ifdef WIN32
/* need to handle the fact that errno has been defined as a function
in a dll, not an extern int */
# ifdef errno
# undef errno
# endif /* errno */
#endif /* WIN32 */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
/* this is apparently no longer a user function */
static int _sasl_seterror_usererr(int saslerr)
{
/* Hide the difference in a username failure and a password failure */
if (saslerr == SASL_NOUSER)
return SASL_BADAUTH;
/* otherwise return the error given; no transform necessary */
return saslerr;
}
/* set the error string which will be returned by sasl_errdetail() using
* syslog()-style formatting (e.g. printf-style with %m as the string form
* of an errno error)
*
* primarily for use by server callbacks such as the sasl_authorize_t
* callback and internally to plug-ins
*
* This will also trigger a call to the SASL logging callback (if any)
* with a level of SASL_LOG_FAIL unless the SASL_NOLOG flag is set.
*
* Messages should be sensitive to the current language setting. If there
* is no SASL_CB_LANGUAGE callback messages MUST be US-ASCII otherwise UTF-8
* is used and use of RFC 2482 for mixed-language text is encouraged.
*
* if conn is NULL, function does nothing
*/
void sasl_seterror(sasl_conn_t *conn,
unsigned flags,
const char *fmt, ...)
{
size_t outlen=0; /* current length of output buffer */
size_t pos = 0; /* current position in format string */
size_t formatlen;
int result;
sasl_log_t *log_cb = NULL;
void *log_ctx;
int ival;
char *cval;
va_list ap; /* varargs thing */
char **error_buf;
size_t *error_buf_len;
if(!conn) {
#ifndef SASL_OSX_CFMGLUE
if(!(flags & SASL_NOLOG)) {
/* See if we have a logging callback... */
result = _sasl_getcallback(NULL, SASL_CB_LOG, (sasl_callback_ft *)&log_cb, &log_ctx);
if (result == SASL_OK && ! log_cb)
result = SASL_FAIL;
if (result != SASL_OK)
return;
log_cb(log_ctx, SASL_LOG_FAIL,
"No sasl_conn_t passed to sasl_seterror");
}
#endif /* SASL_OSX_CFMGLUE */
return;
} else if(!fmt) return;
/* we need to use a back end function to get the buffer because the
cfm glue can't be rooting around in the internal structs */
_sasl_get_errorbuf(conn, &error_buf, &error_buf_len);
formatlen = strlen(fmt);
va_start(ap, fmt); /* start varargs */
while(pos<formatlen)
{
if (fmt[pos]!='%') /* regular character */
{
result = _buf_alloc(error_buf, error_buf_len, outlen+1);
if (result != SASL_OK)
return;
(*error_buf)[outlen]=fmt[pos];
outlen++;
pos++;
} else { /* formating thing */
int done=0;
char frmt[10];
int frmtpos=1;
char tempbuf[21];
frmt[0]='%';
pos++;
while (done==0)
{
switch(fmt[pos])
{
case 's': /* need to handle this */
cval = va_arg(ap, char *); /* get the next arg */
result = _sasl_add_string(error_buf, error_buf_len,
&outlen, cval);
if (result != SASL_OK) /* add the string */
return;
done=1;
break;
case '%': /* double % output the '%' character */
result = _buf_alloc(error_buf, error_buf_len, outlen+1);
if (result != SASL_OK)
return;
(*error_buf)[outlen]='%';
outlen++;
done=1;
break;
case 'm': /* insert the errno string */
result = _sasl_add_string(error_buf, error_buf_len,
&outlen,
strerror(va_arg(ap, int)));
if (result != SASL_OK)
return;
done=1;
break;
case 'z': /* insert the sasl error string */
result = _sasl_add_string(error_buf, error_buf_len, &outlen,
(char *)sasl_errstring(_sasl_seterror_usererr(
va_arg(ap, int)),NULL,NULL));
if (result != SASL_OK)
return;
done=1;
break;
case 'c':
frmt[frmtpos++]=fmt[pos];
frmt[frmtpos]=0;
tempbuf[0] = (char) va_arg(ap, int); /* get the next arg */
tempbuf[1]='\0';
/* now add the character */
result = _sasl_add_string(error_buf, error_buf_len,
&outlen, tempbuf);
if (result != SASL_OK)
return;
done=1;
break;
case 'd':
case 'i':
frmt[frmtpos++]=fmt[pos];
frmt[frmtpos]=0;
ival = va_arg(ap, int); /* get the next arg */
snprintf(tempbuf,20,frmt,ival); /* have snprintf do the work */
/* now add the string */
result = _sasl_add_string(error_buf, error_buf_len,
&outlen, tempbuf);
if (result != SASL_OK)
return;
done=1;
break;
default:
frmt[frmtpos++]=fmt[pos]; /* add to the formating */
frmt[frmtpos]=0;
if (frmtpos>9)
done=1;
}
pos++;
if (pos>formatlen)
done=1;
}
}
}
(*error_buf)[outlen]='\0'; /* put 0 at end */
va_end(ap);
#ifndef SASL_OSX_CFMGLUE
if(!(flags & SASL_NOLOG)) {
/* See if we have a logging callback... */
result = _sasl_getcallback(conn, SASL_CB_LOG, (sasl_callback_ft *)&log_cb, &log_ctx);
if (result == SASL_OK && ! log_cb)
result = SASL_FAIL;
if (result != SASL_OK)
return;
result = log_cb(log_ctx, SASL_LOG_FAIL, conn->error_buf);
}
#endif /* SASL_OSX_CFMGLUE */
}
-784
View File
@@ -1,784 +0,0 @@
/**************************************************************
* Original:
* Patrick Powell Tue Apr 11 09:48:21 PDT 1995
* A bombproof version of doprnt (dopr) included.
* Sigh. This sort of thing is always nasty do deal with. Note that
* the version here does not include floating point...
*
* snprintf() is used instead of sprintf() as it does limit checks
* for string length. This covers a nasty loophole.
*
* The other functions are there to prevent NULL pointers from
* causing nast effects.
*
* More Recently:
* Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
* This was ugly. It is still ugly. I opted out of floating point
* numbers, but the formatter understands just about everything
* from the normal C string format, at least as far as I can tell from
* the Solaris 2.5 printf(3S) man page.
*
* Brandon Long <blong@fiction.net> 10/22/97 for mutt 0.87.1
* Ok, added some minimal floating point support, which means this
* probably requires libm on most operating systems. Don't yet
* support the exponent (e,E) and sigfig (g,G). Also, fmtint()
* was pretty badly broken, it just wasn't being exercised in ways
* which showed it, so that's been fixed. Also, formated the code
* to mutt conventions, and removed dead code left over from the
* original. Also, there is now a builtin-test, just compile with:
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
* and run snprintf for results.
*
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
* The PGP code was using unsigned hexadecimal formats.
* Unfortunately, unsigned formats simply didn't work.
*
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
* The original code assumed that both snprintf() and vsnprintf() were
* missing. Some systems only have snprintf() but not vsnprintf(), so
* the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
*
**************************************************************/
#include <config.h>
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
#include <string.h>
# include <ctype.h>
#include <sys/types.h>
/* varargs declarations: */
#if defined(HAVE_STDARG_H)
# include <stdarg.h>
# define HAVE_STDARGS /* let's hope that works everywhere (mj) */
# define VA_LOCAL_DECL va_list ap
# define VA_START(f) va_start(ap, f)
# define VA_SHIFT(v,t) ; /* no-op for ANSI */
# define VA_END va_end(ap)
#else
# if defined(HAVE_VARARGS_H)
# include <varargs.h>
# undef HAVE_STDARGS
# define VA_LOCAL_DECL va_list ap
# define VA_START(f) va_start(ap) /* f is ignored! */
# define VA_SHIFT(v,t) v = va_arg(ap,t)
# define VA_END va_end(ap)
# else
/*XX ** NO VARARGS ** XX*/
# endif
#endif
/*int snprintf (char *str, size_t count, const char *fmt, ...);*/
/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/
static void dopr (char *buffer, size_t maxlen, const char *format,
va_list args);
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
char *value, int flags, int min, int max);
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
long value, int base, int min, int max, int flags);
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
long double fvalue, int min, int max, int flags);
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
/*
* dopr(): poor man's version of doprintf
*/
/* format read states */
#define DP_S_DEFAULT 0
#define DP_S_FLAGS 1
#define DP_S_MIN 2
#define DP_S_DOT 3
#define DP_S_MAX 4
#define DP_S_MOD 5
#define DP_S_CONV 6
#define DP_S_DONE 7
/* format flags - Bits */
#define DP_F_MINUS (1 << 0)
#define DP_F_PLUS (1 << 1)
#define DP_F_SPACE (1 << 2)
#define DP_F_NUM (1 << 3)
#define DP_F_ZERO (1 << 4)
#define DP_F_UP (1 << 5)
#define DP_F_UNSIGNED (1 << 6)
/* Conversion Flags */
#define DP_C_SHORT 1
#define DP_C_LONG 2
#define DP_C_LDOUBLE 3
#define char_to_int(p) (p - '0')
#define MAX(p,q) ((p >= q) ? p : q)
static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
{
char ch;
long value;
long double fvalue;
char *strvalue;
int min;
int max;
int state;
int flags;
int cflags;
size_t currlen;
state = DP_S_DEFAULT;
currlen = flags = cflags = min = 0;
max = -1;
ch = *format++;
while (state != DP_S_DONE)
{
if ((ch == '\0') || (currlen >= maxlen))
state = DP_S_DONE;
switch(state)
{
case DP_S_DEFAULT:
if (ch == '%')
state = DP_S_FLAGS;
else
dopr_outch (buffer, &currlen, maxlen, ch);
ch = *format++;
break;
case DP_S_FLAGS:
switch (ch)
{
case '-':
flags |= DP_F_MINUS;
ch = *format++;
break;
case '+':
flags |= DP_F_PLUS;
ch = *format++;
break;
case ' ':
flags |= DP_F_SPACE;
ch = *format++;
break;
case '#':
flags |= DP_F_NUM;
ch = *format++;
break;
case '0':
flags |= DP_F_ZERO;
ch = *format++;
break;
default:
state = DP_S_MIN;
break;
}
break;
case DP_S_MIN:
if (isdigit((unsigned char)ch))
{
min = 10*min + char_to_int (ch);
ch = *format++;
}
else if (ch == '*')
{
min = va_arg (args, int);
ch = *format++;
state = DP_S_DOT;
}
else
state = DP_S_DOT;
break;
case DP_S_DOT:
if (ch == '.')
{
state = DP_S_MAX;
ch = *format++;
}
else
state = DP_S_MOD;
break;
case DP_S_MAX:
if (isdigit((unsigned char)ch))
{
if (max < 0)
max = 0;
max = 10*max + char_to_int (ch);
ch = *format++;
}
else if (ch == '*')
{
max = va_arg (args, int);
ch = *format++;
state = DP_S_MOD;
}
else
state = DP_S_MOD;
break;
case DP_S_MOD:
/* Currently, we don't support Long Long, bummer */
switch (ch)
{
case 'h':
cflags = DP_C_SHORT;
ch = *format++;
break;
case 'l':
cflags = DP_C_LONG;
ch = *format++;
break;
case 'L':
cflags = DP_C_LDOUBLE;
ch = *format++;
break;
default:
break;
}
state = DP_S_CONV;
break;
case DP_S_CONV:
switch (ch)
{
case 'd':
case 'i':
if (cflags == DP_C_SHORT)
value = va_arg (args, short int);
else if (cflags == DP_C_LONG)
value = va_arg (args, long int);
else
value = va_arg (args, int);
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
break;
case 'o':
flags |= DP_F_UNSIGNED;
if (cflags == DP_C_SHORT)
value = va_arg (args, unsigned short int);
else if (cflags == DP_C_LONG)
value = va_arg (args, unsigned long int);
else
value = va_arg (args, unsigned int);
fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
break;
case 'u':
flags |= DP_F_UNSIGNED;
if (cflags == DP_C_SHORT)
value = va_arg (args, unsigned short int);
else if (cflags == DP_C_LONG)
value = va_arg (args, unsigned long int);
else
value = va_arg (args, unsigned int);
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
break;
case 'X':
flags |= DP_F_UP;
case 'x':
flags |= DP_F_UNSIGNED;
if (cflags == DP_C_SHORT)
value = va_arg (args, unsigned short int);
else if (cflags == DP_C_LONG)
value = va_arg (args, unsigned long int);
else
value = va_arg (args, unsigned int);
fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
break;
case 'f':
if (cflags == DP_C_LDOUBLE)
fvalue = va_arg (args, long double);
else
fvalue = va_arg (args, double);
/* um, floating point? */
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
break;
case 'E':
flags |= DP_F_UP;
case 'e':
if (cflags == DP_C_LDOUBLE)
fvalue = va_arg (args, long double);
else
fvalue = va_arg (args, double);
break;
case 'G':
flags |= DP_F_UP;
case 'g':
if (cflags == DP_C_LDOUBLE)
fvalue = va_arg (args, long double);
else
fvalue = va_arg (args, double);
break;
case 'c':
dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
break;
case 's':
strvalue = va_arg (args, char *);
if (max < 0)
max = maxlen; /* ie, no max */
fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
break;
case 'p':
strvalue = va_arg (args, void *);
fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
break;
case 'n':
if (cflags == DP_C_SHORT)
{
short int *num;
num = va_arg (args, short int *);
*num = currlen;
}
else if (cflags == DP_C_LONG)
{
long int *num;
num = va_arg (args, long int *);
*num = currlen;
}
else
{
int *num;
num = va_arg (args, int *);
*num = currlen;
}
break;
case '%':
dopr_outch (buffer, &currlen, maxlen, ch);
break;
case 'w':
/* not supported yet, treat as next char */
ch = *format++;
break;
default:
/* Unknown, skip */
break;
}
ch = *format++;
state = DP_S_DEFAULT;
flags = cflags = min = 0;
max = -1;
break;
case DP_S_DONE:
break;
default:
/* hmm? */
break; /* some picky compilers need this */
}
}
if (currlen < maxlen - 1)
buffer[currlen] = '\0';
else
buffer[maxlen - 1] = '\0';
}
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
char *value, int flags, int min, int max)
{
int padlen, strln; /* amount to pad */
int cnt = 0;
if (value == 0)
{
value = "<NULL>";
}
for (strln = 0; value[strln]; ++strln); /* strlen */
padlen = min - strln;
if (padlen < 0)
padlen = 0;
if (flags & DP_F_MINUS)
padlen = -padlen; /* Left Justify */
while ((padlen > 0) && (cnt < max))
{
dopr_outch (buffer, currlen, maxlen, ' ');
--padlen;
++cnt;
}
while (*value && (cnt < max))
{
dopr_outch (buffer, currlen, maxlen, *value++);
++cnt;
}
while ((padlen < 0) && (cnt < max))
{
dopr_outch (buffer, currlen, maxlen, ' ');
++padlen;
++cnt;
}
}
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
long value, int base, int min, int max, int flags)
{
int signvalue = 0;
unsigned long uvalue;
char convert[20];
int place = 0;
int spadlen = 0; /* amount to space pad */
int zpadlen = 0; /* amount to zero pad */
int caps = 0;
if (max < 0)
max = 0;
uvalue = value;
if(!(flags & DP_F_UNSIGNED))
{
if( value < 0 ) {
signvalue = '-';
uvalue = -value;
}
else
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
signvalue = '+';
else
if (flags & DP_F_SPACE)
signvalue = ' ';
}
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
do {
convert[place++] =
(caps? "0123456789ABCDEF":"0123456789abcdef")
[uvalue % (unsigned)base ];
uvalue = (uvalue / (unsigned)base );
} while(uvalue && (place < 20));
if (place == 20) place--;
convert[place] = 0;
zpadlen = max - place;
spadlen = min - MAX (max, place) - (signvalue ? 1 : 0);
if (zpadlen < 0) zpadlen = 0;
if (spadlen < 0) spadlen = 0;
if (flags & DP_F_ZERO)
{
zpadlen = MAX(zpadlen, spadlen);
spadlen = 0;
}
if (flags & DP_F_MINUS)
spadlen = -spadlen; /* Left Justifty */
#ifdef DEBUG_SNPRINTF
dprint (1, (debugfile, "zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
zpadlen, spadlen, min, max, place));
#endif
/* Spaces */
while (spadlen > 0)
{
dopr_outch (buffer, currlen, maxlen, ' ');
--spadlen;
}
/* Sign */
if (signvalue)
dopr_outch (buffer, currlen, maxlen, signvalue);
/* Zeros */
if (zpadlen > 0)
{
while (zpadlen > 0)
{
dopr_outch (buffer, currlen, maxlen, '0');
--zpadlen;
}
}
/* Digits */
while (place > 0)
dopr_outch (buffer, currlen, maxlen, convert[--place]);
/* Left Justified spaces */
while (spadlen < 0) {
dopr_outch (buffer, currlen, maxlen, ' ');
++spadlen;
}
}
static long double abs_val (long double value)
{
long double result = value;
if (value < 0)
result = -value;
return result;
}
static long double pow10 (int exp)
{
long double result = 1;
while (exp)
{
result *= 10;
exp--;
}
return result;
}
static long round (long double value)
{
long intpart;
intpart = value;
value = value - intpart;
if (value >= 0.5)
intpart++;
return intpart;
}
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
long double fvalue, int min, int max, int flags)
{
int signvalue = 0;
long double ufvalue;
char iconvert[20];
char fconvert[20];
int iplace = 0;
int fplace = 0;
int padlen = 0; /* amount to pad */
int zpadlen = 0;
int caps = 0;
long intpart;
long fracpart;
/*
* AIX manpage says the default is 0, but Solaris says the default
* is 6, and sprintf on AIX defaults to 6
*/
if (max < 0)
max = 6;
ufvalue = abs_val (fvalue);
if (fvalue < 0)
signvalue = '-';
else
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
signvalue = '+';
else
if (flags & DP_F_SPACE)
signvalue = ' ';
#if 0
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
#endif
intpart = ufvalue;
/*
* Sorry, we only support 9 digits past the decimal because of our
* conversion method
*/
if (max > 9)
max = 9;
/* We "cheat" by converting the fractional part to integer by
* multiplying by a factor of 10
*/
fracpart = round ((pow10 (max)) * (ufvalue - intpart));
if (fracpart >= pow10 (max))
{
intpart++;
fracpart -= pow10 (max);
}
#ifdef DEBUG_SNPRINTF
dprint (1, (debugfile, "fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart));
#endif
/* Convert integer part */
do {
iconvert[iplace++] =
(caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10];
intpart = (intpart / 10);
} while(intpart && (iplace < 20));
if (iplace == 20) iplace--;
iconvert[iplace] = 0;
/* Convert fractional part */
do {
fconvert[fplace++] =
(caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
fracpart = (fracpart / 10);
} while(fracpart && (fplace < 20));
if (fplace == 20) fplace--;
fconvert[fplace] = 0;
/* -1 for decimal point, another -1 if we are printing a sign */
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
zpadlen = max - fplace;
if (zpadlen < 0)
zpadlen = 0;
if (padlen < 0)
padlen = 0;
if (flags & DP_F_MINUS)
padlen = -padlen; /* Left Justifty */
if ((flags & DP_F_ZERO) && (padlen > 0))
{
if (signvalue)
{
dopr_outch (buffer, currlen, maxlen, signvalue);
--padlen;
signvalue = 0;
}
while (padlen > 0)
{
dopr_outch (buffer, currlen, maxlen, '0');
--padlen;
}
}
while (padlen > 0)
{
dopr_outch (buffer, currlen, maxlen, ' ');
--padlen;
}
if (signvalue)
dopr_outch (buffer, currlen, maxlen, signvalue);
while (iplace > 0)
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
/*
* Decimal point. This should probably use locale to find the correct
* char to print out.
*/
dopr_outch (buffer, currlen, maxlen, '.');
while (fplace > 0)
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
while (zpadlen > 0)
{
dopr_outch (buffer, currlen, maxlen, '0');
--zpadlen;
}
while (padlen < 0)
{
dopr_outch (buffer, currlen, maxlen, ' ');
++padlen;
}
}
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
{
if (*currlen < maxlen)
buffer[(*currlen)++] = c;
}
#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */
#ifndef HAVE_VSNPRINTF
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
{
str[0] = 0;
dopr(str, count, fmt, args);
return(strlen(str));
}
#endif /* !HAVE_VSNPRINTF */
#ifndef HAVE_SNPRINTF
/* VARARGS3 */
#ifdef HAVE_STDARGS
int snprintf (char *str,size_t count,const char *fmt,...)
#else
int snprintf (va_alist) va_dcl
#endif
{
#ifndef HAVE_STDARGS
char *str;
size_t count;
char *fmt;
#endif
VA_LOCAL_DECL;
VA_START (fmt);
VA_SHIFT (str, char *);
VA_SHIFT (count, size_t );
VA_SHIFT (fmt, char *);
(void) vsnprintf(str, count, fmt, ap);
VA_END;
return(strlen(str));
}
#ifdef TEST_SNPRINTF
#ifndef LONG_STRING
#define LONG_STRING 1024
#endif
int main (void)
{
char buf1[LONG_STRING];
char buf2[LONG_STRING];
char *fp_fmt[] = {
"%-1.5f",
"%1.5f",
"%123.9f",
"%10.5f",
"% 10.5f",
"%+22.9f",
"%+4.9f",
"%01.3f",
"%4f",
"%3.1f",
"%3.2f",
NULL
};
double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
0.9996, 1.996, 4.136, 0};
char *int_fmt[] = {
"%-1.5d",
"%1.5d",
"%123.9d",
"%5.5d",
"%10.5d",
"% 10.5d",
"%+22.33d",
"%01.3d",
"%4d",
NULL
};
long int_nums[] = { -1, 134, 91340, 341, 0203, 0};
int x, y;
int fail = 0;
int num = 0;
printf ("Testing snprintf format codes against system sprintf...\n");
for (x = 0; fp_fmt[x] != NULL ; x++)
for (y = 0; fp_nums[y] != 0 ; y++)
{
snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
sprintf (buf2, fp_fmt[x], fp_nums[y]);
if (strcmp (buf1, buf2))
{
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
fp_fmt[x], buf1, buf2);
fail++;
}
num++;
}
for (x = 0; int_fmt[x] != NULL ; x++)
for (y = 0; int_nums[y] != 0 ; y++)
{
snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
sprintf (buf2, int_fmt[x], int_nums[y]);
if (strcmp (buf1, buf2))
{
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
int_fmt[x], buf1, buf2);
fail++;
}
num++;
}
printf ("%d tests failed out of %d.\n", fail, num);
}
#endif /* SNPRINTF_TEST */
#endif /* !HAVE_SNPRINTF */
@@ -1,184 +0,0 @@
/* staticopen.h
* Rob Siemborski
* Howard Chu
* $Id: staticopen.h,v 1.9 2011/04/05 14:50:07 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
typedef enum {
UNKNOWN = 0, SERVER = 1, CLIENT = 2, AUXPROP = 3, CANONUSER = 4
} _sasl_plug_type;
typedef struct {
_sasl_plug_type type;
char *name;
sasl_client_plug_init_t *plug;
} _sasl_plug_rec;
/* For static linking */
#define SPECIFIC_CLIENT_PLUG_INIT_PROTO( x ) \
sasl_client_plug_init_t x##_client_plug_init
#define SPECIFIC_SERVER_PLUG_INIT_PROTO( x ) \
sasl_server_plug_init_t x##_server_plug_init
#define SPECIFIC_AUXPROP_PLUG_INIT_PROTO( x ) \
sasl_auxprop_init_t x##_auxprop_plug_init
#define SPECIFIC_CANONUSER_PLUG_INIT_PROTO( x ) \
sasl_canonuser_init_t x##_canonuser_plug_init
/* Static Compillation Foo */
#define SPECIFIC_CLIENT_PLUG_INIT( x, n )\
{ CLIENT, n, x##_client_plug_init }
#define SPECIFIC_SERVER_PLUG_INIT( x, n )\
{ SERVER, n, (sasl_client_plug_init_t *)x##_server_plug_init }
#define SPECIFIC_AUXPROP_PLUG_INIT( x, n )\
{ AUXPROP, n, (sasl_client_plug_init_t *)x##_auxprop_plug_init }
#define SPECIFIC_CANONUSER_PLUG_INIT( x, n )\
{ CANONUSER, n, (sasl_client_plug_init_t *)x##_canonuser_plug_init }
#ifdef STATIC_ANONYMOUS
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( anonymous );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( anonymous );
#endif
#ifdef STATIC_CRAMMD5
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( crammd5 );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( crammd5 );
#endif
#ifdef STATIC_DIGESTMD5
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( digestmd5 );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( digestmd5 );
#endif
#ifdef STATIC_SCRAM
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( scram );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( scram );
#endif
#ifdef STATIC_GSSAPIV2
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( gssapiv2 );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( gssapiv2 );
#endif
#ifdef STATIC_KERBEROS4
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( kerberos4 );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( kerberos4 );
#endif
#ifdef STATIC_LOGIN
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( login );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( login );
#endif
#ifdef STATIC_NTLM
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( ntlm );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( ntlm );
#endif
#ifdef STATIC_OTP
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( otp );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( otp );
#endif
#ifdef STATIC_PLAIN
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( plain );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( plain );
#endif
#ifdef STATIC_SRP
extern SPECIFIC_SERVER_PLUG_INIT_PROTO( srp );
extern SPECIFIC_CLIENT_PLUG_INIT_PROTO( srp );
#endif
#ifdef STATIC_SASLDB
extern SPECIFIC_AUXPROP_PLUG_INIT_PROTO( sasldb );
#endif
#ifdef STATIC_SQL
extern SPECIFIC_AUXPROP_PLUG_INIT_PROTO( sql );
#endif
#ifdef STATIC_LDAPDB
extern SPECIFIC_AUXPROP_PLUG_INIT_PROTO( ldapdb );
#endif
_sasl_plug_rec _sasl_static_plugins[] = {
#ifdef STATIC_ANONYMOUS
SPECIFIC_SERVER_PLUG_INIT( anonymous, "ANONYMOUS" ),
SPECIFIC_CLIENT_PLUG_INIT( anonymous, "ANONYMOUS" ),
#endif
#ifdef STATIC_CRAMMD5
SPECIFIC_SERVER_PLUG_INIT( crammd5, "CRAM-MD5" ),
SPECIFIC_CLIENT_PLUG_INIT( crammd5, "CRAM-MD5" ),
#endif
#ifdef STATIC_DIGESTMD5
SPECIFIC_SERVER_PLUG_INIT( digestmd5, "DIGEST-MD5" ),
SPECIFIC_CLIENT_PLUG_INIT( digestmd5, "DIGEST-MD5" ),
#endif
#ifdef STATIC_GSSAPIV2
SPECIFIC_SERVER_PLUG_INIT( gssapiv2, "GSSAPI" ),
SPECIFIC_CLIENT_PLUG_INIT( gssapiv2, "GSSAPI" ),
#endif
#ifdef STATIC_KERBEROS4
SPECIFIC_SERVER_PLUG_INIT( kerberos4, "KERBEROS_V4" ),
SPECIFIC_CLIENT_PLUG_INIT( kerberos4, "KERBEROS_V4" ),
#endif
#ifdef STATIC_LOGIN
SPECIFIC_SERVER_PLUG_INIT( login, "LOGIN" ),
SPECIFIC_CLIENT_PLUG_INIT( login, "LOGIN" ),
#endif
#ifdef STATIC_NTLM
SPECIFIC_SERVER_PLUG_INIT( ntlm, "NTLM" ),
SPECIFIC_CLIENT_PLUG_INIT( ntlm, "NTLM" ),
#endif
#ifdef STATIC_OTP
SPECIFIC_SERVER_PLUG_INIT( otp, "OTP" ),
SPECIFIC_CLIENT_PLUG_INIT( otp, "OTP" ),
#endif
#ifdef STATIC_PLAIN
SPECIFIC_SERVER_PLUG_INIT( plain, "PLAIN" ),
SPECIFIC_CLIENT_PLUG_INIT( plain, "PLAIN" ),
#endif
#ifdef STATIC_SRP
SPECIFIC_SERVER_PLUG_INIT( srp, "SRP" ),
SPECIFIC_CLIENT_PLUG_INIT( srp, "SRP" ),
#endif
#ifdef STATIC_SASLDB
SPECIFIC_AUXPROP_PLUG_INIT( sasldb, "SASLDB" ),
#endif
#ifdef STATIC_SQL
SPECIFIC_AUXPROP_PLUG_INIT( sql, "SQL" ),
#endif
#ifdef STATIC_LDAPDB
SPECIFIC_AUXPROP_PLUG_INIT( ldapdb, "LDAPDB" ),
#endif
{ UNKNOWN, NULL, NULL }
};
-330
View File
@@ -1,330 +0,0 @@
/* windlopen.c--Windows dynamic loader interface
* Ryan Troll
* $Id: windlopen.c,v 1.17 2009/01/25 20:20:57 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <stdio.h>
#include <io.h>
#include <sys/stat.h>
#include <config.h>
#include <sasl.h>
#include "saslint.h"
#define DLL_SUFFIX ".dll"
#define DLL_MASK "*" DLL_SUFFIX
#define DLL_MASK_LEN 5
const int _is_sasl_server_static = 0;
/* : inefficient representation, but works */
typedef struct lib_list
{
struct lib_list *next;
HMODULE library;
} lib_list_t;
static lib_list_t *lib_list_head = NULL;
int _sasl_locate_entry(void *library,
const char *entryname,
void **entry_point)
{
if(entryname == NULL) {
_sasl_log(NULL, SASL_LOG_ERR,
"no entryname in _sasl_locate_entry");
return SASL_BADPARAM;
}
if(library == NULL) {
_sasl_log(NULL, SASL_LOG_ERR,
"no library in _sasl_locate_entry");
return SASL_BADPARAM;
}
if(entry_point == NULL) {
_sasl_log(NULL, SASL_LOG_ERR,
"no entrypoint output pointer in _sasl_locate_entry");
return SASL_BADPARAM;
}
*entry_point = GetProcAddress(library, entryname);
if (*entry_point == NULL) {
#if 0 /* This message appears to confuse people */
_sasl_log(NULL, SASL_LOG_DEBUG,
"unable to get entry point %s: %s", entryname,
GetLastError());
#endif
return SASL_FAIL;
}
return SASL_OK;
}
static int _sasl_plugin_load(char *plugin, void *library,
const char *entryname,
int (*add_plugin)(const char *, void *))
{
void *entry_point;
int result;
result = _sasl_locate_entry(library, entryname, &entry_point);
if(result == SASL_OK) {
result = add_plugin(plugin, entry_point);
if(result != SASL_OK)
_sasl_log(NULL, SASL_LOG_DEBUG,
"_sasl_plugin_load failed on %s for plugin: %s\n",
entryname, plugin);
}
return result;
}
/* loads a plugin library */
int _sasl_get_plugin(const char *file,
const sasl_callback_t *verifyfile_cb,
void **libraryptr)
{
int r = 0;
HINSTANCE library;
lib_list_t *newhead;
r = ((sasl_verifyfile_t *)(verifyfile_cb->proc))
(verifyfile_cb->context, file, SASL_VRFY_PLUGIN);
if (r != SASL_OK) return r;
newhead = sasl_ALLOC(sizeof(lib_list_t));
if (!newhead) return SASL_NOMEM;
if (!(library = LoadLibrary (file))) {
_sasl_log(NULL, SASL_LOG_ERR,
"unable to LoadLibrary %s: %s", file, GetLastError());
sasl_FREE(newhead);
return SASL_FAIL;
}
newhead->library = library;
newhead->next = lib_list_head;
lib_list_head = newhead;
*libraryptr = library;
return SASL_OK;
}
/* undoes actions done by _sasl_get_plugin */
void _sasl_remove_last_plugin()
{
lib_list_t *last_plugin = lib_list_head;
lib_list_head = lib_list_head->next;
if (last_plugin->library) {
FreeLibrary(last_plugin->library);
}
sasl_FREE(last_plugin);
}
/* gets the list of mechanisms */
int _sasl_load_plugins(const add_plugin_list_t *entrypoints,
const sasl_callback_t *getpath_cb,
const sasl_callback_t *verifyfile_cb)
{
int result;
char cur_dir[PATH_MAX], full_name[PATH_MAX+2], prefix[PATH_MAX+2];
/* 1 for '\\' 1 for trailing '\0' */
char * pattern;
char c;
int pos;
const char *path=NULL;
int position;
const add_plugin_list_t *cur_ep;
struct stat statbuf; /* filesystem entry information */
intptr_t fhandle; /* file handle for _findnext function */
struct _finddata_t finddata; /* data returned by _findnext() */
size_t prefix_len;
if (! entrypoints
|| ! getpath_cb
|| getpath_cb->id != SASL_CB_GETPATH
|| ! getpath_cb->proc
|| ! verifyfile_cb
|| verifyfile_cb->id != SASL_CB_VERIFYFILE
|| ! verifyfile_cb->proc)
return SASL_BADPARAM;
/* get the path to the plugins */
result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
&path);
if (result != SASL_OK) return result;
if (! path) return SASL_FAIL;
if (strlen(path) >= PATH_MAX) { /* no you can't buffer overrun */
return SASL_FAIL;
}
position=0;
do {
pos=0;
do {
c=path[position];
position++;
cur_dir[pos]=c;
pos++;
} while ((c!=PATHS_DELIMITER) && (c!=0));
cur_dir[pos-1]='\0';
/* : check to make sure that a valid directory name was passed in */
if (stat (cur_dir, &statbuf) < 0) {
continue;
}
if ((statbuf.st_mode & S_IFDIR) == 0) {
continue;
}
strcpy (prefix, cur_dir);
prefix_len = strlen (prefix);
/* : Don't append trailing \ unless required */
if (prefix[prefix_len-1] != '\\') {
strcat (prefix,"\\");
prefix_len++;
}
pattern = prefix;
/* : Check that we have enough space for "*.dll" */
if ((prefix_len + DLL_MASK_LEN) > (sizeof(prefix) - 1)) {
_sasl_log(NULL, SASL_LOG_WARN, "plugin search mask is too big");
continue;
}
strcat (prefix + prefix_len, "*" DLL_SUFFIX);
fhandle = _findfirst (pattern, &finddata);
if (fhandle == -1) { /* no matching files */
continue;
}
/* : Truncate "*.dll" */
prefix[prefix_len] = '\0';
do {
size_t length;
void *library;
char *c;
char plugname[PATH_MAX];
int entries;
length = strlen(finddata.name);
if (length < 5) { /* At least <Ch>.dll */
continue; /* can not possibly be what we're looking for */
}
/* : Check for overflow */
if (length + prefix_len >= PATH_MAX) continue; /* too big */
if (stricmp(finddata.name + (length - strlen(DLL_SUFFIX)), DLL_SUFFIX) != 0) {
continue;
}
/* : Check that it is not a directory */
if ((finddata.attrib & _A_SUBDIR) == _A_SUBDIR) {
continue;
}
/* : Construct full name from prefix and name */
strcpy (full_name, prefix);
strcat (full_name, finddata.name);
/* cut off .dll suffix -- this only need be approximate */
strcpy (plugname, finddata.name);
c = strrchr(plugname, '.');
if (c != NULL) *c = '\0';
result = _sasl_get_plugin (full_name, verifyfile_cb, &library);
if (result != SASL_OK) {
continue;
}
entries = 0;
for (cur_ep = entrypoints; cur_ep->entryname; cur_ep++) {
result = _sasl_plugin_load(plugname,
library,
cur_ep->entryname,
cur_ep->add_plugin);
if (result == SASL_OK) {
++entries;
}
/* If this fails, it's not the end of the world */
}
if (entries == 0) {
_sasl_remove_last_plugin();
}
} while (_findnext (fhandle, &finddata) == 0);
_findclose (fhandle);
} while ((c!='=') && (c!=0));
return SASL_OK;
}
int
_sasl_done_with_plugins(void)
{
lib_list_t *libptr, *libptr_next;
for(libptr = lib_list_head; libptr; libptr = libptr_next) {
libptr_next = libptr->next;
if (libptr->library != NULL) {
FreeLibrary(libptr->library);
}
sasl_FREE(libptr);
}
lib_list_head = NULL;
return SASL_OK;
}
@@ -1,158 +0,0 @@
# Makefile.am for the SASL plugins
# Rob Siemborski
# Rob Earhart
# $Id: Makefile.am,v 1.86 2011/09/05 14:18:10 murch Exp $
#
################################################################
# Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
################################################################
# Library version info - here at the top, for sanity
# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
# CURRENT:REVISION:AGE
plugin_version = 3:0:0
INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
EXTRA_DIST = makeinit.sh NTMakefile
noinst_SCRIPTS = makeinit.sh
LIB_MYSQL = @LIB_MYSQL@
plugindir = @plugindir@
common_sources = plugin_common.c plugin_common.h
sasldir = $(prefix)/lib/sasl2
sasl_LTLIBRARIES = @SASL_MECHS@
EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
libscram.la libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
libanonymous_la_LIBADD = $(COMPAT_OBJS)
libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
libgs2_la_SOURCES = gs2.c gs2_init.c gs2_token.c gs2_token.h $(common_sources)
libgs2_la_DEPENDENCIES = $(COMPAT_OBJS)
libgs2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources)
libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS)
libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
libcrammd5_la_LIBADD = $(COMPAT_OBJS)
libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
libscram_la_SOURCES = scram.c scram_init.c $(common_sources)
libscram_la_DEPENDENCIES = $(COMPAT_OBJS)
libscram_la_LIBADD = $(SCRAM_LIBS) $(COMPAT_OBJS)
liblogin_la_SOURCES = login.c login_init.c $(common_sources)
liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
# Auxprop Plugins
libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
libldapdb_la_LIBADD = $(LIB_LDAP) $(COMPAT_OBJS)
libsql_la_SOURCES = sql.c sql_init.c $(common_sources)
libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) $(LIB_SQLITE3) \
$(AM_LDFLAGS)
libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
libsql_la_LIBADD = $(COMPAT_OBJS)
# Instructions for making the _init files
init_src=anonymous_init.c crammd5_init.c digestmd5_init.c scram_init.c gs2_init.c gssapiv2_init.c \
kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
CLEANFILES=$(init_src)
${init_src}: $(srcdir)/makeinit.sh
$(SHELL) $(srcdir)/makeinit.sh
# Compatibility function build rules (they build in lib/)
$(COMPAT_OBJS):
rm -f $(COMPAT_OBJS)
cd ../lib; $(MAKE) $(COMPAT_OBJS)
for file in $(COMPAT_OBJS); do ln -s ../lib/$$file .; done
@@ -1,818 +0,0 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for the SASL plugins
# Rob Siemborski
# Rob Earhart
# $Id: Makefile.am,v 1.86 2011/09/05 14:18:10 murch Exp $
#
################################################################
# Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The name "Carnegie Mellon University" must not be used to
# endorse or promote products derived from this software without
# prior written permission. For permission or any other legal
# details, please contact
# Office of Technology Transfer
# Carnegie Mellon University
# 5000 Forbes Avenue
# Pittsburgh, PA 15213-3890
# (412) 268-4387, fax: (412) 268-7395
# tech-transfer@andrew.cmu.edu
#
# 4. Redistributions of any form whatsoever must retain the following
# acknowledgment:
# "This product includes software developed by Computing Services
# at Carnegie Mellon University (http://www.cmu.edu/computing/)."
#
# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
################################################################
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = plugins
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
$(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
$(top_srcdir)/config/sasldb.m4 \
$(top_srcdir)/cmulocal/berkdb.m4 \
$(top_srcdir)/cmulocal/bsd_sockets.m4 \
$(top_srcdir)/cmulocal/c-attribute.m4 \
$(top_srcdir)/cmulocal/common.m4 \
$(top_srcdir)/cmulocal/cyrus.m4 \
$(top_srcdir)/cmulocal/init_automake.m4 \
$(top_srcdir)/cmulocal/ipv6.m4 \
$(top_srcdir)/cmulocal/openldap.m4 \
$(top_srcdir)/cmulocal/openssl.m4 \
$(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(sasldir)"
LTLIBRARIES = $(sasl_LTLIBRARIES)
am__DEPENDENCIES_1 =
am__objects_1 = plugin_common.lo
am_libanonymous_la_OBJECTS = anonymous.lo anonymous_init.lo \
$(am__objects_1)
libanonymous_la_OBJECTS = $(am_libanonymous_la_OBJECTS)
am_libcrammd5_la_OBJECTS = cram.lo crammd5_init.lo $(am__objects_1)
libcrammd5_la_OBJECTS = $(am_libcrammd5_la_OBJECTS)
am_libdigestmd5_la_OBJECTS = digestmd5.lo digestmd5_init.lo \
$(am__objects_1)
libdigestmd5_la_OBJECTS = $(am_libdigestmd5_la_OBJECTS)
am_libgs2_la_OBJECTS = gs2.lo gs2_init.lo gs2_token.lo \
$(am__objects_1)
libgs2_la_OBJECTS = $(am_libgs2_la_OBJECTS)
am_libgssapiv2_la_OBJECTS = gssapi.lo gssapiv2_init.lo \
$(am__objects_1)
libgssapiv2_la_OBJECTS = $(am_libgssapiv2_la_OBJECTS)
am_libkerberos4_la_OBJECTS = kerberos4.lo kerberos4_init.lo \
$(am__objects_1)
libkerberos4_la_OBJECTS = $(am_libkerberos4_la_OBJECTS)
am_libldapdb_la_OBJECTS = ldapdb.lo ldapdb_init.lo $(am__objects_1)
libldapdb_la_OBJECTS = $(am_libldapdb_la_OBJECTS)
am_liblogin_la_OBJECTS = login.lo login_init.lo $(am__objects_1)
liblogin_la_OBJECTS = $(am_liblogin_la_OBJECTS)
am_libntlm_la_OBJECTS = ntlm.lo ntlm_init.lo $(am__objects_1)
libntlm_la_OBJECTS = $(am_libntlm_la_OBJECTS)
am_libotp_la_OBJECTS = otp.lo otp_init.lo $(am__objects_1)
libotp_la_OBJECTS = $(am_libotp_la_OBJECTS)
am_libpassdss_la_OBJECTS = passdss.lo passdss_init.lo $(am__objects_1)
libpassdss_la_OBJECTS = $(am_libpassdss_la_OBJECTS)
am_libplain_la_OBJECTS = plain.lo plain_init.lo $(am__objects_1)
libplain_la_OBJECTS = $(am_libplain_la_OBJECTS)
am_libsasldb_la_OBJECTS = sasldb.lo sasldb_init.lo $(am__objects_1)
libsasldb_la_OBJECTS = $(am_libsasldb_la_OBJECTS)
am_libscram_la_OBJECTS = scram.lo scram_init.lo $(am__objects_1)
libscram_la_OBJECTS = $(am_libscram_la_OBJECTS)
am_libsql_la_OBJECTS = sql.lo sql_init.lo $(am__objects_1)
libsql_la_OBJECTS = $(am_libsql_la_OBJECTS)
libsql_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libsql_la_LDFLAGS) $(LDFLAGS) -o $@
am_libsrp_la_OBJECTS = srp.lo srp_init.lo $(am__objects_1)
libsrp_la_OBJECTS = $(am_libsrp_la_OBJECTS)
SCRIPTS = $(noinst_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libanonymous_la_SOURCES) $(libcrammd5_la_SOURCES) \
$(libdigestmd5_la_SOURCES) $(libgs2_la_SOURCES) \
$(libgssapiv2_la_SOURCES) $(libkerberos4_la_SOURCES) \
$(libldapdb_la_SOURCES) $(liblogin_la_SOURCES) \
$(libntlm_la_SOURCES) $(libotp_la_SOURCES) \
$(libpassdss_la_SOURCES) $(libplain_la_SOURCES) \
$(libsasldb_la_SOURCES) $(libscram_la_SOURCES) \
$(libsql_la_SOURCES) $(libsrp_la_SOURCES)
DIST_SOURCES = $(libanonymous_la_SOURCES) $(libcrammd5_la_SOURCES) \
$(libdigestmd5_la_SOURCES) $(libgs2_la_SOURCES) \
$(libgssapiv2_la_SOURCES) $(libkerberos4_la_SOURCES) \
$(libldapdb_la_SOURCES) $(liblogin_la_SOURCES) \
$(libntlm_la_SOURCES) $(libotp_la_SOURCES) \
$(libpassdss_la_SOURCES) $(libplain_la_SOURCES) \
$(libsasldb_la_SOURCES) $(libscram_la_SOURCES) \
$(libsql_la_SOURCES) $(libsrp_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DIRS = @DIRS@
DMALLOC_LIBS = @DMALLOC_LIBS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GETADDRINFOOBJS = @GETADDRINFOOBJS@
GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
GETSUBOPT = @GETSUBOPT@
GREP = @GREP@
GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
GSSAPI_LIBS = @GSSAPI_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPCTYPE = @IPCTYPE@
JAVAC = @JAVAC@
JAVADOC = @JAVADOC@
JAVAH = @JAVAH@
JAVAROOT = @JAVAROOT@
JAVA_INCLUDES = @JAVA_INCLUDES@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIB_CRYPT = @LIB_CRYPT@
LIB_DES = @LIB_DES@
LIB_DOOR = @LIB_DOOR@
LIB_LDAP = @LIB_LDAP@
LIB_MYSQL = @LIB_MYSQL@
LIB_PGSQL = @LIB_PGSQL@
LIB_SOCKET = @LIB_SOCKET@
LIB_SQLITE = @LIB_SQLITE@
LIB_SQLITE3 = @LIB_SQLITE3@
LN_S = @LN_S@
LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
LTLIBOBJS = @LTLIBOBJS@
LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NM = @NM@
NTLM_LIBS = @NTLM_LIBS@
OBJEXT = @OBJEXT@
OTP_LIBS = @OTP_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PASSDSS_LIBS = @PASSDSS_LIBS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PLAIN_LIBS = @PLAIN_LIBS@
PURECOV = @PURECOV@
PURIFY = @PURIFY@
PWCHECKMETH = @PWCHECKMETH@
RANLIB = @RANLIB@
SASL_DB_BACKEND = @SASL_DB_BACKEND@
SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
SASL_DB_INC = @SASL_DB_INC@
SASL_DB_LIB = @SASL_DB_LIB@
SASL_DB_MANS = @SASL_DB_MANS@
SASL_DB_UTILS = @SASL_DB_UTILS@
SASL_DL_LIB = @SASL_DL_LIB@
SASL_KRB_LIB = @SASL_KRB_LIB@
SASL_MECHS = @SASL_MECHS@
SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
SCRAM_LIBS = @SCRAM_LIBS@
SET_MAKE = @SET_MAKE@
SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
SHELL = @SHELL@
SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
SNPRINTFOBJS = @SNPRINTFOBJS@
SRP_LIBS = @SRP_LIBS@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
configdir = @configdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
plugindir = @plugindir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Library version info - here at the top, for sanity
# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
# CURRENT:REVISION:AGE
plugin_version = 3:0:0
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
EXTRA_DIST = makeinit.sh NTMakefile
noinst_SCRIPTS = makeinit.sh
common_sources = plugin_common.c plugin_common.h
sasldir = $(prefix)/lib/sasl2
sasl_LTLIBRARIES = @SASL_MECHS@
EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
libscram.la libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
libanonymous_la_LIBADD = $(COMPAT_OBJS)
libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
libgs2_la_SOURCES = gs2.c gs2_init.c gs2_token.c gs2_token.h $(common_sources)
libgs2_la_DEPENDENCIES = $(COMPAT_OBJS)
libgs2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources)
libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS)
libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
libcrammd5_la_LIBADD = $(COMPAT_OBJS)
libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
libscram_la_SOURCES = scram.c scram_init.c $(common_sources)
libscram_la_DEPENDENCIES = $(COMPAT_OBJS)
libscram_la_LIBADD = $(SCRAM_LIBS) $(COMPAT_OBJS)
liblogin_la_SOURCES = login.c login_init.c $(common_sources)
liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
# Auxprop Plugins
libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
libldapdb_la_LIBADD = $(LIB_LDAP) $(COMPAT_OBJS)
libsql_la_SOURCES = sql.c sql_init.c $(common_sources)
libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) $(LIB_SQLITE3) \
$(AM_LDFLAGS)
libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
libsql_la_LIBADD = $(COMPAT_OBJS)
# Instructions for making the _init files
init_src = anonymous_init.c crammd5_init.c digestmd5_init.c scram_init.c gs2_init.c gssapiv2_init.c \
kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
CLEANFILES = $(init_src)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu plugins/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-saslLTLIBRARIES: $(sasl_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(sasldir)" || $(MKDIR_P) "$(DESTDIR)$(sasldir)"
@list='$(sasl_LTLIBRARIES)'; test -n "$(sasldir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(sasldir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(sasldir)"; \
}
uninstall-saslLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(sasl_LTLIBRARIES)'; test -n "$(sasldir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(sasldir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(sasldir)/$$f"; \
done
clean-saslLTLIBRARIES:
-test -z "$(sasl_LTLIBRARIES)" || rm -f $(sasl_LTLIBRARIES)
@list='$(sasl_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libanonymous.la: $(libanonymous_la_OBJECTS) $(libanonymous_la_DEPENDENCIES)
$(LINK) $(libanonymous_la_OBJECTS) $(libanonymous_la_LIBADD) $(LIBS)
libcrammd5.la: $(libcrammd5_la_OBJECTS) $(libcrammd5_la_DEPENDENCIES)
$(LINK) $(libcrammd5_la_OBJECTS) $(libcrammd5_la_LIBADD) $(LIBS)
libdigestmd5.la: $(libdigestmd5_la_OBJECTS) $(libdigestmd5_la_DEPENDENCIES)
$(LINK) $(libdigestmd5_la_OBJECTS) $(libdigestmd5_la_LIBADD) $(LIBS)
libgs2.la: $(libgs2_la_OBJECTS) $(libgs2_la_DEPENDENCIES)
$(LINK) $(libgs2_la_OBJECTS) $(libgs2_la_LIBADD) $(LIBS)
libgssapiv2.la: $(libgssapiv2_la_OBJECTS) $(libgssapiv2_la_DEPENDENCIES)
$(LINK) $(libgssapiv2_la_OBJECTS) $(libgssapiv2_la_LIBADD) $(LIBS)
libkerberos4.la: $(libkerberos4_la_OBJECTS) $(libkerberos4_la_DEPENDENCIES)
$(LINK) $(libkerberos4_la_OBJECTS) $(libkerberos4_la_LIBADD) $(LIBS)
libldapdb.la: $(libldapdb_la_OBJECTS) $(libldapdb_la_DEPENDENCIES)
$(LINK) $(libldapdb_la_OBJECTS) $(libldapdb_la_LIBADD) $(LIBS)
liblogin.la: $(liblogin_la_OBJECTS) $(liblogin_la_DEPENDENCIES)
$(LINK) $(liblogin_la_OBJECTS) $(liblogin_la_LIBADD) $(LIBS)
libntlm.la: $(libntlm_la_OBJECTS) $(libntlm_la_DEPENDENCIES)
$(LINK) $(libntlm_la_OBJECTS) $(libntlm_la_LIBADD) $(LIBS)
libotp.la: $(libotp_la_OBJECTS) $(libotp_la_DEPENDENCIES)
$(LINK) $(libotp_la_OBJECTS) $(libotp_la_LIBADD) $(LIBS)
libpassdss.la: $(libpassdss_la_OBJECTS) $(libpassdss_la_DEPENDENCIES)
$(LINK) $(libpassdss_la_OBJECTS) $(libpassdss_la_LIBADD) $(LIBS)
libplain.la: $(libplain_la_OBJECTS) $(libplain_la_DEPENDENCIES)
$(LINK) $(libplain_la_OBJECTS) $(libplain_la_LIBADD) $(LIBS)
libsasldb.la: $(libsasldb_la_OBJECTS) $(libsasldb_la_DEPENDENCIES)
$(LINK) $(libsasldb_la_OBJECTS) $(libsasldb_la_LIBADD) $(LIBS)
libscram.la: $(libscram_la_OBJECTS) $(libscram_la_DEPENDENCIES)
$(LINK) $(libscram_la_OBJECTS) $(libscram_la_LIBADD) $(LIBS)
libsql.la: $(libsql_la_OBJECTS) $(libsql_la_DEPENDENCIES)
$(libsql_la_LINK) $(libsql_la_OBJECTS) $(libsql_la_LIBADD) $(LIBS)
libsrp.la: $(libsrp_la_OBJECTS) $(libsrp_la_DEPENDENCIES)
$(LINK) $(libsrp_la_OBJECTS) $(libsrp_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anonymous.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anonymous_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cram.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crammd5_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digestmd5.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digestmd5_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gs2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gs2_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gs2_token.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapiv2_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kerberos4.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kerberos4_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldapdb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldapdb_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntlm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntlm_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passdss.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passdss_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_common.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasldb.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasldb_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scram.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scram_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sql.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sql_init.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srp_init.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(SCRIPTS)
installdirs:
for dir in "$(DESTDIR)$(sasldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-saslLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-saslLTLIBRARIES
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-saslLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-saslLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-saslLTLIBRARIES install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-saslLTLIBRARIES
${init_src}: $(srcdir)/makeinit.sh
$(SHELL) $(srcdir)/makeinit.sh
# Compatibility function build rules (they build in lib/)
$(COMPAT_OBJS):
rm -f $(COMPAT_OBJS)
cd ../lib; $(MAKE) $(COMPAT_OBJS)
for file in $(COMPAT_OBJS); do ln -s ../lib/$$file .; done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
@@ -1,325 +0,0 @@
!INCLUDE ..\win32\common.mak
SCRAM=1
!IF "$(NTLM)" == "1"
PLUGINS_EXT=saslNTLM.dll
!ELSE
PLUGINS_EXT=
!ENDIF
!IF "$(GSSAPI)" == "CyberSafe"
PLUGINS_EXT=$(PLUGINS_EXT) saslGSSAPI.dll
!ENDIF
!IF "$(SRP)" == "1"
PLUGINS_EXT=$(PLUGINS_EXT) saslSRP.dll
!IF "$(DO_SRP_SETPASS)" == "1"
SRP_FLAGS=/DDO_SRP_SETPASS=1
!ENDIF
!ENDIF
!IF "$(OTP)" == "1"
PLUGINS_EXT=$(PLUGINS_EXT) saslOTP.dll
!ENDIF
!IF "$(LDAP)" == "1"
PLUGINS_EXT=$(PLUGINS_EXT) saslLDAPDB.dll
# NB: linking to libsasl itself!!!
LDAP_FLAGS = /I $(LDAP_INCLUDE)
LDAP_LIBS = $(LDAP_LIB_BASE)\olber32.lib $(LDAP_LIB_BASE)\oldap32.lib ..\lib\libsasl.lib
!ENDIF
!IF "$(SQL)" == "SQLITE"
PLUGINS_EXT=$(PLUGINS_EXT) saslSQLITE.dll
SQL_FLAGS= $(SQLITE_INCLUDES) /DHAVE_SQLITE=1
SQLITE_LIBS = /libpath:$(SQLITE_LIBPATH) libsqlite.lib
!ENDIF
!IF "$(SQL)" == "SQLITE3"
PLUGINS_EXT=$(PLUGINS_EXT) saslSQLITE.dll
SQL_FLAGS= $(SQLITE_INCLUDES3) /DHAVE_SQLITE3=1
SQLITE_LIBS = /libpath:$(SQLITE_LIBPATH3) libsqlite3.lib
!ENDIF
PLUGINS=saslANONYMOUS.dll \
saslPLAIN.dll \
saslCRAMMD5.dll \
saslDIGESTMD5.dll \
saslLOGIN.dll \
saslSCRAM.dll \
$(PLUGINS_EXT) \
saslSASLDB.dll
generated_rc=saslANONYMOUS.rc saslPLAIN.rc saslCRAMMD5.rc saslDIGESTMD5.rc saslLOGIN.rc saslNTLM.rc saslSCRAM.rc saslGSSAPI.rc saslSRP.rc saslOTP.rc saslSASLDB.rc saslSQLITE.rc saslLDAPDB.rc
# WS2tcpip.h included in Visual Studio 7 provides getaddrinfo, ...
# emulation on Windows, so there is no need to build getaddrinfo.c
!IF "$(VCVER)" == "6"
compat_sources = getaddrinfo.c getnameinfo.c
compat_objs = getaddrinfo.obj getnameinfo.obj
!ENDIF
common_sources = plugin_common.c plugin_common.h
common_objs = plugin_common.obj $(compat_objs)
saslANONYMOUS_sources = anonymous.c anonymous_init.c $(common_sources)
saslANONYMOUS_objs = anonymous.obj anonymous_init.obj $(common_objs)
saslANONYMOUS_out = saslANONYMOUS.dll saslANONYMOUS.exp saslANONYMOUS.lib
saslPLAIN_sources = plain.c plain_init.c $(common_sources)
saslPLAIN_objs = plain.obj plain_init.obj $(common_objs)
saslPLAIN_out = saslPLAIN.dll saslPLAIN.exp saslPLAIN.lib
saslCRAMMD5_sources = cram.c crammd5_init.c $(common_sources)
saslCRAMMD5_objs = cram.obj crammd5_init.obj $(common_objs)
saslCRAMMD5_out = saslCRAMMD5.dll saslCRAMMD5.exp saslCRAMMD5.lib
saslDIGESTMD5_sources = digestmd5.c digestmd5_init.c $(common_sources)
saslDIGESTMD5_objs = digestmd5.obj digestmd5_init.obj $(common_objs)
saslDIGESTMD5_out = saslDIGESTMD5.dll saslDIGESTMD5.exp saslDIGESTMD5.lib
saslLOGIN_sources = login.c login_init.c $(common_sources)
saslLOGIN_objs = login.obj login_init.obj $(common_objs)
saslLOGIN_out = saslLOGIN.dll saslLOGIN.exp saslLOGIN.lib
saslSCRAM_sources = scram.c scram_init.c $(common_sources)
saslSCRAM_objs = scram.obj scram_init.obj $(common_objs)
saslSCRAM_out = saslSCRAM.dll saslSCRAM.exp saslSCRAM.lib
saslNTLM_sources = ntlm.c ntlm_init.c $(common_sources)
saslNTLM_objs = ntlm.obj ntlm_init.obj $(common_objs)
saslNTLM_out = saslNTLM.dll saslNTLM.exp saslNTLM.lib
saslGSSAPI_sources = gssapi.c gssapiv2_init.c $(common_sources)
saslGSSAPI_objs = gssapi.obj gssapiv2_init.obj $(common_objs)
saslGSSAPI_out = saslGSSAPI.dll saslGSSAPI.exp saslGSSAPI.lib
saslSRP_sources = srp.c srp_init.c $(common_sources)
saslSRP_objs = srp.obj srp_init.obj $(common_objs)
saslSRP_out = saslSRP.dll saslSRP.exp saslSRP.lib
saslOTP_sources = otp.c otp_init.c $(common_sources)
saslOTP_objs = otp.obj otp_init.obj $(common_objs)
saslOTP_out = saslOTP.dll saslOTP.exp saslOTP.lib
saslSQL_sources = sql.c sql_init.c $(common_sources)
saslSQL_objs = sql.obj sql_init.obj $(common_objs)
# saslSQL_out is an agregation of all generated files for all SQL plugins
saslSQL_out = saslSQLITE.dll saslSQLITE.exp saslSQLITE.lib
saslLDAPDB_sources = ldapdb.c $(common_sources)
saslLDAPDB_objs = ldapdb.obj $(common_objs)
saslLDAPDB_out = saslLDAPDB.dll saslLDAPDB.exp saslLDAPDB.lib
!IF "$(NTLM)" == "1" || "$(SRP)" == "1" || "$(OTP)" == "1" || "$(SCRAM)" == "1"
OPENSSL_FLAGS= /I $(OPENSSL_INCLUDE)
!ELSE
OPENSSL_FLAGS=
!ENDIF
!IF "$(GSSAPI)" == "CyberSafe"
GSS_FLAGS= /I $(GSSAPI_INCLUDE) /D "HAVE_GSS_C_NT_HOSTBASED_SERVICE" /D "HAVE_GSS_C_NT_USER_NAME"
GSS_LIBS=/libpath:$(GSSAPI_LIBPATH) gssapi32.lib
!ELSE
GSS_FLAGS=
GSS_LIBS=
!ENDIF
CRAM_FLAGS=/DOBSOLETE_CRAM_ATTR=1
DIGEST_FLAGS=/D "WITH_RC4"
# Auxprop Plugin
libsasldb_sources = allockey.c db_berkeley.c
libsasldb_objs = allockey.obj db_berkeley.obj
saslSASLDB_sources = sasldb.c sasldb_init.c $(libsasldb_sources) $(common_sources)
saslSASLDB_objs = sasldb.obj sasldb_init.obj $(libsasldb_objs) $(common_objs)
saslSASLDB_out = saslSASLDB.dll saslSASLDB.exp saslSASLDB.lib
all_objs = $(saslANONYMOUS_objs) $(saslPLAIN_objs) $(saslCRAMMD5_objs) $(saslDIGESTMD5_objs) $(saslLOGIN_objs) $(saslSCRAM_objs) $(saslNTLM_objs) $(saslGSSAPI_objs) $(saslSRP_objs) $(saslOTP_objs) $(saslSASLDB_objs) $(saslSQL_objs) $(saslLDAPDB_objs)
all_out = $(saslANONYMOUS_out) $(saslPLAIN_out) $(saslCRAMMD5_out) $(saslDIGESTMD5_out) $(saslLOGIN_out) $(saslSCRAM_out) $(saslNTLM_out) $(saslGSSAPI_out) $(saslSRP_out) $(saslOTP_out) $(saslSASLDB_out) $(saslSQL_out) $(saslLDAPDB_out)
# LIBSASL_EXPORTS is required to export additional DB routines from sasldb
DB_FLAGS = /I $(DB_INCLUDE) /I "..\sasldb" /D "LIBSASL_EXPORTS" /D "KEEP_DB_OPEN"
!IF $(TARGET_WIN_SYSTEM) >= 51
EXTRA_FLAGS = /D TARGET_WIN_SYSTEM=$(TARGET_WIN_SYSTEM) $(EXTRA_FLAGS)
!ENDIF
EXTRA_FLAGS=$(EXTRA_FLAGS) $(DB_FLAGS) $(OPENSSL_FLAGS) $(GSS_FLAGS) $(SRP_FLAGS) $(SQL_FLAGS) $(DIGEST_FLAGS) $(CRAM_FLAGS) $(LDAP_FLAGS)
CPPFLAGS = /I "..\win32\include" /I "." /I "..\include" $(EXTRA_FLAGS) /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL"
DB_LIBS=/libpath:$(DB_LIBPATH) $(DB_LIB)
OPENSSL_LIBS=/libpath:$(OPENSSL_LIBPATH) libeay32.lib ssleay32.lib
# Where to install files from this directory
libdir = $(prefix)\lib
bindir = $(prefix)\bin\sasl2
all : all-recursive
#
# /I flag to xcopy tells to treat the last parameter as directory and create all missing levels
#
# In order to force xcopy not to confirm if the second parameter is file or directory,
# the first parameter has to contain a wildcard character. For example, we use libsasl.l*,
# instead of libsasl.lib. Ugly, but works!
#
# Note, that we will copy all dlls here, not just $(PLUGINS). This is a bug, but it allows
# us to copy GSSAPI plugin, which might not be in $(PLUGINS).
#
install: $(PLUGINS)
@xcopy *.dll $(bindir) /I /F /Y
all-recursive : $(PLUGINS)
getaddrinfo.c: ..\lib\getaddrinfo.c
xcopy /D /Y ..\lib\getaddrinfo.c .
getnameinfo.c: ..\lib\getnameinfo.c
xcopy /D /Y ..\lib\getnameinfo.c .
allockey.c: ..\sasldb\allockey.c
xcopy /D /Y ..\sasldb\allockey.c .
db_berkeley.c: ..\sasldb\db_berkeley.c
xcopy /D /Y ..\sasldb\db_berkeley.c .
#Add /pdb: option?
saslANONYMOUS.dll: $(saslANONYMOUS_objs) saslANONYMOUS.res
$(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"saslANONYMOUS.dll" /implib:"saslANONYMOUS.lib" $(saslANONYMOUS_objs) saslANONYMOUS.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslPLAIN.dll: $(saslPLAIN_objs) saslPLAIN.res
$(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"saslPLAIN.dll" /implib:"saslPLAIN.lib" $(saslPLAIN_objs) saslPLAIN.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslCRAMMD5.dll: $(saslCRAMMD5_objs) saslCRAMMD5.res
$(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"saslCRAMMD5.dll" /implib:"saslCRAMMD5.lib" $(saslCRAMMD5_objs) saslCRAMMD5.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslDIGESTMD5.dll: $(saslDIGESTMD5_objs) saslDIGESTMD5.res
$(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"saslDIGESTMD5.dll" /implib:"saslDIGESTMD5.lib" $(saslDIGESTMD5_objs) saslDIGESTMD5.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslLOGIN.dll: $(saslLOGIN_objs) saslLOGIN.res
$(LINK32DLL) @<< $(LINK32DLL_FLAGS) /out:"saslLOGIN.dll" /implib:"saslLOGIN.lib" $(saslLOGIN_objs) saslLOGIN.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslSCRAM.dll: $(saslSCRAM_objs) saslSCRAM.res
$(LINK32DLL) @<< $(OPENSSL_LIBS) $(LINK32DLL_FLAGS) /out:"saslSCRAM.dll" /implib:"saslSCRAM.lib" $(saslSCRAM_objs) saslSCRAM.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslNTLM.dll: $(saslNTLM_objs) saslNTLM.res
$(LINK32DLL) @<< $(OPENSSL_LIBS) $(LINK32DLL_FLAGS) /out:"saslNTLM.dll" /implib:"saslNTLM.lib" $(saslNTLM_objs) saslNTLM.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslGSSAPI.dll: $(saslGSSAPI_objs) saslGSSAPI.res
$(LINK32DLL) @<< $(GSS_LIBS) $(LINK32DLL_FLAGS) /out:"saslGSSAPI.dll" /implib:"saslGSSAPI.lib" $(saslGSSAPI_objs) saslGSSAPI.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslSRP.dll: $(saslSRP_objs) saslSRP.res
$(LINK32DLL) @<< $(OPENSSL_LIBS) $(LINK32DLL_FLAGS) /out:"saslSRP.dll" /implib:"saslSRP.lib" $(saslSRP_objs) saslSRP.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslOTP.dll: $(saslOTP_objs) saslOTP.res
$(LINK32DLL) @<< $(OPENSSL_LIBS) $(LINK32DLL_FLAGS) /out:"saslOTP.dll" /implib:"saslOTP.lib" $(saslOTP_objs) saslOTP.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslSASLDB.dll: $(saslSASLDB_objs) saslSASLDB.res
$(LINK32DLL) @<< $(DB_LIBS) $(LINK32DLL_FLAGS) /out:"saslSASLDB.dll" /implib:"saslSASLDB.lib" $(saslSASLDB_objs) saslSASLDB.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslSQLITE.dll: $(saslSQL_objs) saslSQLITE.res
$(LINK32DLL) @<< $(SQLITE_LIBS) $(LINK32DLL_FLAGS) /out:"saslSQLITE.dll" /implib:"saslSQLITE.lib" $(saslSQL_objs) saslSQLITE.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
saslLDAPDB.dll: $(saslLDAPDB_objs) saslLDAPDB.res
$(LINK32DLL) @<< $(LDAP_LIBS) $(OPENSSL_LIBS) $(LINK32DLL_FLAGS) /out:"saslLDAPDB.dll" /implib:"saslLDAPDB.lib" $(saslLDAPDB_objs) saslLDAPDB.res
<<
IF EXIST $@.manifest mt -manifest $@.manifest -outputresource:$@;2
CLEAN :
-@erase $(all_objs)
-@erase "*.idb"
-@erase "*.pdb"
-@erase "*.manifest"
-@erase getaddrinfo.c
-@erase allockey.c
-@erase db_berkeley.c
-@erase getnameinfo.c
-@erase $(generated_rc)
-@erase "*.res"
-@erase $(all_out)
.c.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.rc.res:
rc $<
$(generated_rc):
copy <<temp.rc $@
#include "windows.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION $(SASL_VERSION_MAJOR),$(SASL_VERSION_MINOR),$(SASL_VERSION_STEP),0
PRODUCTVERSION $(SASL_VERSION_MAJOR),$(SASL_VERSION_MINOR),$(SASL_VERSION_STEP),0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Carnegie Mellon University\0"
VALUE "FileDescription", "CMU SASL $(@B) plugin\0"
VALUE "FileVersion", "$(SASL_VERSION_MAJOR).$(SASL_VERSION_MINOR).$(SASL_VERSION_STEP).0\0"
VALUE "InternalName", "$(@B)\0"
VALUE "LegalCopyright", "Copyright (c) Carnegie Mellon University 2002-2012\0"
VALUE "OriginalFilename", "$(@B).dll\0"
VALUE "ProductName", "Carnegie Mellon University SASL\0"
VALUE "ProductVersion", "$(SASL_VERSION_MAJOR).$(SASL_VERSION_MINOR).$(SASL_VERSION_STEP)-0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
<<
@@ -1,390 +0,0 @@
/* Anonymous SASL plugin
* Rob Siemborski
* Tim Martin
* $Id: anonymous.c,v 1.53 2009/02/13 14:46:47 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sasl.h>
#include <saslplug.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_anonymous_plugin_decl.h>
#endif
/***************************** Common Section *****************************/
static const char plugin_id[] = "$Id: anonymous.c,v 1.53 2009/02/13 14:46:47 mel Exp $";
static const char anonymous_id[] = "anonymous";
/***************************** Server Section *****************************/
static int
anonymous_server_mech_new(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *challenge __attribute__((unused)),
unsigned challen __attribute__((unused)),
void **conn_context)
{
/* holds state are in */
if (!conn_context) {
PARAMERROR( sparams->utils );
return SASL_BADPARAM;
}
*conn_context = NULL;
return SASL_OK;
}
static int
anonymous_server_mech_step(void *conn_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams)
{
char *clientdata;
int result;
if (!sparams
|| !serverout
|| !serveroutlen
|| !oparams) {
PARAMERROR( sparams->utils );
return SASL_BADPARAM;
}
*serverout = NULL;
*serveroutlen = 0;
if (!clientin) {
return SASL_CONTINUE;
}
/* We force a truncation 255 characters (specified by RFC 2245) */
if (clientinlen > 255) clientinlen = 255;
/* NULL-terminate the clientin... */
clientdata = sparams->utils->malloc(clientinlen + 1);
if (!clientdata) {
MEMERROR(sparams->utils);
return SASL_NOMEM;
}
strncpy(clientdata, clientin, clientinlen);
clientdata[clientinlen] = '\0';
sparams->utils->log(sparams->utils->conn,
SASL_LOG_NOTE,
"ANONYMOUS login: \"%s\"",
clientdata);
if (clientdata != clientin)
sparams->utils->free(clientdata);
result = sparams->canon_user(sparams->utils->conn,
anonymous_id, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) return result;
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
}
static sasl_server_plug_t anonymous_server_plugins[] =
{
{
"ANONYMOUS", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOPLAINTEXT, /* security_flags */
SASL_FEAT_WANT_CLIENT_FIRST
| SASL_FEAT_DONTUSE_USERPASSWD, /* features */
NULL, /* glob_context */
&anonymous_server_mech_new, /* mech_new */
&anonymous_server_mech_step, /* mech_step */
NULL, /* mech_dispose */
NULL, /* mech_free */
NULL, /* setpass */
NULL, /* user_query */
NULL, /* idle */
NULL, /* mech_avail */
NULL /* spare */
}
};
int anonymous_server_plug_init(const sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_SERVER_PLUG_VERSION) {
SETERROR( utils, "ANONYMOUS version mismatch" );
return SASL_BADVERS;
}
*out_version = SASL_SERVER_PLUG_VERSION;
*pluglist = anonymous_server_plugins;
*plugcount = 1;
return SASL_OK;
}
/***************************** Client Section *****************************/
typedef struct client_context {
char *out_buf;
unsigned out_buf_len;
} client_context_t;
static int
anonymous_client_mech_new(void *glob_context __attribute__((unused)),
sasl_client_params_t *cparams,
void **conn_context)
{
client_context_t *text;
if (!conn_context) {
PARAMERROR(cparams->utils);
return SASL_BADPARAM;
}
/* holds state are in */
text = cparams->utils->malloc(sizeof(client_context_t));
if (text == NULL) {
MEMERROR(cparams->utils);
return SASL_NOMEM;
}
memset(text, 0, sizeof(client_context_t));
*conn_context = text;
return SASL_OK;
}
static int
anonymous_client_mech_step(void *conn_context,
sasl_client_params_t *cparams,
const char *serverin __attribute__((unused)),
unsigned serverinlen,
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams)
{
client_context_t *text = (client_context_t *) conn_context;
size_t userlen;
char hostname[256];
const char *user = NULL;
int user_result = SASL_OK;
int result;
if (!cparams
|| !clientout
|| !clientoutlen
|| !oparams) {
PARAMERROR( cparams->utils );
return SASL_BADPARAM;
}
*clientout = NULL;
*clientoutlen = 0;
if (serverinlen != 0) {
SETERROR( cparams->utils,
"Nonzero serverinlen in ANONYMOUS continue_step" );
return SASL_BADPROT;
}
/* check if sec layer strong enough */
if (cparams->props.min_ssf > cparams->external_ssf) {
SETERROR( cparams->utils, "SSF requested of ANONYMOUS plugin");
return SASL_TOOWEAK;
}
/* try to get the trace info */
if (user == NULL) {
user_result = _plug_get_userid(cparams->utils, &user, prompt_need);
if ((user_result != SASL_OK) && (user_result != SASL_INTERACT)) {
return user_result;
}
}
/* free prompts we got */
if (prompt_need && *prompt_need) {
cparams->utils->free(*prompt_need);
*prompt_need = NULL;
}
/* if there are prompts not filled in */
if (user_result == SASL_INTERACT) {
/* make the prompt list */
result =
_plug_make_prompts(cparams->utils, prompt_need,
user_result == SASL_INTERACT ?
"Please enter anonymous identification" : NULL,
"",
NULL, NULL,
NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (result != SASL_OK) return result;
return SASL_INTERACT;
}
if (!user || !*user) {
user = anonymous_id;
}
userlen = strlen(user);
result = cparams->canon_user(cparams->utils->conn,
anonymous_id, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) return result;
memset(hostname, 0, sizeof(hostname));
gethostname(hostname, sizeof(hostname));
hostname[sizeof(hostname)-1] = '\0';
*clientoutlen = (unsigned) (userlen + strlen(hostname) + 1);
result = _plug_buf_alloc(cparams->utils, &text->out_buf,
&text->out_buf_len, *clientoutlen);
if (result != SASL_OK) return result;
strcpy(text->out_buf, user);
text->out_buf[userlen] = '@';
/* use memcpy() instead of strcpy() so we don't add the NUL */
memcpy(text->out_buf + userlen + 1, hostname, strlen(hostname));
*clientout = text->out_buf;
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
}
static void anonymous_client_dispose(void *conn_context,
const sasl_utils_t *utils)
{
client_context_t *text = (client_context_t *) conn_context;
if(!text) return;
if (text->out_buf) utils->free(text->out_buf);
utils->free(text);
}
static const unsigned long anonymous_required_prompts[] = {
SASL_CB_LIST_END
};
static sasl_client_plug_t anonymous_client_plugins[] =
{
{
"ANONYMOUS", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOPLAINTEXT, /* security_flags */
SASL_FEAT_WANT_CLIENT_FIRST, /* features */
anonymous_required_prompts, /* required_prompts */
NULL, /* glob_context */
&anonymous_client_mech_new, /* mech_new */
&anonymous_client_mech_step, /* mech_step */
&anonymous_client_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* idle */
NULL, /* spare */
NULL /* spare */
}
};
int anonymous_client_plug_init(const sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_CLIENT_PLUG_VERSION) {
SETERROR( utils, "ANONYMOUS version mismatch" );
return SASL_BADVERS;
}
*out_version = SASL_CLIENT_PLUG_VERSION;
*pluglist = anonymous_client_plugins;
*plugcount = 1;
return SASL_OK;
}
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_anonymous_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( anonymous )
SASL_SERVER_PLUG_INIT( anonymous )
-689
View File
@@ -1,689 +0,0 @@
/* CRAM-MD5 SASL plugin
* Rob Siemborski
* Tim Martin
* $Id: cram.c,v 1.87 2011/09/07 13:19:44 murch Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_cram_plugin_decl.h>
#endif
/***************************** Common Section *****************************/
static const char plugin_id[] = "$Id: cram.c,v 1.87 2011/09/07 13:19:44 murch Exp $";
/* convert a string of 8bit chars to it's representation in hex
* using lowercase letters
*/
static char *convert16(unsigned char *in, int inlen, const sasl_utils_t *utils)
{
static char hex[]="0123456789abcdef";
int lup;
char *out;
out = utils->malloc(inlen*2+1);
if (out == NULL) return NULL;
for (lup=0; lup < inlen; lup++) {
out[lup*2] = hex[in[lup] >> 4];
out[lup*2+1] = hex[in[lup] & 15];
}
out[lup*2] = 0;
return out;
}
/***************************** Server Section *****************************/
typedef struct server_context {
int state;
char *challenge;
} server_context_t;
static int
crammd5_server_mech_new(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *challenge __attribute__((unused)),
unsigned challen __attribute__((unused)),
void **conn_context)
{
server_context_t *text;
/* holds state are in */
text = sparams->utils->malloc(sizeof(server_context_t));
if (text == NULL) {
MEMERROR( sparams->utils );
return SASL_NOMEM;
}
memset(text, 0, sizeof(server_context_t));
text->state = 1;
*conn_context = text;
return SASL_OK;
}
/*
* Returns the current time (or part of it) in string form
* maximum length=15
*/
static char *gettime(sasl_server_params_t *sparams)
{
char *ret;
time_t t;
t=time(NULL);
ret= sparams->utils->malloc(15);
if (ret==NULL) return NULL;
/* the bottom bits are really the only random ones so if
we overflow we don't want to loose them */
snprintf(ret,15,"%lu",t%(0xFFFFFF));
return ret;
}
static char *randomdigits(sasl_server_params_t *sparams)
{
unsigned int num;
char *ret;
unsigned char temp[5]; /* random 32-bit number */
sparams->utils->rand(sparams->utils->rpool,(char *) temp,4);
num=(temp[0] * 256 * 256 * 256) +
(temp[1] * 256 * 256) +
(temp[2] * 256) +
(temp[3] );
ret = sparams->utils->malloc(15); /* there's no way an unsigned can be longer than this right? */
if (ret == NULL) return NULL;
sprintf(ret, "%u", num);
return ret;
}
static int
crammd5_server_mech_step1(server_context_t *text,
sasl_server_params_t *sparams,
const char *clientin __attribute__((unused)),
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams __attribute__((unused)))
{
char *time, *randdigits;
/* we shouldn't have received anything */
if (clientinlen != 0) {
SETERROR(sparams->utils, "CRAM-MD5 does not accept inital data");
return SASL_BADPROT;
}
/* get time and a random number for the nonce */
time = gettime(sparams);
randdigits = randomdigits(sparams);
if ((time == NULL) || (randdigits == NULL)) {
MEMERROR( sparams->utils );
return SASL_NOMEM;
}
/* allocate some space for the challenge */
text->challenge = sparams->utils->malloc(200 + 1);
if (text->challenge == NULL) {
MEMERROR(sparams->utils);
return SASL_NOMEM;
}
/* create the challenge */
snprintf(text->challenge, 200, "<%s.%s@%s>", randdigits, time,
sparams->serverFQDN);
*serverout = text->challenge;
*serveroutlen = (unsigned) strlen(text->challenge);
/* free stuff */
sparams->utils->free(time);
sparams->utils->free(randdigits);
text->state = 2;
return SASL_CONTINUE;
}
static int
crammd5_server_mech_step2(server_context_t *text,
sasl_server_params_t *sparams,
const char *clientin,
unsigned clientinlen,
const char **serverout __attribute__((unused)),
unsigned *serveroutlen __attribute__((unused)),
sasl_out_params_t *oparams)
{
char *userid = NULL;
sasl_secret_t *sec = NULL;
int pos;
size_t len;
int result = SASL_FAIL;
const char *password_request[] = { SASL_AUX_PASSWORD,
#if defined(OBSOLETE_CRAM_ATTR)
"*cmusaslsecretCRAM-MD5",
#endif
NULL };
struct propval auxprop_values[3];
HMAC_MD5_CTX tmphmac;
HMAC_MD5_STATE md5state;
int clear_md5state = 0;
char *digest_str = NULL;
UINT4 digest[4];
/* extract userid; everything before last space */
pos = clientinlen-1;
while ((pos > 0) && (clientin[pos] != ' ')) pos--;
if (pos <= 0) {
SETERROR( sparams->utils,"need authentication name");
return SASL_BADPROT;
}
userid = (char *) sparams->utils->malloc(pos+1);
if (userid == NULL) {
MEMERROR( sparams->utils);
return SASL_NOMEM;
}
/* copy authstr out */
memcpy(userid, clientin, pos);
userid[pos] = '\0';
result = sparams->utils->prop_request(sparams->propctx, password_request);
if (result != SASL_OK) goto done;
/* this will trigger the getting of the aux properties */
result = sparams->canon_user(sparams->utils->conn,
userid, 0, SASL_CU_AUTHID | SASL_CU_AUTHZID,
oparams);
if (result != SASL_OK) goto done;
result = sparams->utils->prop_getnames(sparams->propctx,
password_request,
auxprop_values);
if (result < 0 ||
((!auxprop_values[0].name || !auxprop_values[0].values)
#if defined(OBSOLETE_CRAM_ATTR)
&& (!auxprop_values[1].name || !auxprop_values[1].values)
#endif
)) {
/* We didn't find this username */
sparams->utils->seterror(sparams->utils->conn,0,
"no secret in database");
result = sparams->transition ? SASL_TRANS : SASL_NOUSER;
goto done;
}
if (auxprop_values[0].name && auxprop_values[0].values) {
len = strlen(auxprop_values[0].values[0]);
if (len == 0) {
sparams->utils->seterror(sparams->utils->conn,0,
"empty secret");
result = SASL_FAIL;
goto done;
}
sec = sparams->utils->malloc(sizeof(sasl_secret_t) + len);
if (!sec) goto done;
sec->len = (unsigned) len;
strncpy((char *)sec->data, auxprop_values[0].values[0], len + 1);
clear_md5state = 1;
/* Do precalculation on plaintext secret */
sparams->utils->hmac_md5_precalc(&md5state, /* OUT */
sec->data,
sec->len);
#if defined(OBSOLETE_CRAM_ATTR)
} else if (auxprop_values[1].name && auxprop_values[1].values) {
/* We have a precomputed secret */
memcpy(&md5state, auxprop_values[1].values[0],
sizeof(HMAC_MD5_STATE));
#endif
} else {
sparams->utils->seterror(sparams->utils->conn, 0,
"Have neither type of secret");
return SASL_FAIL;
}
/* erase the plaintext password */
sparams->utils->prop_erase(sparams->propctx, password_request[0]);
/* ok this is annoying:
so we have this half-way hmac transform instead of the plaintext
that means we half to:
-import it back into a md5 context
-do an md5update with the nonce
-finalize it
*/
sparams->utils->hmac_md5_import(&tmphmac, (HMAC_MD5_STATE *) &md5state);
sparams->utils->MD5Update(&(tmphmac.ictx),
(const unsigned char *) text->challenge,
(unsigned) strlen(text->challenge));
sparams->utils->hmac_md5_final((unsigned char *) &digest, &tmphmac);
/* convert to base 16 with lower case letters */
digest_str = convert16((unsigned char *) digest, 16, sparams->utils);
/* if same then verified
* - we know digest_str is null terminated but clientin might not be
* - verify the length of clientin anyway!
*/
len = strlen(digest_str);
if (clientinlen-pos-1 < len ||
strncmp(digest_str, clientin+pos+1, len) != 0) {
sparams->utils->seterror(sparams->utils->conn, 0,
"incorrect digest response");
result = SASL_BADAUTH;
goto done;
}
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
result = SASL_OK;
done:
if (userid) sparams->utils->free(userid);
if (sec) _plug_free_secret(sparams->utils, &sec);
if (digest_str) sparams->utils->free(digest_str);
if (clear_md5state) memset(&md5state, 0, sizeof(md5state));
return result;
}
static int crammd5_server_mech_step(void *conn_context,
sasl_server_params_t *sparams,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams)
{
server_context_t *text = (server_context_t *) conn_context;
*serverout = NULL;
*serveroutlen = 0;
if (text == NULL) {
return SASL_BADPROT;
}
/* this should be well more than is ever needed */
if (clientinlen > 1024) {
SETERROR(sparams->utils, "CRAM-MD5 input longer than 1024 bytes");
return SASL_BADPROT;
}
switch (text->state) {
case 1:
return crammd5_server_mech_step1(text, sparams,
clientin, clientinlen,
serverout, serveroutlen,
oparams);
case 2:
return crammd5_server_mech_step2(text, sparams,
clientin, clientinlen,
serverout, serveroutlen,
oparams);
default: /* should never get here */
sparams->utils->log(NULL, SASL_LOG_ERR,
"Invalid CRAM-MD5 server step %d\n", text->state);
return SASL_FAIL;
}
return SASL_FAIL; /* should never get here */
}
static void crammd5_server_mech_dispose(void *conn_context,
const sasl_utils_t *utils)
{
server_context_t *text = (server_context_t *) conn_context;
if (!text) return;
if (text->challenge) _plug_free_string(utils,&(text->challenge));
utils->free(text);
}
static sasl_server_plug_t crammd5_server_plugins[] =
{
{
"CRAM-MD5", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOPLAINTEXT
| SASL_SEC_NOANONYMOUS, /* security_flags */
SASL_FEAT_SERVER_FIRST, /* features */
NULL, /* glob_context */
&crammd5_server_mech_new, /* mech_new */
&crammd5_server_mech_step, /* mech_step */
&crammd5_server_mech_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* setpass */
NULL, /* user_query */
NULL, /* idle */
NULL, /* mech avail */
NULL /* spare */
}
};
int crammd5_server_plug_init(const sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_SERVER_PLUG_VERSION) {
SETERROR( utils, "CRAM version mismatch");
return SASL_BADVERS;
}
*out_version = SASL_SERVER_PLUG_VERSION;
*pluglist = crammd5_server_plugins;
*plugcount = 1;
return SASL_OK;
}
/***************************** Client Section *****************************/
typedef struct client_context {
char *out_buf;
unsigned out_buf_len;
} client_context_t;
static int crammd5_client_mech_new(void *glob_context __attribute__((unused)),
sasl_client_params_t *params,
void **conn_context)
{
client_context_t *text;
/* holds state are in */
text = params->utils->malloc(sizeof(client_context_t));
if (text == NULL) {
MEMERROR(params->utils);
return SASL_NOMEM;
}
memset(text, 0, sizeof(client_context_t));
*conn_context = text;
return SASL_OK;
}
static char *make_hashed(sasl_secret_t *sec, char *nonce, int noncelen,
const sasl_utils_t *utils)
{
unsigned char digest[24];
char *in16;
if (sec == NULL) return NULL;
/* do the hmac md5 hash output 128 bits */
utils->hmac_md5((unsigned char *) nonce, noncelen,
sec->data, sec->len, digest);
/* convert that to hex form */
in16 = convert16(digest, 16, utils);
if (in16 == NULL) return NULL;
return in16;
}
static int crammd5_client_mech_step(void *conn_context,
sasl_client_params_t *params,
const char *serverin,
unsigned serverinlen,
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams)
{
client_context_t *text = (client_context_t *) conn_context;
const char *authid = NULL;
sasl_secret_t *password = NULL;
unsigned int free_password = 0; /* set if we need to free password */
int auth_result = SASL_OK;
int pass_result = SASL_OK;
int result;
size_t maxsize;
char *in16 = NULL;
*clientout = NULL;
*clientoutlen = 0;
/* First check for absurd lengths */
if (serverinlen > 1024) {
params->utils->seterror(params->utils->conn, 0,
"CRAM-MD5 input longer than 1024 bytes");
return SASL_BADPROT;
}
/* check if sec layer strong enough */
if (params->props.min_ssf > params->external_ssf) {
SETERROR( params->utils, "SSF requested of CRAM-MD5 plugin");
return SASL_TOOWEAK;
}
/* try to get the userid */
if (oparams->authid == NULL) {
auth_result=_plug_get_authid(params->utils, &authid, prompt_need);
if ((auth_result != SASL_OK) && (auth_result != SASL_INTERACT))
return auth_result;
}
/* try to get the password */
if (password == NULL) {
pass_result=_plug_get_password(params->utils, &password,
&free_password, prompt_need);
if ((pass_result != SASL_OK) && (pass_result != SASL_INTERACT))
return pass_result;
}
/* free prompts we got */
if (prompt_need && *prompt_need) {
params->utils->free(*prompt_need);
*prompt_need = NULL;
}
/* if there are prompts not filled in */
if ((auth_result == SASL_INTERACT) || (pass_result == SASL_INTERACT)) {
/* make the prompt list */
result =
_plug_make_prompts(params->utils, prompt_need,
NULL, NULL,
auth_result == SASL_INTERACT ?
"Please enter your authentication name" : NULL,
NULL,
pass_result == SASL_INTERACT ?
"Please enter your password" : NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (result != SASL_OK) goto cleanup;
return SASL_INTERACT;
}
if (!password) {
PARAMERROR(params->utils);
return SASL_BADPARAM;
}
result = params->canon_user(params->utils->conn, authid, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) goto cleanup;
/*
* username SP digest (keyed md5 where key is passwd)
*/
in16 = make_hashed(password, (char *) serverin, serverinlen,
params->utils);
if (in16 == NULL) {
SETERROR(params->utils, "whoops, make_hashed failed us this time");
result = SASL_FAIL;
goto cleanup;
}
maxsize = 32+1+strlen(oparams->authid)+30;
result = _plug_buf_alloc(params->utils, &(text->out_buf),
&(text->out_buf_len), (unsigned) maxsize);
if (result != SASL_OK) goto cleanup;
snprintf(text->out_buf, maxsize, "%s %s", oparams->authid, in16);
*clientout = text->out_buf;
*clientoutlen = (unsigned) strlen(*clientout);
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
result = SASL_OK;
cleanup:
/* get rid of private information */
if (in16) _plug_free_string(params->utils, &in16);
/* get rid of all sensitive info */
if (free_password) _plug_free_secret(params-> utils, &password);
return result;
}
static void crammd5_client_mech_dispose(void *conn_context,
const sasl_utils_t *utils)
{
client_context_t *text = (client_context_t *) conn_context;
if (!text) return;
if (text->out_buf) utils->free(text->out_buf);
utils->free(text);
}
static sasl_client_plug_t crammd5_client_plugins[] =
{
{
"CRAM-MD5", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOPLAINTEXT
| SASL_SEC_NOANONYMOUS, /* security_flags */
SASL_FEAT_SERVER_FIRST, /* features */
NULL, /* required_prompts */
NULL, /* glob_context */
&crammd5_client_mech_new, /* mech_new */
&crammd5_client_mech_step, /* mech_step */
&crammd5_client_mech_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* idle */
NULL, /* spare */
NULL /* spare */
}
};
int crammd5_client_plug_init(const sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_CLIENT_PLUG_VERSION) {
SETERROR( utils, "CRAM version mismatch");
return SASL_BADVERS;
}
*out_version = SASL_CLIENT_PLUG_VERSION;
*pluglist = crammd5_client_plugins;
*plugcount = 1;
return SASL_OK;
}
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_crammd5_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( crammd5 )
SASL_SERVER_PLUG_INIT( crammd5 )
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_digestmd5_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( digestmd5 )
SASL_SERVER_PLUG_INIT( digestmd5 )
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_gs2_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( gs2 )
SASL_SERVER_PLUG_INIT( gs2 )
@@ -1,324 +0,0 @@
/*
* Copyright (c) 2011, PADL Software Pty Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of PADL Software nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY PADL SOFTWARE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL PADL SOFTWARE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* Copyright 1993 by OpenVision Technologies, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of OpenVision not be used
* in advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include "gs2_token.h"
/*
* $Id: gs2_token.c,v 1.2 2011/05/23 14:45:40 mel Exp $
*/
#ifndef HAVE_GSS_ENCAPSULATE_TOKEN
/* XXXX this code currently makes the assumption that a mech oid will
never be longer than 127 bytes. This assumption is not inherent in
the interfaces, so the code can be fixed if the OSI namespace
balloons unexpectedly. */
/*
* Each token looks like this:
* 0x60 tag for APPLICATION 0, SEQUENCE
* (constructed, definite-length)
* <length> possible multiple bytes, need to parse/generate
* 0x06 tag for OBJECT IDENTIFIER
* <moid_length> compile-time constant string (assume 1 byte)
* <moid_bytes> compile-time constant string
* <inner_bytes> the ANY containing the application token
* bytes 0,1 are the token type
* bytes 2,n are the token data
*
* Note that the token type field is a feature of RFC 1964 mechanisms and
* is not used by other GSSAPI mechanisms. As such, a token type of -1
* is interpreted to mean that no token type should be expected or
* generated.
*
* For the purposes of this abstraction, the token "header" consists of
* the sequence tag and length octets, the mech OID DER encoding, and the
* first two inner bytes, which indicate the token type. The token
* "body" consists of everything else.
*/
static size_t
der_length_size(size_t length)
{
if (length < (1<<7))
return 1;
else if (length < (1<<8))
return 2;
#if INT_MAX == 0x7fff
else
return 3;
#else
else if (length < (1<<16))
return 3;
else if (length < (1<<24))
return 4;
else
return 5;
#endif
}
static void
der_write_length(unsigned char **buf, size_t length)
{
if (length < (1<<7)) {
*(*buf)++ = (unsigned char)length;
} else {
*(*buf)++ = (unsigned char)(der_length_size(length)+127);
#if INT_MAX > 0x7fff
if (length >= (1<<24))
*(*buf)++ = (unsigned char)(length>>24);
if (length >= (1<<16))
*(*buf)++ = (unsigned char)((length>>16)&0xff);
#endif
if (length >= (1<<8))
*(*buf)++ = (unsigned char)((length>>8)&0xff);
*(*buf)++ = (unsigned char)(length&0xff);
}
}
/* returns the length of a token, given the mech oid and the body size */
static size_t
token_size(const gss_OID_desc *mech, size_t body_size)
{
/* set body_size to sequence contents size */
body_size += 2 + (size_t) mech->length; /* NEED overflow check */
return 1 + der_length_size(body_size) + body_size;
}
/* fills in a buffer with the token header. The buffer is assumed to
be the right size. buf is advanced past the token header */
static void
make_token_header(
const gss_OID_desc *mech,
size_t body_size,
unsigned char **buf)
{
*(*buf)++ = 0x60;
der_write_length(buf, 2 + mech->length + body_size);
*(*buf)++ = 0x06;
*(*buf)++ = (unsigned char)mech->length;
memcpy(*buf, mech->elements, mech->length);
*buf += mech->length;
}
OM_uint32
gs2_encapsulate_token(const gss_buffer_t input_token,
const gss_OID token_oid,
gss_buffer_t output_token)
{
size_t tokenSize;
unsigned char *buf;
if (input_token == GSS_C_NO_BUFFER || token_oid == GSS_C_NO_OID)
return GSS_S_CALL_INACCESSIBLE_READ;
if (output_token == GSS_C_NO_BUFFER)
return GSS_S_CALL_INACCESSIBLE_WRITE;
tokenSize = token_size(token_oid, input_token->length);
output_token->value = malloc(tokenSize);
if (output_token->value == NULL)
return GSS_S_FAILURE;
buf = output_token->value;
make_token_header(token_oid, input_token->length, &buf);
memcpy(buf, input_token->value, input_token->length);
output_token->length = tokenSize;
return GSS_S_COMPLETE;
}
#endif
#ifndef HAVE_GSS_DECAPSULATE_TOKEN
/* returns decoded length, or < 0 on failure. Advances buf and
decrements bufsize */
static int
der_read_length(unsigned char **buf, ssize_t *bufsize)
{
unsigned char sf;
int ret;
if (*bufsize < 1)
return -1;
sf = *(*buf)++;
(*bufsize)--;
if (sf & 0x80) {
if ((sf &= 0x7f) > ((*bufsize)-1))
return -1;
if (sf > sizeof(int))
return -1;
ret = 0;
for (; sf; sf--) {
ret = (ret<<8) + (*(*buf)++);
(*bufsize)--;
}
} else {
ret = sf;
}
return ret;
}
/*
* Given a buffer containing a token, reads and verifies the token,
* leaving buf advanced past the token header, and setting body_size
* to the number of remaining bytes. Returns 0 on success,
* G_BAD_TOK_HEADER for a variety of errors, and G_WRONG_MECH if the
* mechanism in the token does not match the mech argument. buf and
* *body_size are left unmodified on error.
*/
static OM_uint32
verify_token_header(OM_uint32 *minor,
const gss_OID mech,
size_t *body_size,
unsigned char **buf_in,
size_t toksize_in)
{
unsigned char *buf = *buf_in;
ssize_t seqsize;
gss_OID_desc toid;
ssize_t toksize = (ssize_t)toksize_in;
*minor = 0;
if ((toksize -= 1) < 0)
return GSS_S_DEFECTIVE_TOKEN;
if (*buf++ != 0x60)
return GSS_S_DEFECTIVE_TOKEN;
seqsize = der_read_length(&buf, &toksize);
if (seqsize < 0)
return GSS_S_DEFECTIVE_TOKEN;
if (seqsize != toksize)
return GSS_S_DEFECTIVE_TOKEN;
if ((toksize -= 1) < 0)
return GSS_S_DEFECTIVE_TOKEN;
if (*buf++ != 0x06)
return GSS_S_DEFECTIVE_TOKEN;
if ((toksize -= 1) < 0)
return GSS_S_DEFECTIVE_TOKEN;
toid.length = *buf++;
if ((toksize -= toid.length) < 0)
return GSS_S_DEFECTIVE_TOKEN;
toid.elements = buf;
buf += toid.length;
if (!gss_oid_equal(&toid, mech))
return GSS_S_DEFECTIVE_TOKEN;
*buf_in = buf;
*body_size = toksize;
return GSS_S_COMPLETE;
}
OM_uint32
gs2_decapsulate_token(const gss_buffer_t input_token,
const gss_OID token_oid,
gss_buffer_t output_token)
{
OM_uint32 major, minor;
size_t body_size = 0;
unsigned char *buf_in;
if (input_token == GSS_C_NO_BUFFER || token_oid == GSS_C_NO_OID)
return GSS_S_CALL_INACCESSIBLE_READ;
if (output_token == GSS_C_NO_BUFFER)
return GSS_S_CALL_INACCESSIBLE_WRITE;
buf_in = input_token->value;
major = verify_token_header(&minor, token_oid, &body_size, &buf_in,
input_token->length);
if (minor != 0)
return GSS_S_DEFECTIVE_TOKEN;
output_token->value = malloc(body_size);
if (output_token->value == NULL)
return GSS_S_FAILURE;
memcpy(output_token->value, buf_in, body_size);
output_token->length = body_size;
return GSS_S_COMPLETE;
}
#endif
#ifndef HAVE_GSS_OID_EQUAL
int
gs2_oid_equal(const gss_OID o1, const gss_OID o2)
{
return o1->length == o2->length &&
(memcmp(o1->elements, o2->elements, o1->length) == 0);
}
#endif
@@ -1,58 +0,0 @@
/*
* Copyright 1993 by OpenVision Technologies, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and
* that both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of OpenVision not be used
* in advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. OpenVision makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _GS2_TOKEN_H_
#define _GS2_TOKEN_H_ 1
#include <config.h>
#include <gssapi/gssapi.h>
#ifndef KRB5_HEIMDAL
#ifdef HAVE_GSSAPI_GSSAPI_EXT_H
#include <gssapi/gssapi_ext.h>
#endif
#endif
#ifndef HAVE_GSS_DECAPSULATE_TOKEN
OM_uint32
gs2_decapsulate_token(const gss_buffer_t input_token,
const gss_OID token_oid,
gss_buffer_t output_token);
#define gss_decapsulate_token gs2_decapsulate_token
#endif
#ifndef HAVE_GSS_ENCAPSULATE_TOKEN
OM_uint32
gs2_encapsulate_token(const gss_buffer_t input_token,
const gss_OID token_oid,
gss_buffer_t output_token);
#define gss_encapsulate_token gs2_encapsulate_token
#endif
#ifndef HAVE_GSS_OID_EQUAL
int
gs2_oid_equal(const gss_OID o1, const gss_OID o2);
#define gss_oid_equal gs2_oid_equal
#endif
#endif /* _GS2_TOKEN_H_ */
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_gssapiv2_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( gssapiv2 )
SASL_SERVER_PLUG_INIT( gssapiv2 )
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_kerberos4_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( kerberos4 )
SASL_SERVER_PLUG_INIT( kerberos4 )
@@ -1,569 +0,0 @@
/* $OpenLDAP: pkg/ldap/contrib/ldapsasl/ldapdb.c,v 1.1.2.7 2003/11/29 22:10:03 hyc Exp $ */
/* SASL LDAP auxprop+canonuser implementation
* Copyright (C) 2002-2007 Howard Chu, All rights reserved. <hyc@symas.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
*
* A copy of this license is available in the file LICENSE in the
* top-level directory of the distribution or, alternatively, at
* <http://www.OpenLDAP.org/license.html>.
*/
#include <config.h>
#include <stdio.h>
#include <ctype.h>
#include "sasl.h"
#include "saslutil.h"
#include "saslplug.h"
#include "plugin_common.h"
#include <ldap.h>
static char ldapdb[] = "ldapdb";
typedef struct ldapctx {
int inited; /* Have we already read the config? */
const char *uri; /* URI of LDAP server */
struct berval id; /* SASL authcid to bind as */
struct berval pw; /* password for bind */
struct berval mech; /* SASL mech */
int use_tls; /* Issue StartTLS request? */
struct berval canon; /* Use attr in user entry for canonical name */
} ldapctx;
static ldapctx ldapdb_ctx;
static int ldapdb_interact(LDAP *ld, unsigned flags __attribute__((unused)),
void *def, void *inter)
{
sasl_interact_t *in = inter;
ldapctx *ctx = def;
struct berval p;
for (;in->id != SASL_CB_LIST_END;in++)
{
p.bv_val = NULL;
switch(in->id)
{
case SASL_CB_GETREALM:
ldap_get_option(ld, LDAP_OPT_X_SASL_REALM, &p.bv_val);
if (p.bv_val) p.bv_len = strlen(p.bv_val);
break;
case SASL_CB_AUTHNAME:
p = ctx->id;
break;
case SASL_CB_PASS:
p = ctx->pw;
break;
}
if (p.bv_val)
{
in->result = p.bv_val;
in->len = p.bv_len;
}
}
return LDAP_SUCCESS;
}
typedef struct connparm {
LDAP *ld;
LDAPControl c;
LDAPControl *ctrl[2];
struct berval *dn;
} connparm;
static int ldapdb_connect(ldapctx *ctx, sasl_server_params_t *sparams,
const char *user, unsigned ulen, connparm *cp)
{
int i;
char *authzid;
if((i=ldap_initialize(&cp->ld, ctx->uri))) {
return i;
}
authzid = sparams->utils->malloc(ulen + sizeof("u:"));
if (!authzid) {
return LDAP_NO_MEMORY;
}
strcpy(authzid, "u:");
strcpy(authzid+2, user);
cp->c.ldctl_oid = LDAP_CONTROL_PROXY_AUTHZ;
cp->c.ldctl_value.bv_val = authzid;
cp->c.ldctl_value.bv_len = ulen + 2;
cp->c.ldctl_iscritical = 1;
i = LDAP_VERSION3;
ldap_set_option(cp->ld, LDAP_OPT_PROTOCOL_VERSION, &i);
/* If TLS is set and it fails, continue or bail out as requested */
if (ctx->use_tls && (i=ldap_start_tls_s(cp->ld, NULL, NULL)) != LDAP_SUCCESS
&& ctx->use_tls > 1) {
sparams->utils->free(authzid);
return i;
}
i = ldap_sasl_interactive_bind_s(cp->ld, NULL, ctx->mech.bv_val, NULL,
NULL, LDAP_SASL_QUIET, ldapdb_interact, ctx);
if (i != LDAP_SUCCESS) {
sparams->utils->free(authzid);
return i;
}
cp->ctrl[0] = &cp->c;
cp->ctrl[1] = NULL;
i = ldap_whoami_s(cp->ld, &cp->dn, cp->ctrl, NULL);
if (i == LDAP_SUCCESS && cp->dn) {
if (!cp->dn->bv_val || strncmp(cp->dn->bv_val, "dn:", 3)) {
ber_bvfree(cp->dn);
cp->dn = NULL;
i = LDAP_INVALID_SYNTAX;
} else {
cp->c.ldctl_value = *(cp->dn);
}
}
sparams->utils->free(authzid);
return i;
}
static int ldapdb_auxprop_lookup(void *glob_context,
sasl_server_params_t *sparams,
unsigned flags,
const char *user,
unsigned ulen)
{
ldapctx *ctx = glob_context;
connparm cp;
int ret, i, n, *aindx;
int result;
int j;
const struct propval *pr;
struct berval **bvals;
LDAPMessage *msg, *res;
char **attrs = NULL;
if(!ctx || !sparams || !user) return SASL_BADPARAM;
pr = sparams->utils->prop_get(sparams->propctx);
if (!pr) return SASL_FAIL;
/* count how many attrs to fetch */
for(i = 0, n = 0; pr[i].name; i++) {
if(pr[i].name[0] == '*' && (flags & SASL_AUXPROP_AUTHZID))
continue;
if(pr[i].values && !(flags & SASL_AUXPROP_OVERRIDE))
continue;
n++;
}
/* nothing to do, bail out */
if (!n) return SASL_OK;
/* alloc an array of attr names for search, and index to the props */
attrs = sparams->utils->malloc((n+1)*sizeof(char *)*2);
if (!attrs) {
result = SASL_NOMEM;
goto done;
}
aindx = (int *)(attrs + n + 1);
/* copy attr list */
for (i=0, n=0; pr[i].name; i++) {
if(pr[i].name[0] == '*' && (flags & SASL_AUXPROP_AUTHZID))
continue;
if(pr[i].values && !(flags & SASL_AUXPROP_OVERRIDE))
continue;
attrs[n] = (char *)pr[i].name;
if (pr[i].name[0] == '*') attrs[n]++;
aindx[n] = i;
n++;
}
attrs[n] = NULL;
if ((ret = ldapdb_connect(ctx, sparams, user, ulen, &cp)) != LDAP_SUCCESS) {
goto process_ldap_error;
}
ret = ldap_search_ext_s(cp.ld, cp.dn->bv_val+3, LDAP_SCOPE_BASE,
"(objectclass=*)", attrs, 0, cp.ctrl, NULL, NULL, 1, &res);
ber_bvfree(cp.dn);
if (ret != LDAP_SUCCESS) {
goto process_ldap_error;
}
/* Assume no user by default */
ret = LDAP_NO_SUCH_OBJECT;
for (msg = ldap_first_message(cp.ld, res);
msg;
msg = ldap_next_message(cp.ld, msg)) {
if (ldap_msgtype(msg) != LDAP_RES_SEARCH_ENTRY) continue;
/* Presence of a search result response indicates that the user exists */
ret = LDAP_SUCCESS;
for (i = 0; i < n; i++) {
bvals = ldap_get_values_len(cp.ld, msg, attrs[i]);
if (!bvals) continue;
if (pr[aindx[i]].values) {
sparams->utils->prop_erase(sparams->propctx, pr[aindx[i]].name);
}
for ( j = 0; bvals[j] != NULL; j++ ) {
sparams->utils->prop_set(sparams->propctx,
pr[aindx[i]].name,
bvals[j]->bv_val,
bvals[j]->bv_len);
}
ber_bvecfree(bvals);
}
}
ldap_msgfree(res);
process_ldap_error:
switch (ret) {
case LDAP_SUCCESS:
result = SASL_OK;
break;
case LDAP_NO_SUCH_OBJECT:
result = SASL_NOUSER;
break;
case LDAP_NO_MEMORY:
result = SASL_NOMEM;
break;
case LDAP_SERVER_DOWN:
case LDAP_BUSY:
case LDAP_UNAVAILABLE:
case LDAP_CONNECT_ERROR:
result = SASL_UNAVAIL;
break;
#if defined(LDAP_PROXY_AUTHZ_FAILURE)
case LDAP_PROXY_AUTHZ_FAILURE:
#endif
case LDAP_INAPPROPRIATE_AUTH:
case LDAP_INVALID_CREDENTIALS:
case LDAP_INSUFFICIENT_ACCESS:
result = SASL_BADAUTH;
break;
default:
result = SASL_FAIL;
break;
}
done:
if(attrs) sparams->utils->free(attrs);
if(cp.ld) ldap_unbind_ext(cp.ld, NULL, NULL);
return result;
}
static int ldapdb_auxprop_store(void *glob_context,
sasl_server_params_t *sparams,
struct propctx *prctx,
const char *user,
unsigned ulen)
{
ldapctx *ctx = glob_context;
connparm cp;
const struct propval *pr;
int i, n;
LDAPMod **mods;
/* just checking if we are enabled */
if (!prctx) return SASL_OK;
if (!sparams || !user) return SASL_BADPARAM;
pr = sparams->utils->prop_get(prctx);
if (!pr) return SASL_BADPARAM;
for (n=0; pr[n].name; n++);
if (!n) return SASL_BADPARAM;
mods = sparams->utils->malloc((n+1) * sizeof(LDAPMod*) + n * sizeof(LDAPMod));
if (!mods) return SASL_NOMEM;
if((i=ldapdb_connect(ctx, sparams, user, ulen, &cp)) == 0) {
for (i=0; i<n; i++) {
mods[i] = (LDAPMod *)((char *)(mods+n+1) + i * sizeof(LDAPMod));
mods[i]->mod_op = LDAP_MOD_REPLACE;
mods[i]->mod_type = (char *)pr[i].name;
mods[i]->mod_values = (char **)pr[i].values;
}
mods[i] = NULL;
i = ldap_modify_ext_s(cp.ld, cp.dn->bv_val+3, mods, cp.ctrl, NULL);
ber_bvfree(cp.dn);
}
sparams->utils->free(mods);
if (i) {
sparams->utils->seterror(sparams->utils->conn, 0,
ldap_err2string(i));
if (i == LDAP_NO_MEMORY) i = SASL_NOMEM;
else i = SASL_FAIL;
}
if(cp.ld) ldap_unbind_ext(cp.ld, NULL, NULL);
return i;
}
static int
ldapdb_canon_server(void *glob_context,
sasl_server_params_t *sparams,
const char *user,
unsigned ulen,
unsigned flags,
char *out,
unsigned out_max,
unsigned *out_ulen)
{
ldapctx *ctx = glob_context;
connparm cp;
struct berval **bvals;
LDAPMessage *msg, *res;
char *rdn, *attrs[2];
unsigned len;
int ret;
if(!ctx || !sparams || !user) return SASL_BADPARAM;
/* If no canon attribute was configured, we can't do anything */
if(!ctx->canon.bv_val) return SASL_BADPARAM;
/* Trim whitespace */
while(isspace(*(unsigned char *)user)) {
user++;
ulen--;
}
while(isspace((unsigned char)user[ulen-1])) {
ulen--;
}
if (!ulen) {
sparams->utils->seterror(sparams->utils->conn, 0,
"All-whitespace username.");
return SASL_FAIL;
}
ret = ldapdb_connect(ctx, sparams, user, ulen, &cp);
if ( ret ) goto done;
/* See if the RDN uses the canon attr. If so, just use the RDN
* value, we don't need to do a search.
*/
rdn = cp.dn->bv_val+3;
if (!strncasecmp(ctx->canon.bv_val, rdn, ctx->canon.bv_len) &&
rdn[ctx->canon.bv_len] == '=') {
char *comma;
rdn += ctx->canon.bv_len + 1;
comma = strchr(rdn, ',');
if ( comma )
len = comma - rdn;
else
len = cp.dn->bv_len - (rdn - cp.dn->bv_val);
if ( len > out_max )
len = out_max;
memcpy(out, rdn, len);
out[len] = '\0';
*out_ulen = len;
ret = SASL_OK;
ber_bvfree(cp.dn);
goto done;
}
/* Have to read the user's entry */
attrs[0] = ctx->canon.bv_val;
attrs[1] = NULL;
ret = ldap_search_ext_s(cp.ld, cp.dn->bv_val+3, LDAP_SCOPE_BASE,
"(objectclass=*)", attrs, 0, cp.ctrl, NULL, NULL, 1, &res);
ber_bvfree(cp.dn);
if (ret != LDAP_SUCCESS) goto done;
for(msg=ldap_first_message(cp.ld, res); msg; msg=ldap_next_message(cp.ld, msg))
{
if (ldap_msgtype(msg) != LDAP_RES_SEARCH_ENTRY) continue;
bvals = ldap_get_values_len(cp.ld, msg, attrs[0]);
if (!bvals) continue;
len = bvals[0]->bv_len;
if ( len > out_max )
len = out_max;
memcpy(out, bvals[0]->bv_val, len);
*out_ulen = len;
ber_bvecfree(bvals);
}
ldap_msgfree(res);
done:
if(cp.ld) ldap_unbind_ext(cp.ld, NULL, NULL);
if (ret) {
sparams->utils->seterror(sparams->utils->conn, 0,
ldap_err2string(ret));
if (ret == LDAP_NO_MEMORY) ret = SASL_NOMEM;
else ret = SASL_FAIL;
}
return ret;
}
static int
ldapdb_canon_client(void *glob_context,
sasl_client_params_t *cparams,
const char *user,
unsigned ulen,
unsigned flags,
char *out,
unsigned out_max,
unsigned *out_ulen)
{
if(!cparams || !user) return SASL_BADPARAM;
/* Trim whitespace */
while(isspace(*(unsigned char *)user)) {
user++;
ulen--;
}
while(isspace((unsigned char)user[ulen-1])) {
ulen--;
}
if (!ulen) {
cparams->utils->seterror(cparams->utils->conn, 0,
"All-whitespace username.");
return SASL_FAIL;
}
if (ulen > out_max) return SASL_BUFOVER;
memcpy(out, user, ulen);
out[ulen] = '\0';
*out_ulen = ulen;
return SASL_OK;
}
static int
ldapdb_config(const sasl_utils_t *utils)
{
ldapctx *p = &ldapdb_ctx;
const char *s;
unsigned len;
if(p->inited) return SASL_OK;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_uri", &p->uri, NULL);
if(!p->uri) return SASL_BADPARAM;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_id",
(const char **)&p->id.bv_val, &len);
p->id.bv_len = len;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_pw",
(const char **)&p->pw.bv_val, &len);
p->pw.bv_len = len;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_mech",
(const char **)&p->mech.bv_val, &len);
p->mech.bv_len = len;
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_starttls", &s, NULL);
if (s)
{
if (!strcasecmp(s, "demand")) p->use_tls = 2;
else if (!strcasecmp(s, "try")) p->use_tls = 1;
}
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_rc", &s, &len);
if (s)
{
char *str = utils->malloc(sizeof("LDAPRC=")+len);
if (!str) return SASL_NOMEM;
strcpy( str, "LDAPRC=" );
strcpy( str + sizeof("LDAPRC=")-1, s );
if (putenv(str))
{
utils->free(str);
return SASL_NOMEM;
}
}
utils->getopt(utils->getopt_context, ldapdb, "ldapdb_canon_attr",
(const char **)&p->canon.bv_val, &len);
p->canon.bv_len = len;
p->inited = 1;
return SASL_OK;
}
static sasl_auxprop_plug_t ldapdb_auxprop_plugin = {
0, /* Features */
0, /* spare */
&ldapdb_ctx, /* glob_context */
NULL, /* auxprop_free */
ldapdb_auxprop_lookup, /* auxprop_lookup */
ldapdb, /* name */
ldapdb_auxprop_store /* auxprop store */
};
int ldapdb_auxprop_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_auxprop_plug_t **plug,
const char *plugname __attribute__((unused)))
{
int rc;
if(!out_version || !plug) return SASL_BADPARAM;
if(max_version < SASL_AUXPROP_PLUG_VERSION) return SASL_BADVERS;
rc = ldapdb_config(utils);
*out_version = SASL_AUXPROP_PLUG_VERSION;
*plug = &ldapdb_auxprop_plugin;
return rc;
}
static sasl_canonuser_plug_t ldapdb_canonuser_plugin = {
0, /* features */
0, /* spare */
&ldapdb_ctx, /* glob_context */
ldapdb, /* name */
NULL, /* canon_user_free */
ldapdb_canon_server, /* canon_user_server */
ldapdb_canon_client, /* canon_user_client */
NULL,
NULL,
NULL
};
int ldapdb_canonuser_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_canonuser_plug_t **plug,
const char *plugname __attribute__((unused)))
{
int rc;
if(!out_version || !plug) return SASL_BADPARAM;
if(max_version < SASL_CANONUSER_PLUG_VERSION) return SASL_BADVERS;
rc = ldapdb_config(utils);
*out_version = SASL_CANONUSER_PLUG_VERSION;
*plug = &ldapdb_canonuser_plugin;
return rc;
}
@@ -1,39 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_AUXPROP_PLUG_INIT( ldapdb )
SASL_CANONUSER_PLUG_INIT( ldapdb )
-496
View File
@@ -1,496 +0,0 @@
/* Login SASL plugin
* Rob Siemborski (SASLv2 Conversion)
* contributed by Rainer Schoepf <schoepf@uni-mainz.de>
* based on PLAIN, by Tim Martin <tmartin@andrew.cmu.edu>
* $Id: login.c,v 1.31 2010/11/30 11:41:47 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <ctype.h>
#include <sasl.h>
#include <saslplug.h>
#include "plugin_common.h"
/***************************** Common Section *****************************/
static const char plugin_id[] = "$Id: login.c,v 1.31 2010/11/30 11:41:47 mel Exp $";
/***************************** Server Section *****************************/
typedef struct context {
int state;
char *username;
unsigned username_len;
} server_context_t;
static int login_server_mech_new(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *challenge __attribute__((unused)),
unsigned challen __attribute__((unused)),
void **conn_context)
{
server_context_t *text;
/* holds state are in */
text = sparams->utils->malloc(sizeof(server_context_t));
if (text == NULL) {
MEMERROR( sparams->utils );
return SASL_NOMEM;
}
memset(text, 0, sizeof(server_context_t));
text->state = 1;
*conn_context = text;
return SASL_OK;
}
#define USERNAME_CHALLENGE "Username:"
#define PASSWORD_CHALLENGE "Password:"
static int login_server_mech_step(void *conn_context,
sasl_server_params_t *params,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams)
{
server_context_t *text = (server_context_t *) conn_context;
*serverout = NULL;
*serveroutlen = 0;
if (text == NULL) {
return SASL_BADPROT;
}
switch (text->state) {
case 1:
text->state = 2;
/* Check inlen, (possibly we have already the user name) */
/* In this case fall through to state 2 */
if (clientinlen == 0) {
/* demand username */
*serveroutlen = (unsigned) strlen(USERNAME_CHALLENGE);
*serverout = USERNAME_CHALLENGE;
return SASL_CONTINUE;
}
case 2:
/* Catch really long usernames */
if (clientinlen > 1024) {
SETERROR(params->utils, "username too long (>1024 characters)");
return SASL_BADPROT;
}
/* get username */
text->username =
params->utils->malloc(sizeof(sasl_secret_t) + clientinlen + 1);
if (!text->username) {
MEMERROR( params->utils );
return SASL_NOMEM;
}
strncpy(text->username, clientin, clientinlen);
text->username_len = clientinlen;
text->username[clientinlen] = '\0';
/* demand password */
*serveroutlen = (unsigned) strlen(PASSWORD_CHALLENGE);
*serverout = PASSWORD_CHALLENGE;
text->state = 3;
return SASL_CONTINUE;
case 3: {
sasl_secret_t *password;
int result;
/* Catch really long passwords */
if (clientinlen > 1024) {
SETERROR(params->utils,
"clientinlen is > 1024 characters in LOGIN plugin");
return SASL_BADPROT;
}
/* get password */
password =
params->utils->malloc(sizeof(sasl_secret_t) + clientinlen + 1);
if (!password) {
MEMERROR(params->utils);
return SASL_NOMEM;
}
strncpy((char *) password->data, clientin, clientinlen);
password->data[clientinlen] = '\0';
password->len = clientinlen;
/* canonicalize username first, so that password verification is
* done against the canonical id */
result = params->canon_user(params->utils->conn,
text->username,
text->username_len,
SASL_CU_AUTHID | SASL_CU_AUTHZID | SASL_CU_EXTERNALLY_VERIFIED,
oparams);
if (result != SASL_OK) return result;
/* verify_password - return sasl_ok on success */
result = params->utils->checkpass(params->utils->conn,
oparams->authid, oparams->alen,
(char *) password->data, password->len);
if (result != SASL_OK) {
_plug_free_secret(params->utils, &password);
return result;
}
_plug_free_secret(params->utils, &password);
*serverout = NULL;
*serveroutlen = 0;
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
}
default:
params->utils->log(NULL, SASL_LOG_ERR,
"Invalid LOGIN server step %d\n", text->state);
return SASL_FAIL;
}
return SASL_FAIL; /* should never get here */
}
static void login_server_mech_dispose(void *conn_context,
const sasl_utils_t *utils)
{
server_context_t *text = (server_context_t *) conn_context;
if (!text) return;
if (text->username) utils->free(text->username);
utils->free(text);
}
static sasl_server_plug_t login_server_plugins[] =
{
{
"LOGIN", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOANONYMOUS
| SASL_SEC_PASS_CREDENTIALS, /* security_flags */
0, /* features */
NULL, /* glob_context */
&login_server_mech_new, /* mech_new */
&login_server_mech_step, /* mech_step */
&login_server_mech_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* setpass */
NULL, /* user_query */
NULL, /* idle */
NULL, /* mech_avail */
NULL /* spare */
}
};
int login_server_plug_init(sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_SERVER_PLUG_VERSION) {
SETERROR(utils, "LOGIN version mismatch");
return SASL_BADVERS;
}
*out_version = SASL_SERVER_PLUG_VERSION;
*pluglist = login_server_plugins;
*plugcount = 1;
return SASL_OK;
}
/***************************** Client Section *****************************/
typedef struct client_context {
int state;
sasl_secret_t *password;
unsigned int free_password; /* set if we need to free password */
} client_context_t;
static int login_client_mech_new(void *glob_context __attribute__((unused)),
sasl_client_params_t *params,
void **conn_context)
{
client_context_t *text;
/* holds state are in */
text = params->utils->malloc(sizeof(client_context_t));
if (text == NULL) {
MEMERROR(params->utils);
return SASL_NOMEM;
}
memset(text, 0, sizeof(client_context_t));
text->state = 1;
*conn_context = text;
return SASL_OK;
}
static int login_client_mech_step(void *conn_context,
sasl_client_params_t *params,
const char *serverin __attribute__((unused)),
unsigned serverinlen __attribute__((unused)),
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams)
{
client_context_t *text = (client_context_t *) conn_context;
*clientout = NULL;
*clientoutlen = 0;
switch (text->state) {
case 1: {
const char *user = NULL;
int auth_result = SASL_OK;
int pass_result = SASL_OK;
int result;
/* check if sec layer strong enough */
if (params->props.min_ssf > params->external_ssf) {
SETERROR( params->utils, "SSF requested of LOGIN plugin");
return SASL_TOOWEAK;
}
/* try to get the userid */
/* Note: we want to grab the authname and not the userid, which is
* who we AUTHORIZE as, and will be the same as the authname
* for the LOGIN mech.
*/
if (oparams->user == NULL) {
auth_result = _plug_get_authid(params->utils, &user, prompt_need);
if ((auth_result != SASL_OK) && (auth_result != SASL_INTERACT))
return auth_result;
}
/* try to get the password */
if (text->password == NULL) {
pass_result = _plug_get_password(params->utils, &text->password,
&text->free_password, prompt_need);
if ((pass_result != SASL_OK) && (pass_result != SASL_INTERACT))
return pass_result;
}
/* free prompts we got */
if (prompt_need && *prompt_need) {
params->utils->free(*prompt_need);
*prompt_need = NULL;
}
/* if there are prompts not filled in */
if ((auth_result == SASL_INTERACT) || (pass_result == SASL_INTERACT)) {
/* make the prompt list */
result =
_plug_make_prompts(params->utils, prompt_need,
NULL, NULL,
auth_result == SASL_INTERACT ?
"Please enter your authentication name" : NULL,
NULL,
pass_result == SASL_INTERACT ?
"Please enter your password" : NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (result != SASL_OK) return result;
return SASL_INTERACT;
}
if (!text->password) {
PARAMERROR(params->utils);
return SASL_BADPARAM;
}
result = params->canon_user(params->utils->conn, user, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) return result;
/* server should have sent request for username - we ignore it */
if (!serverin) {
SETERROR( params->utils,
"Server didn't issue challenge for USERNAME");
return SASL_BADPROT;
}
if (!clientout) {
PARAMERROR( params->utils );
return SASL_BADPARAM;
}
if (clientoutlen) *clientoutlen = oparams->alen;
*clientout = oparams->authid;
text->state = 2;
return SASL_CONTINUE;
}
case 2:
/* server should have sent request for password - we ignore it */
if (!serverin) {
SETERROR( params->utils,
"Server didn't issue challenge for PASSWORD");
return SASL_BADPROT;
}
if (!clientout) {
PARAMERROR(params->utils);
return SASL_BADPARAM;
}
if (clientoutlen) *clientoutlen = text->password->len;
*clientout = (char *) text->password->data;
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
default:
params->utils->log(NULL, SASL_LOG_ERR,
"Invalid LOGIN client step %d\n", text->state);
return SASL_FAIL;
}
return SASL_FAIL; /* should never get here */
}
static void login_client_mech_dispose(void *conn_context,
const sasl_utils_t *utils)
{
client_context_t *text = (client_context_t *) conn_context;
if (!text) return;
/* free sensitive info */
if (text->free_password) _plug_free_secret(utils, &(text->password));
utils->free(text);
}
static sasl_client_plug_t login_client_plugins[] =
{
{
"LOGIN", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOANONYMOUS
| SASL_SEC_PASS_CREDENTIALS, /* security_flags */
SASL_FEAT_SERVER_FIRST, /* features */
NULL, /* required_prompts */
NULL, /* glob_context */
&login_client_mech_new, /* mech_new */
&login_client_mech_step, /* mech_step */
&login_client_mech_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* idle */
NULL, /* spare */
NULL /* spare */
}
};
int login_client_plug_init(sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_CLIENT_PLUG_VERSION) {
SETERROR(utils, "Version mismatch in LOGIN");
return SASL_BADVERS;
}
*out_version = SASL_CLIENT_PLUG_VERSION;
*pluglist = login_client_plugins;
*plugcount = 1;
return SASL_OK;
}
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_login_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( login )
SASL_SERVER_PLUG_INIT( login )
@@ -1,93 +0,0 @@
# mechanism plugins
for mech in anonymous crammd5 digestmd5 scram gssapiv2 kerberos4 login ntlm otp passdss plain srp gs2; do
echo "
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include \"plugin_common.h\"
#ifdef macintosh
#include <sasl_${mech}_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( $mech )
SASL_SERVER_PLUG_INIT( $mech )
" > ${mech}_init.c
done
# auxprop plugins
for auxprop in sasldb sql ldapdb; do
echo "
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include \"plugin_common.h\"
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_AUXPROP_PLUG_INIT( $auxprop )
" > ${auxprop}_init.c
done
# ldapdb is also a canon_user plugin
echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_ntlm_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( ntlm )
SASL_SERVER_PLUG_INIT( ntlm )
File diff suppressed because it is too large Load Diff
-311
View File
@@ -1,311 +0,0 @@
/* OTP SASL plugin
* Ken Murchison
* $Id: otp.h,v 1.2 2003/02/13 19:56:04 rjs3 Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _OTP_H_
#define _OTP_H_
/* Standard dictionary from RFC2289 */
#define OTP_STD_DICT_SIZE 2048
#define OTP_4LETTER_OFFSET 571
static const char *otp_std_dict[OTP_STD_DICT_SIZE] =
{ "A", "ABE", "ACE", "ACT", "AD", "ADA", "ADD",
"AGO", "AID", "AIM", "AIR", "ALL", "ALP", "AM", "AMY",
"AN", "ANA", "AND", "ANN", "ANT", "ANY", "APE", "APS",
"APT", "ARC", "ARE", "ARK", "ARM", "ART", "AS", "ASH",
"ASK", "AT", "ATE", "AUG", "AUK", "AVE", "AWE", "AWK",
"AWL", "AWN", "AX", "AYE", "BAD", "BAG", "BAH", "BAM",
"BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG",
"BEN", "BET", "BEY", "BIB", "BID", "BIG", "BIN", "BIT",
"BOB", "BOG", "BON", "BOO", "BOP", "BOW", "BOY", "BUB",
"BUD", "BUG", "BUM", "BUN", "BUS", "BUT", "BUY", "BY",
"BYE", "CAB", "CAL", "CAM", "CAN", "CAP", "CAR", "CAT",
"CAW", "COD", "COG", "COL", "CON", "COO", "COP", "COT",
"COW", "COY", "CRY", "CUB", "CUE", "CUP", "CUR", "CUT",
"DAB", "DAD", "DAM", "DAN", "DAR", "DAY", "DEE", "DEL",
"DEN", "DES", "DEW", "DID", "DIE", "DIG", "DIN", "DIP",
"DO", "DOE", "DOG", "DON", "DOT", "DOW", "DRY", "DUB",
"DUD", "DUE", "DUG", "DUN", "EAR", "EAT", "ED", "EEL",
"EGG", "EGO", "ELI", "ELK", "ELM", "ELY", "EM", "END",
"EST", "ETC", "EVA", "EVE", "EWE", "EYE", "FAD", "FAN",
"FAR", "FAT", "FAY", "FED", "FEE", "FEW", "FIB", "FIG",
"FIN", "FIR", "FIT", "FLO", "FLY", "FOE", "FOG", "FOR",
"FRY", "FUM", "FUN", "FUR", "GAB", "GAD", "GAG", "GAL",
"GAM", "GAP", "GAS", "GAY", "GEE", "GEL", "GEM", "GET",
"GIG", "GIL", "GIN", "GO", "GOT", "GUM", "GUN", "GUS",
"GUT", "GUY", "GYM", "GYP", "HA", "HAD", "HAL", "HAM",
"HAN", "HAP", "HAS", "HAT", "HAW", "HAY", "HE", "HEM",
"HEN", "HER", "HEW", "HEY", "HI", "HID", "HIM", "HIP",
"HIS", "HIT", "HO", "HOB", "HOC", "HOE", "HOG", "HOP",
"HOT", "HOW", "HUB", "HUE", "HUG", "HUH", "HUM", "HUT",
"I", "ICY", "IDA", "IF", "IKE", "ILL", "INK", "INN",
"IO", "ION", "IQ", "IRA", "IRE", "IRK", "IS", "IT",
"ITS", "IVY", "JAB", "JAG", "JAM", "JAN", "JAR", "JAW",
"JAY", "JET", "JIG", "JIM", "JO", "JOB", "JOE", "JOG",
"JOT", "JOY", "JUG", "JUT", "KAY", "KEG", "KEN", "KEY",
"KID", "KIM", "KIN", "KIT", "LA", "LAB", "LAC", "LAD",
"LAG", "LAM", "LAP", "LAW", "LAY", "LEA", "LED", "LEE",
"LEG", "LEN", "LEO", "LET", "LEW", "LID", "LIE", "LIN",
"LIP", "LIT", "LO", "LOB", "LOG", "LOP", "LOS", "LOT",
"LOU", "LOW", "LOY", "LUG", "LYE", "MA", "MAC", "MAD",
"MAE", "MAN", "MAO", "MAP", "MAT", "MAW", "MAY", "ME",
"MEG", "MEL", "MEN", "MET", "MEW", "MID", "MIN", "MIT",
"MOB", "MOD", "MOE", "MOO", "MOP", "MOS", "MOT", "MOW",
"MUD", "MUG", "MUM", "MY", "NAB", "NAG", "NAN", "NAP",
"NAT", "NAY", "NE", "NED", "NEE", "NET", "NEW", "NIB",
"NIL", "NIP", "NIT", "NO", "NOB", "NOD", "NON", "NOR",
"NOT", "NOV", "NOW", "NU", "NUN", "NUT", "O", "OAF",
"OAK", "OAR", "OAT", "ODD", "ODE", "OF", "OFF", "OFT",
"OH", "OIL", "OK", "OLD", "ON", "ONE", "OR", "ORB",
"ORE", "ORR", "OS", "OTT", "OUR", "OUT", "OVA", "OW",
"OWE", "OWL", "OWN", "OX", "PA", "PAD", "PAL", "PAM",
"PAN", "PAP", "PAR", "PAT", "PAW", "PAY", "PEA", "PEG",
"PEN", "PEP", "PER", "PET", "PEW", "PHI", "PI", "PIE",
"PIN", "PIT", "PLY", "PO", "POD", "POE", "POP", "POT",
"POW", "PRO", "PRY", "PUB", "PUG", "PUN", "PUP", "PUT",
"QUO", "RAG", "RAM", "RAN", "RAP", "RAT", "RAW", "RAY",
"REB", "RED", "REP", "RET", "RIB", "RID", "RIG", "RIM",
"RIO", "RIP", "ROB", "ROD", "ROE", "RON", "ROT", "ROW",
"ROY", "RUB", "RUE", "RUG", "RUM", "RUN", "RYE", "SAC",
"SAD", "SAG", "SAL", "SAM", "SAN", "SAP", "SAT", "SAW",
"SAY", "SEA", "SEC", "SEE", "SEN", "SET", "SEW", "SHE",
"SHY", "SIN", "SIP", "SIR", "SIS", "SIT", "SKI", "SKY",
"SLY", "SO", "SOB", "SOD", "SON", "SOP", "SOW", "SOY",
"SPA", "SPY", "SUB", "SUD", "SUE", "SUM", "SUN", "SUP",
"TAB", "TAD", "TAG", "TAN", "TAP", "TAR", "TEA", "TED",
"TEE", "TEN", "THE", "THY", "TIC", "TIE", "TIM", "TIN",
"TIP", "TO", "TOE", "TOG", "TOM", "TON", "TOO", "TOP",
"TOW", "TOY", "TRY", "TUB", "TUG", "TUM", "TUN", "TWO",
"UN", "UP", "US", "USE", "VAN", "VAT", "VET", "VIE",
"WAD", "WAG", "WAR", "WAS", "WAY", "WE", "WEB", "WED",
"WEE", "WET", "WHO", "WHY", "WIN", "WIT", "WOK", "WON",
"WOO", "WOW", "WRY", "WU", "YAM", "YAP", "YAW", "YE",
"YEA", "YES", "YET", "YOU", "ABED", "ABEL", "ABET", "ABLE",
"ABUT", "ACHE", "ACID", "ACME", "ACRE", "ACTA", "ACTS", "ADAM",
"ADDS", "ADEN", "AFAR", "AFRO", "AGEE", "AHEM", "AHOY", "AIDA",
"AIDE", "AIDS", "AIRY", "AJAR", "AKIN", "ALAN", "ALEC", "ALGA",
"ALIA", "ALLY", "ALMA", "ALOE", "ALSO", "ALTO", "ALUM", "ALVA",
"AMEN", "AMES", "AMID", "AMMO", "AMOK", "AMOS", "AMRA", "ANDY",
"ANEW", "ANNA", "ANNE", "ANTE", "ANTI", "AQUA", "ARAB", "ARCH",
"AREA", "ARGO", "ARID", "ARMY", "ARTS", "ARTY", "ASIA", "ASKS",
"ATOM", "AUNT", "AURA", "AUTO", "AVER", "AVID", "AVIS", "AVON",
"AVOW", "AWAY", "AWRY", "BABE", "BABY", "BACH", "BACK", "BADE",
"BAIL", "BAIT", "BAKE", "BALD", "BALE", "BALI", "BALK", "BALL",
"BALM", "BAND", "BANE", "BANG", "BANK", "BARB", "BARD", "BARE",
"BARK", "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE",
"BATH", "BAWD", "BAWL", "BEAD", "BEAK", "BEAM", "BEAN", "BEAR",
"BEAT", "BEAU", "BECK", "BEEF", "BEEN", "BEER", "BEET", "BELA",
"BELL", "BELT", "BEND", "BENT", "BERG", "BERN", "BERT", "BESS",
"BEST", "BETA", "BETH", "BHOY", "BIAS", "BIDE", "BIEN", "BILE",
"BILK", "BILL", "BIND", "BING", "BIRD", "BITE", "BITS", "BLAB",
"BLAT", "BLED", "BLEW", "BLOB", "BLOC", "BLOT", "BLOW", "BLUE",
"BLUM", "BLUR", "BOAR", "BOAT", "BOCA", "BOCK", "BODE", "BODY",
"BOGY", "BOHR", "BOIL", "BOLD", "BOLO", "BOLT", "BOMB", "BONA",
"BOND", "BONE", "BONG", "BONN", "BONY", "BOOK", "BOOM", "BOON",
"BOOT", "BORE", "BORG", "BORN", "BOSE", "BOSS", "BOTH", "BOUT",
"BOWL", "BOYD", "BRAD", "BRAE", "BRAG", "BRAN", "BRAY", "BRED",
"BREW", "BRIG", "BRIM", "BROW", "BUCK", "BUDD", "BUFF", "BULB",
"BULK", "BULL", "BUNK", "BUNT", "BUOY", "BURG", "BURL", "BURN",
"BURR", "BURT", "BURY", "BUSH", "BUSS", "BUST", "BUSY", "BYTE",
"CADY", "CAFE", "CAGE", "CAIN", "CAKE", "CALF", "CALL", "CALM",
"CAME", "CANE", "CANT", "CARD", "CARE", "CARL", "CARR", "CART",
"CASE", "CASH", "CASK", "CAST", "CAVE", "CEIL", "CELL", "CENT",
"CERN", "CHAD", "CHAR", "CHAT", "CHAW", "CHEF", "CHEN", "CHEW",
"CHIC", "CHIN", "CHOU", "CHOW", "CHUB", "CHUG", "CHUM", "CITE",
"CITY", "CLAD", "CLAM", "CLAN", "CLAW", "CLAY", "CLOD", "CLOG",
"CLOT", "CLUB", "CLUE", "COAL", "COAT", "COCA", "COCK", "COCO",
"CODA", "CODE", "CODY", "COED", "COIL", "COIN", "COKE", "COLA",
"COLD", "COLT", "COMA", "COMB", "COME", "COOK", "COOL", "COON",
"COOT", "CORD", "CORE", "CORK", "CORN", "COST", "COVE", "COWL",
"CRAB", "CRAG", "CRAM", "CRAY", "CREW", "CRIB", "CROW", "CRUD",
"CUBA", "CUBE", "CUFF", "CULL", "CULT", "CUNY", "CURB", "CURD",
"CURE", "CURL", "CURT", "CUTS", "DADE", "DALE", "DAME", "DANA",
"DANE", "DANG", "DANK", "DARE", "DARK", "DARN", "DART", "DASH",
"DATA", "DATE", "DAVE", "DAVY", "DAWN", "DAYS", "DEAD", "DEAF",
"DEAL", "DEAN", "DEAR", "DEBT", "DECK", "DEED", "DEEM", "DEER",
"DEFT", "DEFY", "DELL", "DENT", "DENY", "DESK", "DIAL", "DICE",
"DIED", "DIET", "DIME", "DINE", "DING", "DINT", "DIRE", "DIRT",
"DISC", "DISH", "DISK", "DIVE", "DOCK", "DOES", "DOLE", "DOLL",
"DOLT", "DOME", "DONE", "DOOM", "DOOR", "DORA", "DOSE", "DOTE",
"DOUG", "DOUR", "DOVE", "DOWN", "DRAB", "DRAG", "DRAM", "DRAW",
"DREW", "DRUB", "DRUG", "DRUM", "DUAL", "DUCK", "DUCT", "DUEL",
"DUET", "DUKE", "DULL", "DUMB", "DUNE", "DUNK", "DUSK", "DUST",
"DUTY", "EACH", "EARL", "EARN", "EASE", "EAST", "EASY", "EBEN",
"ECHO", "EDDY", "EDEN", "EDGE", "EDGY", "EDIT", "EDNA", "EGAN",
"ELAN", "ELBA", "ELLA", "ELSE", "EMIL", "EMIT", "EMMA", "ENDS",
"ERIC", "EROS", "EVEN", "EVER", "EVIL", "EYED", "FACE", "FACT",
"FADE", "FAIL", "FAIN", "FAIR", "FAKE", "FALL", "FAME", "FANG",
"FARM", "FAST", "FATE", "FAWN", "FEAR", "FEAT", "FEED", "FEEL",
"FEET", "FELL", "FELT", "FEND", "FERN", "FEST", "FEUD", "FIEF",
"FIGS", "FILE", "FILL", "FILM", "FIND", "FINE", "FINK", "FIRE",
"FIRM", "FISH", "FISK", "FIST", "FITS", "FIVE", "FLAG", "FLAK",
"FLAM", "FLAT", "FLAW", "FLEA", "FLED", "FLEW", "FLIT", "FLOC",
"FLOG", "FLOW", "FLUB", "FLUE", "FOAL", "FOAM", "FOGY", "FOIL",
"FOLD", "FOLK", "FOND", "FONT", "FOOD", "FOOL", "FOOT", "FORD",
"FORE", "FORK", "FORM", "FORT", "FOSS", "FOUL", "FOUR", "FOWL",
"FRAU", "FRAY", "FRED", "FREE", "FRET", "FREY", "FROG", "FROM",
"FUEL", "FULL", "FUME", "FUND", "FUNK", "FURY", "FUSE", "FUSS",
"GAFF", "GAGE", "GAIL", "GAIN", "GAIT", "GALA", "GALE", "GALL",
"GALT", "GAME", "GANG", "GARB", "GARY", "GASH", "GATE", "GAUL",
"GAUR", "GAVE", "GAWK", "GEAR", "GELD", "GENE", "GENT", "GERM",
"GETS", "GIBE", "GIFT", "GILD", "GILL", "GILT", "GINA", "GIRD",
"GIRL", "GIST", "GIVE", "GLAD", "GLEE", "GLEN", "GLIB", "GLOB",
"GLOM", "GLOW", "GLUE", "GLUM", "GLUT", "GOAD", "GOAL", "GOAT",
"GOER", "GOES", "GOLD", "GOLF", "GONE", "GONG", "GOOD", "GOOF",
"GORE", "GORY", "GOSH", "GOUT", "GOWN", "GRAB", "GRAD", "GRAY",
"GREG", "GREW", "GREY", "GRID", "GRIM", "GRIN", "GRIT", "GROW",
"GRUB", "GULF", "GULL", "GUNK", "GURU", "GUSH", "GUST", "GWEN",
"GWYN", "HAAG", "HAAS", "HACK", "HAIL", "HAIR", "HALE", "HALF",
"HALL", "HALO", "HALT", "HAND", "HANG", "HANK", "HANS", "HARD",
"HARK", "HARM", "HART", "HASH", "HAST", "HATE", "HATH", "HAUL",
"HAVE", "HAWK", "HAYS", "HEAD", "HEAL", "HEAR", "HEAT", "HEBE",
"HECK", "HEED", "HEEL", "HEFT", "HELD", "HELL", "HELM", "HERB",
"HERD", "HERE", "HERO", "HERS", "HESS", "HEWN", "HICK", "HIDE",
"HIGH", "HIKE", "HILL", "HILT", "HIND", "HINT", "HIRE", "HISS",
"HIVE", "HOBO", "HOCK", "HOFF", "HOLD", "HOLE", "HOLM", "HOLT",
"HOME", "HONE", "HONK", "HOOD", "HOOF", "HOOK", "HOOT", "HORN",
"HOSE", "HOST", "HOUR", "HOVE", "HOWE", "HOWL", "HOYT", "HUCK",
"HUED", "HUFF", "HUGE", "HUGH", "HUGO", "HULK", "HULL", "HUNK",
"HUNT", "HURD", "HURL", "HURT", "HUSH", "HYDE", "HYMN", "IBIS",
"ICON", "IDEA", "IDLE", "IFFY", "INCA", "INCH", "INTO", "IONS",
"IOTA", "IOWA", "IRIS", "IRMA", "IRON", "ISLE", "ITCH", "ITEM",
"IVAN", "JACK", "JADE", "JAIL", "JAKE", "JANE", "JAVA", "JEAN",
"JEFF", "JERK", "JESS", "JEST", "JIBE", "JILL", "JILT", "JIVE",
"JOAN", "JOBS", "JOCK", "JOEL", "JOEY", "JOHN", "JOIN", "JOKE",
"JOLT", "JOVE", "JUDD", "JUDE", "JUDO", "JUDY", "JUJU", "JUKE",
"JULY", "JUNE", "JUNK", "JUNO", "JURY", "JUST", "JUTE", "KAHN",
"KALE", "KANE", "KANT", "KARL", "KATE", "KEEL", "KEEN", "KENO",
"KENT", "KERN", "KERR", "KEYS", "KICK", "KILL", "KIND", "KING",
"KIRK", "KISS", "KITE", "KLAN", "KNEE", "KNEW", "KNIT", "KNOB",
"KNOT", "KNOW", "KOCH", "KONG", "KUDO", "KURD", "KURT", "KYLE",
"LACE", "LACK", "LACY", "LADY", "LAID", "LAIN", "LAIR", "LAKE",
"LAMB", "LAME", "LAND", "LANE", "LANG", "LARD", "LARK", "LASS",
"LAST", "LATE", "LAUD", "LAVA", "LAWN", "LAWS", "LAYS", "LEAD",
"LEAF", "LEAK", "LEAN", "LEAR", "LEEK", "LEER", "LEFT", "LEND",
"LENS", "LENT", "LEON", "LESK", "LESS", "LEST", "LETS", "LIAR",
"LICE", "LICK", "LIED", "LIEN", "LIES", "LIEU", "LIFE", "LIFT",
"LIKE", "LILA", "LILT", "LILY", "LIMA", "LIMB", "LIME", "LIND",
"LINE", "LINK", "LINT", "LION", "LISA", "LIST", "LIVE", "LOAD",
"LOAF", "LOAM", "LOAN", "LOCK", "LOFT", "LOGE", "LOIS", "LOLA",
"LONE", "LONG", "LOOK", "LOON", "LOOT", "LORD", "LORE", "LOSE",
"LOSS", "LOST", "LOUD", "LOVE", "LOWE", "LUCK", "LUCY", "LUGE",
"LUKE", "LULU", "LUND", "LUNG", "LURA", "LURE", "LURK", "LUSH",
"LUST", "LYLE", "LYNN", "LYON", "LYRA", "MACE", "MADE", "MAGI",
"MAID", "MAIL", "MAIN", "MAKE", "MALE", "MALI", "MALL", "MALT",
"MANA", "MANN", "MANY", "MARC", "MARE", "MARK", "MARS", "MART",
"MARY", "MASH", "MASK", "MASS", "MAST", "MATE", "MATH", "MAUL",
"MAYO", "MEAD", "MEAL", "MEAN", "MEAT", "MEEK", "MEET", "MELD",
"MELT", "MEMO", "MEND", "MENU", "MERT", "MESH", "MESS", "MICE",
"MIKE", "MILD", "MILE", "MILK", "MILL", "MILT", "MIMI", "MIND",
"MINE", "MINI", "MINK", "MINT", "MIRE", "MISS", "MIST", "MITE",
"MITT", "MOAN", "MOAT", "MOCK", "MODE", "MOLD", "MOLE", "MOLL",
"MOLT", "MONA", "MONK", "MONT", "MOOD", "MOON", "MOOR", "MOOT",
"MORE", "MORN", "MORT", "MOSS", "MOST", "MOTH", "MOVE", "MUCH",
"MUCK", "MUDD", "MUFF", "MULE", "MULL", "MURK", "MUSH", "MUST",
"MUTE", "MUTT", "MYRA", "MYTH", "NAGY", "NAIL", "NAIR", "NAME",
"NARY", "NASH", "NAVE", "NAVY", "NEAL", "NEAR", "NEAT", "NECK",
"NEED", "NEIL", "NELL", "NEON", "NERO", "NESS", "NEST", "NEWS",
"NEWT", "NIBS", "NICE", "NICK", "NILE", "NINA", "NINE", "NOAH",
"NODE", "NOEL", "NOLL", "NONE", "NOOK", "NOON", "NORM", "NOSE",
"NOTE", "NOUN", "NOVA", "NUDE", "NULL", "NUMB", "OATH", "OBEY",
"OBOE", "ODIN", "OHIO", "OILY", "OINT", "OKAY", "OLAF", "OLDY",
"OLGA", "OLIN", "OMAN", "OMEN", "OMIT", "ONCE", "ONES", "ONLY",
"ONTO", "ONUS", "ORAL", "ORGY", "OSLO", "OTIS", "OTTO", "OUCH",
"OUST", "OUTS", "OVAL", "OVEN", "OVER", "OWLY", "OWNS", "QUAD",
"QUIT", "QUOD", "RACE", "RACK", "RACY", "RAFT", "RAGE", "RAID",
"RAIL", "RAIN", "RAKE", "RANK", "RANT", "RARE", "RASH", "RATE",
"RAVE", "RAYS", "READ", "REAL", "REAM", "REAR", "RECK", "REED",
"REEF", "REEK", "REEL", "REID", "REIN", "RENA", "REND", "RENT",
"REST", "RICE", "RICH", "RICK", "RIDE", "RIFT", "RILL", "RIME",
"RING", "RINK", "RISE", "RISK", "RITE", "ROAD", "ROAM", "ROAR",
"ROBE", "ROCK", "RODE", "ROIL", "ROLL", "ROME", "ROOD", "ROOF",
"ROOK", "ROOM", "ROOT", "ROSA", "ROSE", "ROSS", "ROSY", "ROTH",
"ROUT", "ROVE", "ROWE", "ROWS", "RUBE", "RUBY", "RUDE", "RUDY",
"RUIN", "RULE", "RUNG", "RUNS", "RUNT", "RUSE", "RUSH", "RUSK",
"RUSS", "RUST", "RUTH", "SACK", "SAFE", "SAGE", "SAID", "SAIL",
"SALE", "SALK", "SALT", "SAME", "SAND", "SANE", "SANG", "SANK",
"SARA", "SAUL", "SAVE", "SAYS", "SCAN", "SCAR", "SCAT", "SCOT",
"SEAL", "SEAM", "SEAR", "SEAT", "SEED", "SEEK", "SEEM", "SEEN",
"SEES", "SELF", "SELL", "SEND", "SENT", "SETS", "SEWN", "SHAG",
"SHAM", "SHAW", "SHAY", "SHED", "SHIM", "SHIN", "SHOD", "SHOE",
"SHOT", "SHOW", "SHUN", "SHUT", "SICK", "SIDE", "SIFT", "SIGH",
"SIGN", "SILK", "SILL", "SILO", "SILT", "SINE", "SING", "SINK",
"SIRE", "SITE", "SITS", "SITU", "SKAT", "SKEW", "SKID", "SKIM",
"SKIN", "SKIT", "SLAB", "SLAM", "SLAT", "SLAY", "SLED", "SLEW",
"SLID", "SLIM", "SLIT", "SLOB", "SLOG", "SLOT", "SLOW", "SLUG",
"SLUM", "SLUR", "SMOG", "SMUG", "SNAG", "SNOB", "SNOW", "SNUB",
"SNUG", "SOAK", "SOAR", "SOCK", "SODA", "SOFA", "SOFT", "SOIL",
"SOLD", "SOME", "SONG", "SOON", "SOOT", "SORE", "SORT", "SOUL",
"SOUR", "SOWN", "STAB", "STAG", "STAN", "STAR", "STAY", "STEM",
"STEW", "STIR", "STOW", "STUB", "STUN", "SUCH", "SUDS", "SUIT",
"SULK", "SUMS", "SUNG", "SUNK", "SURE", "SURF", "SWAB", "SWAG",
"SWAM", "SWAN", "SWAT", "SWAY", "SWIM", "SWUM", "TACK", "TACT",
"TAIL", "TAKE", "TALE", "TALK", "TALL", "TANK", "TASK", "TATE",
"TAUT", "TEAL", "TEAM", "TEAR", "TECH", "TEEM", "TEEN", "TEET",
"TELL", "TEND", "TENT", "TERM", "TERN", "TESS", "TEST", "THAN",
"THAT", "THEE", "THEM", "THEN", "THEY", "THIN", "THIS", "THUD",
"THUG", "TICK", "TIDE", "TIDY", "TIED", "TIER", "TILE", "TILL",
"TILT", "TIME", "TINA", "TINE", "TINT", "TINY", "TIRE", "TOAD",
"TOGO", "TOIL", "TOLD", "TOLL", "TONE", "TONG", "TONY", "TOOK",
"TOOL", "TOOT", "TORE", "TORN", "TOTE", "TOUR", "TOUT", "TOWN",
"TRAG", "TRAM", "TRAY", "TREE", "TREK", "TRIG", "TRIM", "TRIO",
"TROD", "TROT", "TROY", "TRUE", "TUBA", "TUBE", "TUCK", "TUFT",
"TUNA", "TUNE", "TUNG", "TURF", "TURN", "TUSK", "TWIG", "TWIN",
"TWIT", "ULAN", "UNIT", "URGE", "USED", "USER", "USES", "UTAH",
"VAIL", "VAIN", "VALE", "VARY", "VASE", "VAST", "VEAL", "VEDA",
"VEIL", "VEIN", "VEND", "VENT", "VERB", "VERY", "VETO", "VICE",
"VIEW", "VINE", "VISE", "VOID", "VOLT", "VOTE", "WACK", "WADE",
"WAGE", "WAIL", "WAIT", "WAKE", "WALE", "WALK", "WALL", "WALT",
"WAND", "WANE", "WANG", "WANT", "WARD", "WARM", "WARN", "WART",
"WASH", "WAST", "WATS", "WATT", "WAVE", "WAVY", "WAYS", "WEAK",
"WEAL", "WEAN", "WEAR", "WEED", "WEEK", "WEIR", "WELD", "WELL",
"WELT", "WENT", "WERE", "WERT", "WEST", "WHAM", "WHAT", "WHEE",
"WHEN", "WHET", "WHOA", "WHOM", "WICK", "WIFE", "WILD", "WILL",
"WIND", "WINE", "WING", "WINK", "WINO", "WIRE", "WISE", "WISH",
"WITH", "WOLF", "WONT", "WOOD", "WOOL", "WORD", "WORE", "WORK",
"WORM", "WORN", "WOVE", "WRIT", "WYNN", "YALE", "YANG", "YANK",
"YARD", "YARN", "YAWL", "YAWN", "YEAH", "YEAR", "YELL", "YOGA",
"YOKE" };
#endif /* _OTP_H_ */
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_otp_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( otp )
SASL_SERVER_PLUG_INIT( otp )
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_passdss_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( passdss )
SASL_SERVER_PLUG_INIT( passdss )
-491
View File
@@ -1,491 +0,0 @@
/* Plain SASL plugin
* Rob Siemborski
* Tim Martin
* $Id: plain.c,v 1.67 2009/06/10 16:05:19 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <sasl.h>
#include <saslplug.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_plain_plugin_decl.h>
#endif
/***************************** Common Section *****************************/
static const char plugin_id[] = "$Id: plain.c,v 1.67 2009/06/10 16:05:19 mel Exp $";
/***************************** Server Section *****************************/
static int plain_server_mech_new(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
const char *challenge __attribute__((unused)),
unsigned challen __attribute__((unused)),
void **conn_context)
{
/* holds state are in */
if (!conn_context) {
PARAMERROR( sparams->utils );
return SASL_BADPARAM;
}
*conn_context = NULL;
return SASL_OK;
}
static int plain_server_mech_step(void *conn_context __attribute__((unused)),
sasl_server_params_t *params,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams)
{
const char *author;
const char *authen;
const char *password;
unsigned password_len;
unsigned lup = 0;
int result;
char *passcopy;
unsigned canon_flags = 0;
*serverout = NULL;
*serveroutlen = 0;
/* should have received author-id NUL authen-id NUL password */
/* get author */
author = clientin;
while ((lup < clientinlen) && (clientin[lup] != 0)) ++lup;
if (lup >= clientinlen) {
SETERROR(params->utils, "Can only find author (no password)");
return SASL_BADPROT;
}
/* get authen */
++lup;
authen = clientin + lup;
while ((lup < clientinlen) && (clientin[lup] != 0)) ++lup;
if (lup >= clientinlen) {
params->utils->seterror(params->utils->conn, 0,
"Can only find author/en (no password)");
return SASL_BADPROT;
}
/* get password */
lup++;
password = clientin + lup;
while ((lup < clientinlen) && (clientin[lup] != 0)) ++lup;
password_len = (unsigned) (clientin + lup - password);
if (lup != clientinlen) {
SETERROR(params->utils,
"Got more data than we were expecting in the PLAIN plugin\n");
return SASL_BADPROT;
}
/* this kinda sucks. we need password to be null terminated
but we can't assume there is an allocated byte at the end
of password so we have to copy it */
passcopy = params->utils->malloc(password_len + 1);
if (passcopy == NULL) {
MEMERROR(params->utils);
return SASL_NOMEM;
}
strncpy(passcopy, password, password_len);
passcopy[password_len] = '\0';
/* Canonicalize userid first, so that password verification is only
* against the canonical id */
if (!author || !*author) {
author = authen;
canon_flags = SASL_CU_AUTHZID;
} else if (strcmp(author, authen) == 0) {
/* While this isn't going to find out that <user> and <user>@<defaultdomain>
are the same thing, this is good enough for many cases */
canon_flags = SASL_CU_AUTHZID;
}
result = params->canon_user(params->utils->conn,
authen,
0,
SASL_CU_AUTHID | canon_flags | SASL_CU_EXTERNALLY_VERIFIED,
oparams);
if (result != SASL_OK) {
_plug_free_string(params->utils, &passcopy);
return result;
}
/* verify password (and possibly fetch both authentication and
authorization identity related properties) - return SASL_OK
on success */
result = params->utils->checkpass(params->utils->conn,
oparams->authid,
oparams->alen,
passcopy,
password_len);
_plug_free_string(params->utils, &passcopy);
if (result != SASL_OK) {
params->utils->seterror(params->utils->conn, 0,
"Password verification failed");
return result;
}
/* Canonicalize and store the authorization ID */
/* We need to do this after calling verify_user just in case verify_user
* needed to get auxprops itself */
if (canon_flags == 0) {
const struct propval *pr;
int i;
pr = params->utils->prop_get(params->propctx);
if (!pr) {
return SASL_FAIL;
}
/* params->utils->checkpass() might have fetched authorization identity related properties
for the wrong user name. Free these values. */
for (i = 0; pr[i].name; i++) {
if (pr[i].name[0] == '*') {
continue;
}
if (pr[i].values) {
params->utils->prop_erase(params->propctx, pr[i].name);
}
}
result = params->canon_user(params->utils->conn,
author,
0,
SASL_CU_AUTHZID,
oparams);
if (result != SASL_OK) {
return result;
}
}
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
return SASL_OK;
}
static sasl_server_plug_t plain_server_plugins[] =
{
{
"PLAIN", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOANONYMOUS
| SASL_SEC_PASS_CREDENTIALS, /* security_flags */
SASL_FEAT_WANT_CLIENT_FIRST
| SASL_FEAT_ALLOWS_PROXY, /* features */
NULL, /* glob_context */
&plain_server_mech_new, /* mech_new */
&plain_server_mech_step, /* mech_step */
NULL, /* mech_dispose */
NULL, /* mech_free */
NULL, /* setpass */
NULL, /* user_query */
NULL, /* idle */
NULL, /* mech_avail */
NULL /* spare */
}
};
int plain_server_plug_init(const sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_server_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_SERVER_PLUG_VERSION) {
SETERROR(utils, "PLAIN version mismatch");
return SASL_BADVERS;
}
*out_version = SASL_SERVER_PLUG_VERSION;
*pluglist = plain_server_plugins;
*plugcount = 1;
return SASL_OK;
}
/***************************** Client Section *****************************/
typedef struct client_context {
char *out_buf;
unsigned out_buf_len;
} client_context_t;
static int plain_client_mech_new(void *glob_context __attribute__((unused)),
sasl_client_params_t *params,
void **conn_context)
{
client_context_t *text;
/* holds state are in */
text = params->utils->malloc(sizeof(client_context_t));
if (text == NULL) {
MEMERROR( params->utils );
return SASL_NOMEM;
}
memset(text, 0, sizeof(client_context_t));
*conn_context = text;
return SASL_OK;
}
static int plain_client_mech_step(void *conn_context,
sasl_client_params_t *params,
const char *serverin __attribute__((unused)),
unsigned serverinlen __attribute__((unused)),
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams)
{
client_context_t *text = (client_context_t *) conn_context;
const char *user = NULL, *authid = NULL;
sasl_secret_t *password = NULL;
unsigned int free_password = 0; /* set if we need to free password */
int user_result = SASL_OK;
int auth_result = SASL_OK;
int pass_result = SASL_OK;
int result;
char *p;
*clientout = NULL;
*clientoutlen = 0;
/* doesn't really matter how the server responds */
/* check if sec layer strong enough */
if (params->props.min_ssf > params->external_ssf) {
SETERROR( params->utils, "SSF requested of PLAIN plugin");
return SASL_TOOWEAK;
}
/* try to get the authid */
if (oparams->authid == NULL) {
auth_result = _plug_get_authid(params->utils, &authid, prompt_need);
if ((auth_result != SASL_OK) && (auth_result != SASL_INTERACT))
return auth_result;
}
/* try to get the userid */
if (oparams->user == NULL) {
user_result = _plug_get_userid(params->utils, &user, prompt_need);
if ((user_result != SASL_OK) && (user_result != SASL_INTERACT))
return user_result;
}
/* try to get the password */
if (password == NULL) {
pass_result = _plug_get_password(params->utils, &password,
&free_password, prompt_need);
if ((pass_result != SASL_OK) && (pass_result != SASL_INTERACT))
return pass_result;
}
/* free prompts we got */
if (prompt_need && *prompt_need) {
params->utils->free(*prompt_need);
*prompt_need = NULL;
}
/* if there are prompts not filled in */
if ((user_result == SASL_INTERACT) || (auth_result == SASL_INTERACT) ||
(pass_result == SASL_INTERACT)) {
/* make the prompt list */
result =
_plug_make_prompts(params->utils, prompt_need,
user_result == SASL_INTERACT ?
"Please enter your authorization name" : NULL,
NULL,
auth_result == SASL_INTERACT ?
"Please enter your authentication name" : NULL,
NULL,
pass_result == SASL_INTERACT ?
"Please enter your password" : NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
if (result != SASL_OK) goto cleanup;
return SASL_INTERACT;
}
if (!password) {
PARAMERROR(params->utils);
return SASL_BADPARAM;
}
if (!user || !*user) {
result = params->canon_user(params->utils->conn, authid, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID, oparams);
}
else {
result = params->canon_user(params->utils->conn, user, 0,
SASL_CU_AUTHZID, oparams);
if (result != SASL_OK) goto cleanup;
result = params->canon_user(params->utils->conn, authid, 0,
SASL_CU_AUTHID, oparams);
}
if (result != SASL_OK) goto cleanup;
/* send authorized id NUL authentication id NUL password */
*clientoutlen = ((user && *user ? oparams->ulen : 0) +
1 + oparams->alen +
1 + password->len);
/* remember the extra NUL on the end for stupid clients */
result = _plug_buf_alloc(params->utils, &(text->out_buf),
&(text->out_buf_len), *clientoutlen + 1);
if (result != SASL_OK) goto cleanup;
memset(text->out_buf, 0, *clientoutlen + 1);
p = text->out_buf;
if (user && *user) {
memcpy(p, oparams->user, oparams->ulen);
p += oparams->ulen;
}
memcpy(++p, oparams->authid, oparams->alen);
p += oparams->alen;
memcpy(++p, password->data, password->len);
*clientout = text->out_buf;
/* set oparams */
oparams->doneflag = 1;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0;
oparams->encode_context = NULL;
oparams->encode = NULL;
oparams->decode_context = NULL;
oparams->decode = NULL;
oparams->param_version = 0;
result = SASL_OK;
cleanup:
/* free sensitive info */
if (free_password) _plug_free_secret(params->utils, &password);
return result;
}
static void plain_client_mech_dispose(void *conn_context,
const sasl_utils_t *utils)
{
client_context_t *text = (client_context_t *) conn_context;
if (!text) return;
if (text->out_buf) utils->free(text->out_buf);
utils->free(text);
}
static sasl_client_plug_t plain_client_plugins[] =
{
{
"PLAIN", /* mech_name */
0, /* max_ssf */
SASL_SEC_NOANONYMOUS
| SASL_SEC_PASS_CREDENTIALS, /* security_flags */
SASL_FEAT_WANT_CLIENT_FIRST
| SASL_FEAT_ALLOWS_PROXY, /* features */
NULL, /* required_prompts */
NULL, /* glob_context */
&plain_client_mech_new, /* mech_new */
&plain_client_mech_step, /* mech_step */
&plain_client_mech_dispose, /* mech_dispose */
NULL, /* mech_free */
NULL, /* idle */
NULL, /* spare */
NULL /* spare */
}
};
int plain_client_plug_init(sasl_utils_t *utils,
int maxversion,
int *out_version,
sasl_client_plug_t **pluglist,
int *plugcount)
{
if (maxversion < SASL_CLIENT_PLUG_VERSION) {
SETERROR(utils, "PLAIN version mismatch");
return SASL_BADVERS;
}
*out_version = SASL_CLIENT_PLUG_VERSION;
*pluglist = plain_client_plugins;
*plugcount = 1;
return SASL_OK;
}
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_plain_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( plain )
SASL_SERVER_PLUG_INIT( plain )
@@ -1,924 +0,0 @@
/* Generic SASL plugin utility functions
* Rob Siemborski
* $Id: plugin_common.c,v 1.22 2011/09/01 14:12:18 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#ifndef macintosh
#ifdef WIN32
# include <winsock2.h>
#else
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <netdb.h>
# include <sys/utsname.h>
#endif /* WIN32 */
#endif /* macintosh */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <fcntl.h>
#include <sasl.h>
#include <saslutil.h>
#include <saslplug.h>
#include <errno.h>
#include <ctype.h>
#include <stdio.h>
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include "plugin_common.h"
/* translate IPv4 mapped IPv6 address to IPv4 address */
static void sockaddr_unmapped(
#ifdef IN6_IS_ADDR_V4MAPPED
struct sockaddr *sa, socklen_t *len
#else
struct sockaddr *sa __attribute__((unused)),
socklen_t *len __attribute__((unused))
#endif
)
{
#ifdef IN6_IS_ADDR_V4MAPPED
struct sockaddr_in6 *sin6;
struct sockaddr_in *sin4;
uint32_t addr;
int port;
if (sa->sa_family != AF_INET6)
return;
sin6 = (struct sockaddr_in6 *)sa;
if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
return;
sin4 = (struct sockaddr_in *)sa;
addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
port = sin6->sin6_port;
memset(sin4, 0, sizeof(struct sockaddr_in));
sin4->sin_addr.s_addr = addr;
sin4->sin_port = port;
sin4->sin_family = AF_INET;
#ifdef HAVE_SOCKADDR_SA_LEN
sin4->sin_len = sizeof(struct sockaddr_in);
#endif
*len = sizeof(struct sockaddr_in);
#else
return;
#endif
}
int _plug_ipfromstring(const sasl_utils_t *utils, const char *addr,
struct sockaddr *out, socklen_t outlen)
{
int i, j;
socklen_t len;
struct sockaddr_storage ss;
struct addrinfo hints, *ai = NULL;
char hbuf[NI_MAXHOST];
if(!utils || !addr || !out) {
if(utils) PARAMERROR( utils );
return SASL_BADPARAM;
}
/* Parse the address */
for (i = 0; addr[i] != '\0' && addr[i] != ';'; i++) {
if (i >= NI_MAXHOST) {
if(utils) PARAMERROR( utils );
return SASL_BADPARAM;
}
hbuf[i] = addr[i];
}
hbuf[i] = '\0';
if (addr[i] == ';')
i++;
/* XXX/FIXME: Do we need this check? */
for (j = i; addr[j] != '\0'; j++)
if (!isdigit((int)(addr[j]))) {
PARAMERROR( utils );
return SASL_BADPARAM;
}
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
if (getaddrinfo(hbuf, &addr[i], &hints, &ai) != 0) {
PARAMERROR( utils );
return SASL_BADPARAM;
}
len = (socklen_t) ai->ai_addrlen;
memcpy(&ss, ai->ai_addr, len);
freeaddrinfo(ai);
sockaddr_unmapped((struct sockaddr *)&ss, &len);
if (outlen < len) {
PARAMERROR( utils );
return SASL_BUFOVER;
}
memcpy(out, &ss, len);
return SASL_OK;
}
int _plug_iovec_to_buf(const sasl_utils_t *utils, const struct iovec *vec,
unsigned numiov, buffer_info_t **output)
{
unsigned i;
int ret;
buffer_info_t *out;
char *pos;
if(!utils || !vec || !output) {
if(utils) PARAMERROR( utils );
return SASL_BADPARAM;
}
if(!(*output)) {
*output = utils->malloc(sizeof(buffer_info_t));
if(!*output) {
MEMERROR(utils);
return SASL_NOMEM;
}
memset(*output,0,sizeof(buffer_info_t));
}
out = *output;
out->curlen = 0;
for(i=0; i<numiov; i++)
out->curlen += vec[i].iov_len;
ret = _plug_buf_alloc(utils, &out->data, &out->reallen, out->curlen);
if(ret != SASL_OK) {
MEMERROR(utils);
return SASL_NOMEM;
}
memset(out->data, 0, out->reallen);
pos = out->data;
for(i=0; i<numiov; i++) {
memcpy(pos, vec[i].iov_base, vec[i].iov_len);
pos += vec[i].iov_len;
}
return SASL_OK;
}
/* Basically a conditional call to realloc(), if we need more */
int _plug_buf_alloc(const sasl_utils_t *utils, char **rwbuf,
unsigned *curlen, unsigned newlen)
{
if(!utils || !rwbuf || !curlen) {
PARAMERROR(utils);
return SASL_BADPARAM;
}
if(!(*rwbuf)) {
*rwbuf = utils->malloc(newlen);
if (*rwbuf == NULL) {
*curlen = 0;
MEMERROR(utils);
return SASL_NOMEM;
}
*curlen = newlen;
} else if(*rwbuf && *curlen < newlen) {
unsigned needed = 2*(*curlen);
while(needed < newlen)
needed *= 2;
*rwbuf = utils->realloc(*rwbuf, needed);
if (*rwbuf == NULL) {
*curlen = 0;
MEMERROR(utils);
return SASL_NOMEM;
}
*curlen = needed;
}
return SASL_OK;
}
/* copy a string */
int _plug_strdup(const sasl_utils_t * utils, const char *in,
char **out, int *outlen)
{
size_t len = strlen(in);
if(!utils || !in || !out) {
if(utils) PARAMERROR(utils);
return SASL_BADPARAM;
}
*out = utils->malloc(len + 1);
if (!*out) {
MEMERROR(utils);
return SASL_NOMEM;
}
strcpy((char *) *out, in);
if (outlen)
*outlen = (int) len;
return SASL_OK;
}
void _plug_free_string(const sasl_utils_t *utils, char **str)
{
size_t len;
if (!utils || !str || !(*str)) return;
len = strlen(*str);
utils->erasebuffer(*str, (unsigned int) len);
utils->free(*str);
*str=NULL;
}
void _plug_free_secret(const sasl_utils_t *utils, sasl_secret_t **secret)
{
if(!utils || !secret || !(*secret)) return;
utils->erasebuffer((char *)(*secret)->data, (*secret)->len);
utils->free(*secret);
*secret = NULL;
}
/*
* Trys to find the prompt with the lookingfor id in the prompt list
* Returns it if found. NULL otherwise
*/
sasl_interact_t *_plug_find_prompt(sasl_interact_t **promptlist,
unsigned int lookingfor)
{
sasl_interact_t *prompt;
if (promptlist && *promptlist) {
for (prompt = *promptlist; prompt->id != SASL_CB_LIST_END; ++prompt) {
if (prompt->id==lookingfor)
return prompt;
}
}
return NULL;
}
/*
* Retrieve the simple string given by the callback id.
*/
int _plug_get_simple(const sasl_utils_t *utils, unsigned int id, int required,
const char **result, sasl_interact_t **prompt_need)
{
int ret = SASL_FAIL;
sasl_getsimple_t *simple_cb;
void *simple_context;
sasl_interact_t *prompt;
*result = NULL;
/* see if we were given the result in the prompt */
prompt = _plug_find_prompt(prompt_need, id);
if (prompt != NULL) {
/* We prompted, and got.*/
if (required && !prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
return SASL_BADPARAM;
}
*result = prompt->result;
return SASL_OK;
}
/* Try to get the callback... */
ret = utils->getcallback(utils->conn, id, (sasl_callback_ft *)&simple_cb, &simple_context);
if (ret == SASL_FAIL && !required)
return SASL_OK;
if (ret == SASL_OK && simple_cb) {
ret = simple_cb(simple_context, id, result, NULL);
if (ret != SASL_OK)
return ret;
if (required && !*result) {
PARAMERROR(utils);
return SASL_BADPARAM;
}
}
return ret;
}
/*
* Retrieve the user password.
*/
int _plug_get_password(const sasl_utils_t *utils, sasl_secret_t **password,
unsigned int *iscopy, sasl_interact_t **prompt_need)
{
int ret = SASL_FAIL;
sasl_getsecret_t *pass_cb;
void *pass_context;
sasl_interact_t *prompt;
*password = NULL;
*iscopy = 0;
/* see if we were given the password in the prompt */
prompt = _plug_find_prompt(prompt_need, SASL_CB_PASS);
if (prompt != NULL) {
/* We prompted, and got.*/
if (!prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
return SASL_BADPARAM;
}
/* copy what we got into a secret_t */
*password = (sasl_secret_t *) utils->malloc(sizeof(sasl_secret_t) +
prompt->len + 1);
if (!*password) {
MEMERROR(utils);
return SASL_NOMEM;
}
(*password)->len=prompt->len;
memcpy((*password)->data, prompt->result, prompt->len);
(*password)->data[(*password)->len]=0;
*iscopy = 1;
return SASL_OK;
}
/* Try to get the callback... */
ret = utils->getcallback(utils->conn, SASL_CB_PASS,
(sasl_callback_ft *)&pass_cb, &pass_context);
if (ret == SASL_OK && pass_cb) {
ret = pass_cb(utils->conn, pass_context, SASL_CB_PASS, password);
if (ret != SASL_OK)
return ret;
if (!*password) {
PARAMERROR(utils);
return SASL_BADPARAM;
}
}
return ret;
}
/*
* Retrieve the string given by the challenge prompt id.
*/
int _plug_challenge_prompt(const sasl_utils_t *utils, unsigned int id,
const char *challenge, const char *promptstr,
const char **result, sasl_interact_t **prompt_need)
{
int ret = SASL_FAIL;
sasl_chalprompt_t *chalprompt_cb;
void *chalprompt_context;
sasl_interact_t *prompt;
*result = NULL;
/* see if we were given the password in the prompt */
prompt = _plug_find_prompt(prompt_need, id);
if (prompt != NULL) {
/* We prompted, and got.*/
if (!prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
return SASL_BADPARAM;
}
*result = prompt->result;
return SASL_OK;
}
/* Try to get the callback... */
ret = utils->getcallback(utils->conn, id,
(sasl_callback_ft *)&chalprompt_cb, &chalprompt_context);
if (ret == SASL_OK && chalprompt_cb) {
ret = chalprompt_cb(chalprompt_context, id,
challenge, promptstr, NULL, result, NULL);
if (ret != SASL_OK)
return ret;
if (!*result) {
PARAMERROR(utils);
return SASL_BADPARAM;
}
}
return ret;
}
/*
* Retrieve the client realm.
*/
int _plug_get_realm(const sasl_utils_t *utils, const char **availrealms,
const char **realm, sasl_interact_t **prompt_need)
{
int ret = SASL_FAIL;
sasl_getrealm_t *realm_cb;
void *realm_context;
sasl_interact_t *prompt;
*realm = NULL;
/* see if we were given the result in the prompt */
prompt = _plug_find_prompt(prompt_need, SASL_CB_GETREALM);
if (prompt != NULL) {
/* We prompted, and got.*/
if (!prompt->result) {
SETERROR(utils, "Unexpectedly missing a prompt result");
return SASL_BADPARAM;
}
*realm = prompt->result;
return SASL_OK;
}
/* Try to get the callback... */
ret = utils->getcallback(utils->conn, SASL_CB_GETREALM,
(sasl_callback_ft *)&realm_cb, &realm_context);
if (ret == SASL_OK && realm_cb) {
ret = realm_cb(realm_context, SASL_CB_GETREALM, availrealms, realm);
if (ret != SASL_OK)
return ret;
if (!*realm) {
PARAMERROR(utils);
return SASL_BADPARAM;
}
}
return ret;
}
/*
* Make the requested prompts. (prompt==NULL means we don't want it)
*/
int _plug_make_prompts(const sasl_utils_t *utils,
sasl_interact_t **prompts_res,
const char *user_prompt, const char *user_def,
const char *auth_prompt, const char *auth_def,
const char *pass_prompt, const char *pass_def,
const char *echo_chal,
const char *echo_prompt, const char *echo_def,
const char *realm_chal,
const char *realm_prompt, const char *realm_def)
{
int num = 1;
int alloc_size;
sasl_interact_t *prompts;
if (user_prompt) num++;
if (auth_prompt) num++;
if (pass_prompt) num++;
if (echo_prompt) num++;
if (realm_prompt) num++;
if (num == 1) {
SETERROR( utils, "make_prompts() called with no actual prompts" );
return SASL_FAIL;
}
alloc_size = sizeof(sasl_interact_t)*num;
prompts = utils->malloc(alloc_size);
if (!prompts) {
MEMERROR( utils );
return SASL_NOMEM;
}
memset(prompts, 0, alloc_size);
*prompts_res = prompts;
if (user_prompt) {
(prompts)->id = SASL_CB_USER;
(prompts)->challenge = "Authorization Name";
(prompts)->prompt = user_prompt;
(prompts)->defresult = user_def;
prompts++;
}
if (auth_prompt) {
(prompts)->id = SASL_CB_AUTHNAME;
(prompts)->challenge = "Authentication Name";
(prompts)->prompt = auth_prompt;
(prompts)->defresult = auth_def;
prompts++;
}
if (pass_prompt) {
(prompts)->id = SASL_CB_PASS;
(prompts)->challenge = "Password";
(prompts)->prompt = pass_prompt;
(prompts)->defresult = pass_def;
prompts++;
}
if (echo_prompt) {
(prompts)->id = SASL_CB_ECHOPROMPT;
(prompts)->challenge = echo_chal;
(prompts)->prompt = echo_prompt;
(prompts)->defresult = echo_def;
prompts++;
}
if (realm_prompt) {
(prompts)->id = SASL_CB_GETREALM;
(prompts)->challenge = realm_chal;
(prompts)->prompt = realm_prompt;
(prompts)->defresult = realm_def;
prompts++;
}
/* add the ending one */
(prompts)->id = SASL_CB_LIST_END;
(prompts)->challenge = NULL;
(prompts)->prompt = NULL;
(prompts)->defresult = NULL;
return SASL_OK;
}
void _plug_decode_init(decode_context_t *text,
const sasl_utils_t *utils, unsigned int in_maxbuf)
{
memset(text, 0, sizeof(decode_context_t));
text->utils = utils;
text->needsize = 4;
text->in_maxbuf = in_maxbuf;
}
/*
* Decode as much of the input as possible (possibly none),
* using decode_pkt() to decode individual packets.
*/
int _plug_decode(decode_context_t *text,
const char *input, unsigned inputlen,
char **output, /* output buffer */
unsigned *outputsize, /* current size of output buffer */
unsigned *outputlen, /* length of data in output buffer */
int (*decode_pkt)(void *rock,
const char *input, unsigned inputlen,
char **output, unsigned *outputlen),
void *rock)
{
unsigned int tocopy;
unsigned diff;
char *tmp;
unsigned tmplen;
int ret;
*outputlen = 0;
while (inputlen) { /* more input */
if (text->needsize) { /* need to get the rest of the 4-byte size */
/* copy as many bytes (up to 4) as we have into size buffer */
tocopy = (inputlen > text->needsize) ? text->needsize : inputlen;
memcpy(text->sizebuf + 4 - text->needsize, input, tocopy);
text->needsize -= tocopy;
input += tocopy;
inputlen -= tocopy;
if (!text->needsize) { /* we have the entire 4-byte size */
memcpy(&(text->size), text->sizebuf, 4);
text->size = ntohl(text->size);
if (!text->size) /* should never happen */
return SASL_FAIL;
if (text->size > text->in_maxbuf) {
text->utils->log(NULL, SASL_LOG_ERR,
"encoded packet size too big (%d > %d)",
text->size, text->in_maxbuf);
return SASL_FAIL;
}
if (!text->buffer)
text->buffer = text->utils->malloc(text->in_maxbuf);
if (text->buffer == NULL) return SASL_NOMEM;
text->cursize = 0;
} else {
/* We do NOT have the entire 4-byte size...
* wait for more data */
return SASL_OK;
}
}
diff = text->size - text->cursize; /* bytes needed for full packet */
if (inputlen < diff) { /* not a complete packet, need more input */
memcpy(text->buffer + text->cursize, input, inputlen);
text->cursize += inputlen;
return SASL_OK;
}
/* copy the rest of the packet */
memcpy(text->buffer + text->cursize, input, diff);
input += diff;
inputlen -= diff;
/* decode the packet (no need to free tmp) */
ret = decode_pkt(rock, text->buffer, text->size, &tmp, &tmplen);
if (ret != SASL_OK) return ret;
/* append the decoded packet to the output */
ret = _plug_buf_alloc(text->utils, output, outputsize,
*outputlen + tmplen + 1); /* +1 for NUL */
if (ret != SASL_OK) return ret;
memcpy(*output + *outputlen, tmp, tmplen);
*outputlen += tmplen;
/* protect stupid clients */
*(*output + *outputlen) = '\0';
/* reset for the next packet */
text->needsize = 4;
}
return SASL_OK;
}
void _plug_decode_free(decode_context_t *text)
{
if (text->buffer) text->utils->free(text->buffer);
}
/* returns the realm we should pretend to be in */
int _plug_parseuser(const sasl_utils_t *utils,
char **user, char **realm, const char *user_realm,
const char *serverFQDN, const char *input)
{
int ret;
char *r;
if(!user || !serverFQDN) {
PARAMERROR( utils );
return SASL_BADPARAM;
}
r = strchr(input, '@');
if (!r) {
/* hmmm, the user didn't specify a realm */
if(user_realm && user_realm[0]) {
ret = _plug_strdup(utils, user_realm, realm, NULL);
} else {
/* Default to serverFQDN */
ret = _plug_strdup(utils, serverFQDN, realm, NULL);
}
if (ret == SASL_OK) {
ret = _plug_strdup(utils, input, user, NULL);
}
} else {
r++;
ret = _plug_strdup(utils, r, realm, NULL);
*--r = '\0';
*user = utils->malloc(r - input + 1);
if (*user) {
strncpy(*user, input, r - input +1);
} else {
MEMERROR( utils );
ret = SASL_NOMEM;
}
*r = '@';
}
return ret;
}
int _plug_make_fulluser(const sasl_utils_t *utils,
char **fulluser,
const char * useronly,
const char *realm)
{
if(!fulluser || !useronly || !realm) {
PARAMERROR( utils );
return (SASL_BADPARAM);
}
*fulluser = utils->malloc (strlen(useronly) + strlen(realm) + 2);
if (*fulluser == NULL) {
MEMERROR( utils );
return (SASL_NOMEM);
}
strcpy (*fulluser, useronly);
strcat (*fulluser, "@");
strcat (*fulluser, realm);
return (SASL_OK);
}
char * _plug_get_error_message (const sasl_utils_t *utils,
#ifdef WIN32
DWORD error
#else
int error
#endif
)
{
char * return_value;
#ifdef WIN32
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
(LPTSTR) &lpMsgBuf,
0,
NULL
);
if (_plug_strdup (utils, lpMsgBuf, &return_value, NULL) != SASL_OK) {
return_value = NULL;
}
LocalFree( lpMsgBuf );
#else /* !WIN32 */
if (_plug_strdup (utils, strerror(error), &return_value, NULL) != SASL_OK) {
return_value = NULL;
}
#endif /* WIN32 */
return (return_value);
}
void _plug_snprintf_os_info (char * osbuf, int osbuf_len)
{
#ifdef WIN32
OSVERSIONINFOEX versioninfo;
char *sysname;
/* :
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
TCHAR szCSDVersion[ 128 ];
//Only NT SP 6 and later
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
*/
versioninfo.dwOSVersionInfoSize = sizeof (versioninfo);
sysname = "Unknown Windows";
if (GetVersionEx ((OSVERSIONINFO *) &versioninfo) == FALSE) {
snprintf(osbuf, osbuf_len, "%s", sysname);
goto SKIP_OS_INFO;
}
switch (versioninfo.dwPlatformId) {
case VER_PLATFORM_WIN32s: /* Win32s on Windows 3.1 */
sysname = "Win32s on Windows 3.1";
/* I can't test if dwBuildNumber has any meaning on Win32s */
break;
case VER_PLATFORM_WIN32_WINDOWS: /* 95/98/ME */
switch (versioninfo.dwMinorVersion) {
case 0:
sysname = "Windows 95";
break;
case 10:
sysname = "Windows 98";
break;
case 90:
sysname = "Windows Me";
break;
default:
sysname = "Unknown Windows 9X/ME series";
break;
}
/* Clear the high order word, as it contains major/minor version */
versioninfo.dwBuildNumber &= 0xFFFF;
break;
case VER_PLATFORM_WIN32_NT: /* NT/2000/XP/.NET */
if (versioninfo.dwMinorVersion > 99) {
} else {
switch (versioninfo.dwMajorVersion * 100 + versioninfo.dwMinorVersion) {
case 351:
sysname = "Windows NT 3.51";
break;
case 400:
sysname = "Windows NT 4.0";
break;
case 500:
sysname = "Windows 2000";
break;
case 501:
sysname = "Windows XP/.NET"; /* or Windows .NET Server */
break;
default:
sysname = "Unknown Windows NT series";
break;
}
}
break;
default:
break;
}
snprintf(osbuf, osbuf_len,
"%s %s (Build %u)",
sysname,
versioninfo.szCSDVersion,
versioninfo.dwBuildNumber
);
SKIP_OS_INFO:
;
#else /* !WIN32 */
struct utsname os;
uname(&os);
snprintf(osbuf, osbuf_len, "%s %s", os.sysname, os.release);
#endif /* WIN32 */
}
#if defined(WIN32)
unsigned int plug_sleep (unsigned int seconds)
{
long dwSec = seconds*1000;
Sleep (dwSec);
return 0;
}
#endif
@@ -1,222 +0,0 @@
/* Generic SASL plugin utility functions
* Rob Siemborski
* $Id: plugin_common.h,v 1.21 2006/01/17 12:18:21 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _PLUGIN_COMMON_H_
#define _PLUGIN_COMMON_H_
#include <config.h>
#ifndef macintosh
#ifdef WIN32
# include <winsock2.h>
#else
# include <sys/socket.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <netdb.h>
#endif /* WIN32 */
#endif /* macintosh */
#include <sasl.h>
#include <saslutil.h>
#include <saslplug.h>
#ifdef WIN32
#define PLUG_API __declspec(dllexport)
#else
#define PLUG_API extern
#endif
#define SASL_CLIENT_PLUG_INIT( x ) \
extern sasl_client_plug_init_t x##_client_plug_init; \
PLUG_API int sasl_client_plug_init(const sasl_utils_t *utils, \
int maxversion, int *out_version, \
sasl_client_plug_t **pluglist, \
int *plugcount) { \
return x##_client_plug_init(utils, maxversion, out_version, \
pluglist, plugcount); \
}
#define SASL_SERVER_PLUG_INIT( x ) \
extern sasl_server_plug_init_t x##_server_plug_init; \
PLUG_API int sasl_server_plug_init(const sasl_utils_t *utils, \
int maxversion, int *out_version, \
sasl_server_plug_t **pluglist, \
int *plugcount) { \
return x##_server_plug_init(utils, maxversion, out_version, \
pluglist, plugcount); \
}
#define SASL_AUXPROP_PLUG_INIT( x ) \
extern sasl_auxprop_init_t x##_auxprop_plug_init; \
PLUG_API int sasl_auxprop_plug_init(const sasl_utils_t *utils, \
int maxversion, int *out_version, \
sasl_auxprop_plug_t **plug, \
const char *plugname) {\
return x##_auxprop_plug_init(utils, maxversion, out_version, \
plug, plugname); \
}
#define SASL_CANONUSER_PLUG_INIT( x ) \
extern sasl_canonuser_init_t x##_canonuser_plug_init; \
PLUG_API int sasl_canonuser_init(const sasl_utils_t *utils, \
int maxversion, int *out_version, \
sasl_canonuser_plug_t **plug, \
const char *plugname) {\
return x##_canonuser_plug_init(utils, maxversion, out_version, \
plug, plugname); \
}
/* note: msg cannot include additional variables, so if you want to
* do a printf-format string, then you need to call seterror yourself */
#define SETERROR( utils, msg ) (utils)->seterror( (utils)->conn, 0, (msg) )
#ifndef MEMERROR
#define MEMERROR( utils ) \
(utils)->seterror( (utils)->conn, 0, \
"Out of Memory in " __FILE__ " near line %d", __LINE__ )
#endif
#ifndef PARAMERROR
#define PARAMERROR( utils ) \
(utils)->seterror( (utils)->conn, 0, \
"Parameter Error in " __FILE__ " near line %d", __LINE__ )
#endif
#ifndef SASLINT_H
typedef struct buffer_info
{
char *data;
unsigned curlen; /* Current length of data in buffer */
unsigned reallen; /* total length of buffer (>= curlen) */
} buffer_info_t;
#endif
#ifdef __cplusplus
extern "C" {
#endif
int _plug_ipfromstring(const sasl_utils_t *utils, const char *addr,
struct sockaddr *out, socklen_t outlen);
int _plug_iovec_to_buf(const sasl_utils_t *utils, const struct iovec *vec,
unsigned numiov, buffer_info_t **output);
int _plug_buf_alloc(const sasl_utils_t *utils, char **rwbuf,
unsigned *curlen, unsigned newlen);
int _plug_strdup(const sasl_utils_t * utils, const char *in,
char **out, int *outlen);
void _plug_free_string(const sasl_utils_t *utils, char **str);
void _plug_free_secret(const sasl_utils_t *utils, sasl_secret_t **secret);
#define _plug_get_userid(utils, result, prompt_need) \
_plug_get_simple(utils, SASL_CB_USER, 0, result, prompt_need)
#define _plug_get_authid(utils, result, prompt_need) \
_plug_get_simple(utils, SASL_CB_AUTHNAME, 1, result, prompt_need)
int _plug_get_simple(const sasl_utils_t *utils, unsigned int id, int required,
const char **result, sasl_interact_t **prompt_need);
int _plug_get_password(const sasl_utils_t *utils, sasl_secret_t **secret,
unsigned int *iscopy, sasl_interact_t **prompt_need);
int _plug_challenge_prompt(const sasl_utils_t *utils, unsigned int id,
const char *challenge, const char *promptstr,
const char **result, sasl_interact_t **prompt_need);
int _plug_get_realm(const sasl_utils_t *utils, const char **availrealms,
const char **realm, sasl_interact_t **prompt_need);
int _plug_make_prompts(const sasl_utils_t *utils,
sasl_interact_t **prompts_res,
const char *user_prompt, const char *user_def,
const char *auth_prompt, const char *auth_def,
const char *pass_prompt, const char *pass_def,
const char *echo_chal,
const char *echo_prompt, const char *echo_def,
const char *realm_chal,
const char *realm_prompt, const char *realm_def);
typedef struct decode_context {
const sasl_utils_t *utils;
unsigned int needsize; /* How much of the 4-byte size do we need? */
char sizebuf[4]; /* Buffer to accumulate the 4-byte size */
unsigned int size; /* Absolute size of the encoded packet */
char *buffer; /* Buffer to accumulate an encoded packet */
unsigned int cursize; /* Amount of packet data in the buffer */
unsigned int in_maxbuf; /* Maximum allowed size of an incoming encoded packet */
} decode_context_t;
void _plug_decode_init(decode_context_t *text,
const sasl_utils_t *utils, unsigned int in_maxbuf);
int _plug_decode(decode_context_t *text,
const char *input, unsigned inputlen,
char **output, unsigned *outputsize, unsigned *outputlen,
int (*decode_pkt)(void *rock,
const char *input, unsigned inputlen,
char **output, unsigned *outputlen),
void *rock);
void _plug_decode_free(decode_context_t *text);
int _plug_parseuser(const sasl_utils_t *utils,
char **user, char **realm, const char *user_realm,
const char *serverFQDN, const char *input);
int _plug_make_fulluser(const sasl_utils_t *utils,
char **fulluser, const char * useronly, const char *realm);
char * _plug_get_error_message (const sasl_utils_t *utils,
#ifdef WIN32
DWORD error
#else
int error
#endif
);
void _plug_snprintf_os_info (char * osbuf, int osbuf_len);
#ifdef __cplusplus
}
#endif
#endif /* _PLUGIN_COMMON_H_ */
@@ -1,317 +0,0 @@
/* SASL server API implementation
* Rob Siemborski
* Tim Martin
* $Id: sasldb.c,v 1.17 2009/03/10 14:37:03 mel Exp $
*/
/*
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Office of Technology Transfer
* Carnegie Mellon University
* 5000 Forbes Avenue
* Pittsburgh, PA 15213-3890
* (412) 268-4387, fax: (412) 268-7395
* tech-transfer@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
/* sasldb stuff */
#include <stdio.h>
#include "sasl.h"
#include "saslutil.h"
#include "saslplug.h"
#include "../sasldb/sasldb.h"
#include "plugin_common.h"
static int sasldb_auxprop_lookup(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
unsigned flags,
const char *user,
unsigned ulen)
{
char *userid = NULL;
char *realm = NULL;
const char *user_realm = NULL;
int ret;
const struct propval *to_fetch, *cur;
char value[8192];
size_t value_len;
char *user_buf;
int verify_against_hashed_password;
int saw_user_password = 0;
if (!sparams || !user) return SASL_BADPARAM;
user_buf = sparams->utils->malloc(ulen + 1);
if(!user_buf) {
ret = SASL_NOMEM;
goto done;
}
memcpy(user_buf, user, ulen);
user_buf[ulen] = '\0';
if(sparams->user_realm) {
user_realm = sparams->user_realm;
} else {
user_realm = sparams->serverFQDN;
}
ret = _plug_parseuser(sparams->utils, &userid, &realm, user_realm,
sparams->serverFQDN, user_buf);
if(ret != SASL_OK) goto done;
to_fetch = sparams->utils->prop_get(sparams->propctx);
if (!to_fetch) {
ret = SASL_NOMEM;
goto done;
}
verify_against_hashed_password = flags & SASL_AUXPROP_VERIFY_AGAINST_HASH;
/* Use a fake value to signal that we have no property to lookup */
ret = SASL_CONTINUE;
for(cur = to_fetch; cur->name; cur++) {
int cur_ret;
const char *realname = cur->name;
/* Only look up properties that apply to this lookup! */
if(cur->name[0] == '*' && (flags & SASL_AUXPROP_AUTHZID)) continue;
if(!(flags & SASL_AUXPROP_AUTHZID)) {
if(cur->name[0] != '*') continue;
else realname = cur->name + 1;
}
/* If it's there already, we want to see if it needs to be
* overridden. userPassword is a special case, because it's value
is always present if SASL_AUXPROP_VERIFY_AGAINST_HASH is specified.
When SASL_AUXPROP_VERIFY_AGAINST_HASH is set, we just clear userPassword. */
if (cur->values && !(flags & SASL_AUXPROP_OVERRIDE) &&
(verify_against_hashed_password == 0 ||
strcasecmp(realname, SASL_AUX_PASSWORD_PROP) != 0)) {
continue;
} else if (cur->values) {
sparams->utils->prop_erase(sparams->propctx, cur->name);
}
if (strcasecmp(realname, SASL_AUX_PASSWORD_PROP) == 0) {
saw_user_password = 1;
}
cur_ret = _sasldb_getdata(sparams->utils,
sparams->utils->conn, userid, realm,
realname, value, sizeof(value), &value_len);
/* Assumption: cur_ret is never SASL_CONTINUE */
/* If this is the first property we've tried to fetch ==>
always set the global error code.
If we had SASL_NOUSER ==> any other error code overrides it
(including SASL_NOUSER). */
if (ret == SASL_CONTINUE || ret == SASL_NOUSER) {
ret = cur_ret;
} else if (ret == SASL_OK) {
/* Any error code other than SASL_NOUSER overrides SASL_OK.
(And SASL_OK overrides SASL_OK as well) */
if (cur_ret != SASL_NOUSER) {
ret = cur_ret;
}
}
/* Any other global error code is left as is */
if (cur_ret != SASL_OK) {
if (cur_ret != SASL_NOUSER) {
/* No point in continuing if we hit any serious error */
break;
}
/* We didn't find it, leave it as not found */
continue;
}
sparams->utils->prop_set(sparams->propctx, cur->name,
value, (unsigned) value_len);
}
/* [Keep in sync with LDAPDB, SQL]
If ret is SASL_CONTINUE, it means that no properties were requested
(or maybe some were requested, but they already have values and
SASL_AUXPROP_OVERRIDE flag is not set).
Always return SASL_OK in this case. */
if (ret == SASL_CONTINUE) {
ret = SASL_OK;
}
if (flags & SASL_AUXPROP_AUTHZID) {
/* This is a lie, but the caller can't handle
when we return SASL_NOUSER for authorization identity lookup. */
if (ret == SASL_NOUSER) {
ret = SASL_OK;
}
} else {
if (ret == SASL_NOUSER && saw_user_password == 0) {
/* Verify user existence by checking presence of
the userPassword attribute */
ret = _sasldb_getdata(sparams->utils,
sparams->utils->conn,
userid,
realm,
SASL_AUX_PASSWORD_PROP,
value,
sizeof(value),
&value_len);
}
}
done:
if (userid) sparams->utils->free(userid);
if (realm) sparams->utils->free(realm);
if (user_buf) sparams->utils->free(user_buf);
return ret;
}
static int sasldb_auxprop_store(void *glob_context __attribute__((unused)),
sasl_server_params_t *sparams,
struct propctx *ctx,
const char *user,
unsigned ulen)
{
char *userid = NULL;
char *realm = NULL;
const char *user_realm = NULL;
int ret = SASL_FAIL;
const struct propval *to_store, *cur;
char *user_buf;
/* just checking if we are enabled */
if(!ctx) return SASL_OK;
if(!sparams || !user) return SASL_BADPARAM;
user_buf = sparams->utils->malloc(ulen + 1);
if(!user_buf) {
ret = SASL_NOMEM;
goto done;
}
memcpy(user_buf, user, ulen);
user_buf[ulen] = '\0';
if(sparams->user_realm) {
user_realm = sparams->user_realm;
} else {
user_realm = sparams->serverFQDN;
}
ret = _plug_parseuser(sparams->utils, &userid, &realm, user_realm,
sparams->serverFQDN, user_buf);
if(ret != SASL_OK) goto done;
to_store = sparams->utils->prop_get(ctx);
if(!to_store) {
ret = SASL_BADPARAM;
goto done;
}
ret = SASL_OK;
for (cur = to_store; cur->name; cur++) {
char * value = (cur->values && cur->values[0]) ? cur->values[0] : NULL;
if (cur->name[0] == '*') {
continue;
}
/* WARN: We only support one value right now. */
ret = _sasldb_putdata(sparams->utils,
sparams->utils->conn,
userid,
realm,
cur->name,
value,
value ? strlen(value) : 0);
if (value == NULL && ret == SASL_NOUSER) {
/* Deleting something which is not there is not an error */
ret = SASL_OK;
}
if (ret != SASL_OK) {
/* We've already failed, no point in continuing */
break;
}
}
done:
if (userid) sparams->utils->free(userid);
if (realm) sparams->utils->free(realm);
if (user_buf) sparams->utils->free(user_buf);
return ret;
}
static sasl_auxprop_plug_t sasldb_auxprop_plugin = {
0, /* Features */
0, /* spare */
NULL, /* glob_context */
sasldb_auxprop_free, /* auxprop_free */
sasldb_auxprop_lookup, /* auxprop_lookup */
"sasldb", /* name */
sasldb_auxprop_store /* auxprop_store */
};
int sasldb_auxprop_plug_init(const sasl_utils_t *utils,
int max_version,
int *out_version,
sasl_auxprop_plug_t **plug,
const char *plugname __attribute__((unused)))
{
if(!out_version || !plug) return SASL_BADPARAM;
/* Do we have database support? */
/* Note that we can use a NULL sasl_conn_t because our
* sasl_utils_t is "blessed" with the global callbacks */
if(_sasl_check_db(utils, NULL) != SASL_OK)
return SASL_NOMECH;
/* Check if libsasl API is older than ours. If it is, fail */
if(max_version < SASL_AUXPROP_PLUG_VERSION) return SASL_BADVERS;
*out_version = SASL_AUXPROP_PLUG_VERSION;
*plug = &sasldb_auxprop_plugin;
return SASL_OK;
}
@@ -1,38 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_AUXPROP_PLUG_INIT( sasldb )
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_scram_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( scram )
SASL_SERVER_PLUG_INIT( scram )
File diff suppressed because it is too large Load Diff
@@ -1,38 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_AUXPROP_PLUG_INIT( sql )
File diff suppressed because it is too large Load Diff
@@ -1,43 +0,0 @@
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef macintosh
#include <sys/stat.h>
#endif
#include <fcntl.h>
#include <assert.h>
#include <sasl.h>
#include <saslplug.h>
#include <saslutil.h>
#include "plugin_common.h"
#ifdef macintosh
#include <sasl_srp_plugin_decl.h>
#endif
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#endif
SASL_CLIENT_PLUG_INIT( srp )
SASL_SERVER_PLUG_INIT( srp )
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-674
View File
@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

Some files were not shown because too many files have changed in this diff Show More