Enrique J. Hernández Blasco
a9f336c69d
oc: Check permissions on read opening a shared folder
...
This is a security issue that allowed a user to read the number
of messages and its subjects when it does not have any permission to read.
Now the user cannot see other's folder without asking for me to the owner.
2016-02-16 14:55:21 +01:00
Enrique J. Hernández Blasco
e08ee9a265
oc: Use enum mapistore_error instead of int
...
This specifies a little the scope of the variable to make it
more realistic with the actual values it may have. We do have
a static typed compiled language, why don't we use it?
2016-02-15 15:44:14 +01:00
Carlos Pérez-Aradros Herce
061244a0a5
Allow exception raising when connecting to IMAP
...
By setting `SoIMAP4ExceptionsEnabled` config key to YES
Enabled for OpenChange by default, it will ensure no action is taken
when IMAP connection is not valid.
2016-01-27 15:30:27 +01:00
Jesús García Sáez
3d9466df45
Setting log level on backend initialization
...
Get the current openchange log level (actually is the samba's log level)
2016-01-25 20:18:45 +01:00
Enrique J. Hernández Blasco
8b078817e2
oc: Print retval on high debug for library interface
...
When exiting a library function
2016-01-04 09:38:10 +01:00
Enrique J. Hernández Blasco
f19074334c
oc: Use enum mapistore_error as returned value for setReadFlag
2015-09-04 16:15:05 +02:00
Enrique J. Hernández Blasco
8d9b54815c
oc: Receive new predecessor change list parameter on move copy op
...
This is to apply new API introduced by 85e2d7c commit in OpenChange
repository.
2015-08-04 08:41:38 +02:00
Jesús García Sáez
3bf7afdfb7
oc: remove and disable userContext after each call
...
This adds [MAPIStoreUserContext activate] method to use
it instead of activateWithUser.
A cleanup operation is executed after each public function
so there won't be any conflicts with future calls.
In practice, this will deactivate the current user context set on
MAPIApp, this means two things: (1) set nil as current user context
on MAPIApp and (2) remove woContext from current thread dictionary
2015-07-15 11:25:45 +02:00
Jesús García Sáez
503a70118f
oc: remove tabs and unused code
2015-07-14 19:19:58 +02:00
Jesús García Sáez
928b6b596e
oc: OC_DEBUG inside macros
...
These macros are used before and after every performed
operation
2015-07-14 19:19:51 +02:00
Enrique J. Hernández Blasco
95a8a9316a
oc: Use new OC_DEBUG macro
...
Avoiding the usage of __FUNCTION__ and __LINE__
and more related with the logging system is being in place
for OpenChange.
As well as set the proper level to some debug messages.
2015-03-27 11:12:40 +01:00
Carlos Pérez-Aradros Herce
00cef845b7
Restore multitenancy changes for OpenChange
2015-01-19 19:04:06 +01:00
Jesús García Sáez
3eba5f940e
increase log level of debug message
2014-07-29 18:25:46 +02:00
Jesús García Sáez
7f2ee7be89
Error message only when initialization hadn't been done
...
In a multithread environment, sogo_backend_init is registering the thread
only for the first one that calls this function, then the others threads
(even if they call sogo_backend_init) won't be registered because
moduleInitialized was YES.
We just want to ensure sogo_backend_init is called at least once (per process,
not per thread).
2014-07-29 18:25:28 +02:00
Kamen Mazdrashki
1fc3a57210
oc: Protect backend initialization to happen only once
2014-07-02 15:20:31 +02:00
Kamen Mazdrashki
5b75c817e2
oc: Log when mapistore backend is successfully initialized
2014-07-02 15:20:19 +02:00
Kamen Mazdrashki
bf0f2a76d5
oc/MAPIStoreSOGo: Do not destroy current thread context after any API call
...
We have thread context already in place during *_init() function.
Thus guarding every API call with TreadInit/Destroy is:
- a bit redundand
- makes SOGo backend not reentrant even on single thread and leads
to hard to find use-after-free crashes
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 15:19:19 +02:00
Kamen Mazdrashki
fc9dc08045
oc-sogo: pretty print Exceptions in sogo_backend_handle_objc_exception()
...
Now we have a nice stack trace printed out from [NSException callStackSymbols]
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:53:34 +02:00
Kamen Mazdrashki
bcfb674cd1
oc-sogo: Print both [NSException callStackSymbols] and execinfo.h stack trace
...
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:53:24 +02:00
Kamen Mazdrashki
6be768af42
oc-sogo: Move memory clean up *after* handling the exception
...
Otherwise the mess is full :)
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:53:10 +02:00
Kamen Mazdrashki
2c94d21f3e
oc-sogo: Use [e name] and [e reason] selectors
...
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:52:59 +02:00
Kamen Mazdrashki
cbe616358d
oc-sogo: Clean up AutoRelease pool and unregister threads in Catch handler
...
Most of the time we have "not yet implemented" kind of exceptions,
so it is better to clean up allocated resources
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:52:34 +02:00
Kamen Mazdrashki
09e6fcc3ff
oc-sogo: try/catch to guard only the actual impelementation rather than *everything*
...
Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
2014-07-02 14:52:20 +02:00
Jesús García Sáez
c6b8be742d
use execinfo.h to get backtrace
...
Really poor backtrace because it will only have the frames from oc side,
I don't know why callStackSymbols is returning null, compilation flags?
2014-07-02 14:50:54 +02:00
Jesús García Sáez
a77863947f
add try catch to all functions on struct mapistore_backend
2014-07-02 14:50:41 +02:00
Kamen Mazdrashki
f8028b5a94
OpenChange: Avoid crashing when creating embedded message in attachment
...
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
(cherry picked from commit 15a55f9f707247c9164e8fa7a102639744f686e5)
2014-07-02 14:48:27 +02:00
Carlos Pérez-Aradros Herce
33b353b974
Moved to abstract index_context instead of tdb_wrap
2014-07-02 14:41:25 +02:00
Ludovic Marcotte
93f9a7273e
Now handle mem context when saving messages and removed useless debugging.
2013-03-13 15:04:11 -04:00
Ludovic Marcotte
71b9772546
Ensure we hit the cache with hex-formatted keys.
2013-02-14 15:22:48 -05:00
Ludovic Marcotte
4804337a01
Now pass the memory context when copying/moving folders.
2012-12-07 13:30:50 -05:00
Ludovic Marcotte
ca1a3ac06b
Fixed the ordering of the memory context.
2012-12-05 14:56:29 -05:00
Ludovic Marcotte
2017536beb
move_copy_messages now uses the openchange's memory context.
...
This fixes strange crashes when dealing with invitations and
other stuff. More work will need to be done in this regard. Also
kept the old code just in case for now. Will be cleaned up shortly
after more people test it.
2012-12-03 09:18:17 -05:00
Wolfgang Sourdeau
2cd0a643b9
the defaults for "sogod" are now registered from libSOGo
2012-10-23 13:42:27 -04:00
Wolfgang Sourdeau
37e8f7ca98
"preload_message_bodies" now take an additional "enum mapistore_table_type" argument
2012-10-10 10:38:25 -04:00
Wolfgang Sourdeau
a7691c552b
Renamed -preloadMessageBodies: to preloadMessageBodiesWithMIDs: and perform a conversion of MIDs to message keys instead of the subclass code
2012-10-06 13:01:44 -04:00
Wolfgang Sourdeau
671ce26a48
struct UI8Array_r replaces struct I8Array_r
2012-10-05 09:59:45 -04:00
Wolfgang Sourdeau
eca09c87cc
Implemented the folder.preload_message_bodies backend op
2012-10-05 09:55:01 -04:00
Wolfgang Sourdeau
bde4b22ba7
Monotone-Parent: 572391072fa416635b9921d39ed76478ed762097
...
Monotone-Revision: 105b571703ff5c4cc1024854ef8a1d987aef2bf1
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-17T19:04:57
Monotone-Branch: ca.inverse.sogo
2012-08-17 19:04:57 +00:00
Wolfgang Sourdeau
47afdfcd40
Monotone-Parent: de4fcfa81509a5dd3cc5acd2a1c6ba7c97653649
...
Monotone-Revision: 85e37dbc7e87a173193494e6234f460788904318
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T13:13:15
Monotone-Branch: ca.inverse.sogo
2012-08-15 13:13:15 +00:00
Wolfgang Sourdeau
45974ec74b
Monotone-Parent: 5599b85afd7e2707325836a3b533b900d96b8b0c
...
Monotone-Revision: 570b17715b63da450bef9fde6d9c95288911034f
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T01:02:08
Monotone-Branch: ca.inverse.sogo
2012-08-15 01:02:08 +00:00
Wolfgang Sourdeau
5426fb4bbb
Monotone-Parent: 1036da510d0360f1e473b578044e95ac7792871f
...
Monotone-Revision: 0a2405280c040b602d25fea256f5093976a1aa95
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-14T20:16:16
Monotone-Branch: ca.inverse.sogo
2012-08-14 20:16:16 +00:00
Wolfgang Sourdeau
07a376b461
Monotone-Parent: 3b8c41adf2fbd28bd91312ef68f3f4faa8ef381f
...
Monotone-Revision: 22a3b958acddeb274e788d95f5da332880c64d78
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T19:55:50
Monotone-Branch: ca.inverse.sogo
2012-08-13 19:55:50 +00:00
Wolfgang Sourdeau
dd48699bb3
Monotone-Parent: 1b66e85ded0b1d64105f0f5d2035ef81e9a8eb4f
...
Monotone-Revision: 8d4ca03b16c54609dce23f43fc358a43d7e96d99
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-10T21:03:05
Monotone-Branch: ca.inverse.sogo
2012-08-10 21:03:05 +00:00
Wolfgang Sourdeau
32af60c24f
Monotone-Parent: 9f415bbce0de3939851adeff8e3f25986b8630f7
...
Monotone-Revision: 1bf1a3f87feb2c04469fcff28770c25704ee5aab
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-10T14:08:40
Monotone-Branch: ca.inverse.sogo
2012-08-10 14:08:40 +00:00
Wolfgang Sourdeau
830a3687b9
Monotone-Parent: af0fb5901615e40ad3549c59f74f88bb33f9b392
...
Monotone-Revision: 5a88c883713608f144b55bfcc8139174ad4ab129
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-09T21:34:27
Monotone-Branch: ca.inverse.sogo
2012-08-09 21:34:27 +00:00
Wolfgang Sourdeau
700d23e80e
Monotone-Parent: 3ded00a80ce87781ff6767f6fe38a12735a48340
...
Monotone-Revision: af0fb5901615e40ad3549c59f74f88bb33f9b392
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-09T19:43:17
Monotone-Branch: ca.inverse.sogo
2012-08-09 19:43:17 +00:00
Wolfgang Sourdeau
649b6fb90f
Monotone-Parent: 3bc92406543042dce09f1c096eb8a19107b42eb2
...
Monotone-Revision: 0a2c134a89861c564e6bc97bf789ca4a39adcf4a
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-07-20T15:21:11
Monotone-Branch: ca.inverse.sogo
2012-07-20 15:21:11 +00:00
Wolfgang Sourdeau
13bad20737
Monotone-Parent: 53c7bfdc2c357c162e23401ab5600d2cb4a1483e
...
Monotone-Revision: fc5a6818c0ee3f04b21668c4b2008a9549fb34f7
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-06-30T07:30:44
Monotone-Branch: ca.inverse.sogo
2012-06-30 07:30:44 +00:00
Wolfgang Sourdeau
a783d81528
Monotone-Parent: 905276f295d6f28a6946297f6a7af9ad60f71842
...
Monotone-Revision: 4ecb95aab8f686702ff3eb186a97b1bf1f3b5531
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-06-29T19:09:02
Monotone-Branch: ca.inverse.sogo
2012-06-29 19:09:02 +00:00
Wolfgang Sourdeau
b4d8609236
Monotone-Parent: c8921f898d8810ab70f86851a0449a28dc34eb89
...
Monotone-Revision: ccc94ebd9d872963c33041a7cac766343762bef2
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-06-01T15:15:30
Monotone-Branch: ca.inverse.sogo
2012-06-01 15:15:30 +00:00