update to 8.7.80.943
This commit is contained in:
parent
a08f63c6a6
commit
0ba73b166c
@ -1,7 +1,7 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.22 2019/04/17 13:01:02 robert Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.23 2019/05/09 14:52:32 robert Exp $
|
||||
|
||||
V?= 8.7.80
|
||||
BUILD?= 856
|
||||
BUILD?= 943
|
||||
DISTNAME?= kopanocore-${V}.${BUILD}
|
||||
EXTRACT_SUFX?= .tar.xz
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.35 2019/04/28 20:51:42 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.36 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
# undefined ref's to libicon*, libintl*
|
||||
USE_LLD= Yes
|
||||
@ -8,8 +8,6 @@ COMMENT-mapi= kopano MAPI extensions for PHP
|
||||
|
||||
PKGNAME-main= kopano-core-${V}.${BUILD}
|
||||
PKGNAME-mapi= kopano-mapi-${V}.${BUILD}
|
||||
REVISION-main= 0
|
||||
REVISION-mapi= 0
|
||||
|
||||
CATEGORIES= mail www productivity
|
||||
|
||||
@ -47,7 +45,7 @@ BUILD_DEPENDS= devel/gettext-tools \
|
||||
textproc/xmlto
|
||||
|
||||
WANTLIB += c m pthread z vmime iconv icudata icui18n icuuc intl
|
||||
WANTLIB += lzma crypto ssl
|
||||
WANTLIB += lzma crypto ssl kvm
|
||||
|
||||
WANTLIB-main += ${WANTLIB} ${MODPY_WANTLIB}
|
||||
WANTLIB-main += curl nghttp2 ical icalss
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (kopano/kopanocore-8.7.80.856.tar.xz) = 5IWV/LBa5MMVTwltqS4wIwVXERwJyp8S1jKVZz3PdkM=
|
||||
SIZE (kopano/kopanocore-8.7.80.856.tar.xz) = 2008172
|
||||
SHA256 (kopano/kopanocore-8.7.80.943.tar.xz) = KzZl9zPA3CXY7/WG/f5juxpaAAZRh14XX3YNWX04i6M=
|
||||
SIZE (kopano/kopanocore-8.7.80.943.tar.xz) = 2016336
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-ECtools_monitor_monitor_cpp,v 1.10 2019/04/17 13:01:02 robert Exp $
|
||||
$OpenBSD: patch-ECtools_monitor_monitor_cpp,v 1.11 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: ECtools/monitor/monitor.cpp
|
||||
--- ECtools/monitor/monitor.cpp.orig
|
||||
+++ ECtools/monitor/monitor.cpp
|
||||
@@ -126,10 +126,10 @@ static ECRESULT main2(int argc, char **argv)
|
||||
@@ -119,10 +119,10 @@ static ECRESULT main2(int argc, char **argv)
|
||||
static const configsetting_t lpDefaults[] = {
|
||||
{ "smtp_server","localhost" },
|
||||
{ "server_socket", "default:" },
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-ECtools_presence_kopano_presence___init___py,v 1.4 2018/12/17 15:19:40 robert Exp $
|
||||
$OpenBSD: patch-ECtools_presence_kopano_presence___init___py,v 1.5 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: ECtools/presence/kopano_presence/__init__.py
|
||||
--- ECtools/presence/kopano_presence/__init__.py.orig
|
||||
+++ ECtools/presence/kopano_presence/__init__.py
|
||||
@@ -19,11 +19,11 @@ from kopano import log_exc, Config
|
||||
from flask import Flask, request, abort
|
||||
@@ -21,11 +21,11 @@ import kopano
|
||||
from kopano import log_exc, Config
|
||||
|
||||
CONFIG = {
|
||||
- 'data_path': Config.string(default='/var/lib/kopano/presence/'),
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-ECtools_search_Makefile_in,v 1.9 2018/12/17 15:19:40 robert Exp $
|
||||
$OpenBSD: patch-ECtools_search_Makefile_in,v 1.10 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: ECtools/search/Makefile.in
|
||||
--- ECtools/search/Makefile.in.orig
|
||||
+++ ECtools/search/Makefile.in
|
||||
@@ -620,7 +620,6 @@ install-exec-local:
|
||||
@@ -619,7 +619,6 @@ install-exec-local:
|
||||
rm -Rf build
|
||||
|
||||
install-data-local:
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-ECtools_search_kopano_search_plaintext_py,v 1.3 2018/10/02 10:49:47 robert Exp $
|
||||
$OpenBSD: patch-ECtools_search_kopano_search_plaintext_py,v 1.4 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: ECtools/search/kopano_search/plaintext.py
|
||||
--- ECtools/search/kopano_search/plaintext.py.orig
|
||||
+++ ECtools/search/kopano_search/plaintext.py
|
||||
@@ -47,7 +47,7 @@ for (X, C) in DB:
|
||||
@@ -58,7 +58,7 @@ for (X, C) in DB:
|
||||
# python-coverage doesn't work for call-backs from thread created in C,
|
||||
# so skip coverage
|
||||
def setlimits(): # pragma: no cover
|
||||
|
@ -1,45 +1,45 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.14 2019/04/17 13:01:02 robert Exp $
|
||||
$OpenBSD: patch-Makefile_in,v 1.15 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: Makefile.in
|
||||
--- Makefile.in.orig
|
||||
+++ Makefile.in
|
||||
@@ -509,7 +509,7 @@ am_libkcutil_la_OBJECTS = common/ConsoleTable.lo commo
|
||||
@@ -886,7 +886,7 @@ am__libkcutil_la_SOURCES_DIST = common/ConsoleTable.cp
|
||||
libkcutil_la_OBJECTS = $(am_libkcutil_la_OBJECTS)
|
||||
libkcutil_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
- $(CXXFLAGS) $(libkcutil_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
+ $(CXXFLAGS) $(libkcutil_la_LDFLAGS) -lkvm $(LDFLAGS) -o $@
|
||||
libmapi_la_DEPENDENCIES = libkcutil.la $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
am_libmapi_la_OBJECTS = mapi4linux/src/common.lo \
|
||||
@@ -1299,7 +1299,7 @@ kopano_dbadm_SOURCES = ECtools/dbadm.cpp \
|
||||
common/database.cpp common/include/kopano/database.hpp
|
||||
+ $(CXXFLAGS) $(libkcutil_la_LDFLAGS) $(LDFLAGS) -lkvm -o $@
|
||||
@ENABLE_BASE_TRUE@am_libkcutil_la_rpath = -rpath $(libdir)
|
||||
@ENABLE_BASE_TRUE@libmapi_la_DEPENDENCIES = libkcutil.la \
|
||||
@ENABLE_BASE_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
@@ -1852,7 +1852,7 @@ dist_bin_SCRIPTS = $(am__append_4) $(am__append_7)
|
||||
@ENABLE_BASE_TRUE@ common/database.cpp common/include/kopano/database.hpp
|
||||
|
||||
kopano_dbadm_CPPFLAGS = ${AM_CPPFLAGS}
|
||||
-kopano_dbadm_LDADD = libkcutil.la ${MYSQL_LIBS}
|
||||
+kopano_dbadm_LDADD = libkcutil.la ${MYSQL_LIBS} ${PROG_LIBS}
|
||||
@ENABLE_BASE_TRUE@kopano_dbadm_CPPFLAGS = ${AM_CPPFLAGS}
|
||||
-@ENABLE_BASE_TRUE@kopano_dbadm_LDADD = libkcutil.la ${MYSQL_LIBS}
|
||||
+@ENABLE_BASE_TRUE@kopano_dbadm_LDADD = libkcutil.la ${MYSQL_LIBS} ${PROG_LIBS}
|
||||
|
||||
#
|
||||
# kopano-fsck
|
||||
@@ -1398,7 +1398,7 @@ kopano_server_SOURCES = \
|
||||
provider/server/ECThreadManager.cpp provider/server/ECThreadManager.h
|
||||
@@ -1951,7 +1951,7 @@ dist_bin_SCRIPTS = $(am__append_4) $(am__append_7)
|
||||
@ENABLE_BASE_TRUE@ provider/server/ECThreadManager.cpp provider/server/ECThreadManager.h
|
||||
|
||||
kopano_server_LDADD = \
|
||||
- libkcutil.la libkcserver.la libkcsoap.la ${GSOAP_LIBS} \
|
||||
+ libkcutil.la libkcserver.la libkcsoap.la ${GSOAP_LIBS} ${INTL_LIBS} \
|
||||
${clock_LIBS} ${CRYPTO_LIBS} ${icu_uc_LIBS} ${icu_i18n_LIBS} ${DL_LIBS} \
|
||||
${MYSQL_LIBS} ${SSL_LIBS} ${PAM_LIBS} ${KRB5_LIBS} ${kcoidc_LIBS} -lpthread
|
||||
@ENABLE_BASE_TRUE@kopano_server_LDADD = \
|
||||
-@ENABLE_BASE_TRUE@ libkcutil.la libkcserver.la libkcsoap.la ${GSOAP_LIBS} \
|
||||
+@ENABLE_BASE_TRUE@ libkcutil.la libkcserver.la libkcsoap.la ${GSOAP_LIBS} ${INTL_LIBS} \
|
||||
@ENABLE_BASE_TRUE@ ${clock_LIBS} ${CRYPTO_LIBS} ${icu_uc_LIBS} ${icu_i18n_LIBS} ${DL_LIBS} \
|
||||
@ENABLE_BASE_TRUE@ ${MYSQL_LIBS} ${SSL_LIBS} ${PAM_LIBS} ${KRB5_LIBS} ${kcoidc_LIBS} -lpthread
|
||||
|
||||
@@ -1849,7 +1849,7 @@ tests_readflag_LDADD = libmapi.la libkcutil.la
|
||||
tests_rosie_SOURCES = tests/rosie.cpp
|
||||
tests_rosie_LDADD = libkcrosie.la
|
||||
tests_zcpmd5_SOURCES = tests/zcpmd5.cpp
|
||||
-tests_zcpmd5_LDADD = ${CRYPTO_LIBS} libkcutil.la
|
||||
+tests_zcpmd5_LDADD = ${CRYPTO_LIBS} ${PROG_LIBS} libkcutil.la
|
||||
@@ -2405,7 +2405,7 @@ dist_bin_SCRIPTS = $(am__append_4) $(am__append_7)
|
||||
@ENABLE_BASE_TRUE@tests_rosie_SOURCES = tests/rosie.cpp
|
||||
@ENABLE_BASE_TRUE@tests_rosie_LDADD = libkcrosie.la
|
||||
@ENABLE_BASE_TRUE@tests_zcpmd5_SOURCES = tests/zcpmd5.cpp
|
||||
-@ENABLE_BASE_TRUE@tests_zcpmd5_LDADD = ${CRYPTO_LIBS} libkcutil.la
|
||||
+@ENABLE_BASE_TRUE@tests_zcpmd5_LDADD = ${CRYPTO_LIBS} ${PROG_LIBS} libkcutil.la
|
||||
|
||||
#
|
||||
# soap generators
|
||||
@@ -4805,7 +4805,7 @@ default.sym provider/plugin.sym provider/provider.sym
|
||||
@@ -5295,7 +5295,7 @@ default.sym provider/plugin.sym provider/provider.sym
|
||||
|
||||
.PHONY: source-moved-check
|
||||
source-moved-check:
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-caldav_CalDAV_cpp,v 1.11 2019/04/17 13:01:02 robert Exp $
|
||||
$OpenBSD: patch-caldav_CalDAV_cpp,v 1.12 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: caldav/CalDAV.cpp
|
||||
--- caldav/CalDAV.cpp.orig
|
||||
+++ caldav/CalDAV.cpp
|
||||
@@ -203,10 +203,10 @@ int main(int argc, char **argv) {
|
||||
@@ -204,10 +204,10 @@ int main(int argc, char **argv) {
|
||||
const char *lpszCfg = ECConfig::GetDefaultPath("ical.cfg");
|
||||
bool exp_config = false;
|
||||
static const configsetting_t lpDefaults[] = {
|
||||
|
@ -1,23 +1,41 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.13 2019/04/17 13:01:02 robert Exp $
|
||||
$OpenBSD: patch-configure_ac,v 1.14 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: configure.ac
|
||||
--- configure.ac.orig
|
||||
+++ configure.ac
|
||||
@@ -54,11 +54,13 @@ case "$host_os" in
|
||||
openbsd*)
|
||||
@@ -105,16 +105,21 @@ AC_SUBST([PACKAGE_ABI])
|
||||
abs_top_srcdir=`cd $srcdir; pwd`
|
||||
abs_top_builddir=`pwd`
|
||||
|
||||
+# check build OS
|
||||
+ZCPPFLAGS=""
|
||||
+
|
||||
AC_CANONICAL_HOST
|
||||
AS_CASE([$host_os],
|
||||
- [openbsd], [
|
||||
+ [openbsd*], [
|
||||
BUILDOS="openbsd"
|
||||
ZCPPFLAGS="$ZCPPFLAGS -DOPENBSD"
|
||||
+ TINFO_LIB=""
|
||||
LN_TFSV="ln -fs"
|
||||
;;
|
||||
linux*)
|
||||
],
|
||||
[linux*], [
|
||||
BUILDOS="linux"
|
||||
ZCPPFLAGS="$ZCPPFLAGS -DLINUX"
|
||||
+ TINFO_LIB="-ltinfo"
|
||||
LN_TFSV="ln -Tfsv"
|
||||
;;
|
||||
esac
|
||||
@@ -76,6 +78,7 @@ AC_SUBST([ZPHPCXXFLAGS])
|
||||
],
|
||||
[*], [
|
||||
@@ -135,8 +140,6 @@ CPPFLAGS_system=$CPPFLAGS
|
||||
LDFLAGS_system=$LDFLAGS
|
||||
LIBS_system=$LIBS
|
||||
|
||||
-# check build OS
|
||||
-ZCPPFLAGS=""
|
||||
>conftest.cpp
|
||||
ZPHPCXXFLAGS=""
|
||||
AS_IF([$CXX -Wno-narrowing -c conftest.cpp], [ZPHPCXXFLAGS="-Wno-narrowing"])
|
||||
@@ -148,6 +151,7 @@ AC_SUBST([ZPHPCXXFLAGS])
|
||||
ZCPPFLAGS="$ZCPPFLAGS \
|
||||
-I\${top_builddir}/common/include \
|
||||
-I\${top_srcdir}/common/include \
|
||||
@ -25,7 +43,7 @@ Index: configure.ac
|
||||
-I\${top_srcdir}/m4lcommon/include \
|
||||
-I\${top_srcdir}/mapi4linux/include \
|
||||
-I\${top_srcdir}/provider/common/include \
|
||||
@@ -93,7 +96,7 @@ ZCPPFLAGS="$ZCPPFLAGS $LFS_CFLAGS"
|
||||
@@ -165,7 +169,7 @@ ZCPPFLAGS="$ZCPPFLAGS $LFS_CFLAGS"
|
||||
|
||||
AC_MSG_CHECKING([available C++ standard])
|
||||
cxxmode=""
|
||||
@ -34,7 +52,7 @@ Index: configure.ac
|
||||
CXXFLAGS="$CXXFLAGS_system -std=$i"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], [cxxmode="$i"])
|
||||
AS_IF([test -n "$cxxmode"], [break])
|
||||
@@ -219,7 +222,7 @@ AC_DEFUN([LIBNCURSES_WITH_CONFIG],[
|
||||
@@ -243,7 +247,7 @@ AC_DEFUN([LIBNCURSES_WITH_CONFIG],[
|
||||
[
|
||||
dnl just pick the lowest common denominator
|
||||
NCURSES_FLAGS=""
|
||||
@ -43,16 +61,7 @@ Index: configure.ac
|
||||
]
|
||||
)
|
||||
AC_CHECK_HEADERS([ncurses.h])
|
||||
@@ -352,7 +355,7 @@ CXXFLAGS="$CXXFLAGS_system $ZCXXFLAGS"
|
||||
LDFLAGS="$LDFLAGS_system $ZLDFLAGS"
|
||||
AC_CHECK_FUNCS([pthread_getname_np])
|
||||
|
||||
-PKG_CHECK_MODULES([GSOAP], [gsoapssl++ >= 2.8.73])
|
||||
+PKG_CHECK_MODULES([GSOAP], [gsoapssl++ >= 2.8])
|
||||
PKG_CHECK_MODULES([ICAL], [libical >= 0.42])
|
||||
PKG_CHECK_MODULES([curl], [libcurl], [], [:])
|
||||
CPPFLAGS="$CPPFLAGS $curl_CFLAGS"
|
||||
@@ -377,7 +380,7 @@ PKG_CHECK_MODULES([jsoncpp], [jsoncpp >= 1.4.0], [], [
|
||||
@@ -411,7 +415,7 @@ PKG_CHECK_MODULES([jsoncpp], [jsoncpp >= 1.4.0], [], [
|
||||
#
|
||||
|
||||
AC_CHECK_HEADERS([ldap.h],
|
||||
@ -61,7 +70,7 @@ Index: configure.ac
|
||||
CXXFLAGS="$CXXFLAGS -pthread"
|
||||
AC_MSG_CHECKING([for -lldap_r without LDAP_DEPRECATED])
|
||||
AC_LINK_IFELSE([ AC_LANG_SOURCE([#include <ldap.h>
|
||||
@@ -434,7 +437,7 @@ iconv_t i; i = iconv_open("", "");
|
||||
@@ -466,7 +470,7 @@ iconv_t i; i = iconv_open("", "");
|
||||
[ AC_MSG_RESULT([yes]) ],
|
||||
[ AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([for iconv in -liconv])
|
||||
@ -70,7 +79,7 @@ Index: configure.ac
|
||||
AC_LINK_IFELSE([ AC_LANG_SOURCE([
|
||||
#include <stdlib.h>
|
||||
#include <iconv.h>
|
||||
@@ -453,7 +456,7 @@ AC_SEARCH_LIBS([crypt_r], [crypt], [
|
||||
@@ -485,7 +489,7 @@ AC_SEARCH_LIBS([crypt_r], [crypt], [
|
||||
])
|
||||
LIBS="$LIBS_system"
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt], [
|
||||
@ -79,7 +88,7 @@ Index: configure.ac
|
||||
])
|
||||
LIBS="$LIBS_system"
|
||||
AC_SUBST([CRYPT_LIBS])
|
||||
@@ -569,12 +572,14 @@ AC_CHECK_LIB([z], [gzopen], GZ_LIBS="-lz",
|
||||
@@ -598,12 +602,14 @@ AC_CHECK_LIB([z], [gzopen], GZ_LIBS="-lz",
|
||||
)
|
||||
AC_SUBST(GZ_LIBS)
|
||||
|
||||
@ -96,7 +105,7 @@ Index: configure.ac
|
||||
|
||||
# check epoll support
|
||||
AC_ARG_ENABLE([epoll], AS_HELP_STRING([--disable-epoll], [disable epoll and fallback to select]), [want_epoll=${enableval}], [want_epoll=yes])
|
||||
@@ -631,6 +636,8 @@ AS_IF([test "$have_icu" = 0], [
|
||||
@@ -658,6 +664,8 @@ AS_IF([test "$have_icu" = 0], [
|
||||
AC_MSG_ERROR([ICU is required but not found])
|
||||
])
|
||||
ZCPPFLAGS="$ZCPPFLAGS $icu_uc_CFLAGS $icu_i18n_CFLAGS"
|
||||
|
@ -1,43 +1,54 @@
|
||||
$OpenBSD: patch-provider_libserver_ECCacheManager_cpp,v 1.3 2019/04/17 13:01:02 robert Exp $
|
||||
|
||||
revert 726a2ce26e2a93cfbe69eed34563db395865fdad
|
||||
$OpenBSD: patch-provider_libserver_ECCacheManager_cpp,v 1.4 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: provider/libserver/ECCacheManager.cpp
|
||||
--- provider/libserver/ECCacheManager.cpp.orig
|
||||
+++ provider/libserver/ECCacheManager.cpp
|
||||
@@ -670,35 +670,6 @@ exit:
|
||||
@@ -670,8 +670,8 @@ exit:
|
||||
return er;
|
||||
}
|
||||
|
||||
-ECRESULT ECCacheManager::get_all_user_objects(objectclass_t ocls,
|
||||
- std::map<unsigned int, ECsUserObject> &out)
|
||||
-{
|
||||
- ECDatabase *db = nullptr;
|
||||
- DB_RESULT result;
|
||||
- DB_ROW row;
|
||||
-
|
||||
- auto ret = m_lpDatabaseFactory->get_tls_db(&db);
|
||||
- if (ret != erSuccess)
|
||||
- return ret;
|
||||
+ECRESULT ECCacheManager::get_all_user_objects(objectclass_t ocls, bool hosted,
|
||||
+ unsigned int company, std::map<unsigned int, ECsUserObject> &out)
|
||||
{
|
||||
ECDatabase *db = nullptr;
|
||||
DB_RESULT result;
|
||||
@@ -680,18 +680,33 @@ ECRESULT ECCacheManager::get_all_user_objects(objectcl
|
||||
auto ret = m_lpDatabaseFactory->get_tls_db(&db);
|
||||
if (ret != erSuccess)
|
||||
return ret;
|
||||
- ret = db->DoSelect("SELECT externid, objectclass, signature, company, id "
|
||||
- "FROM users WHERE " + OBJECTCLASS_COMPARE_SQL("objectclass", ocls), &result);
|
||||
- if (ret != erSuccess)
|
||||
- return KCERR_DATABASE_ERROR;
|
||||
-
|
||||
- out.clear();
|
||||
- while ((row = result.fetch_row()) != nullptr) {
|
||||
- ECsUserObject u;
|
||||
- if (row[0] != nullptr)
|
||||
+ auto query = "SELECT externid, objectclass, signature, company, id "
|
||||
+ "FROM users WHERE " + OBJECTCLASS_COMPARE_SQL("objectclass", ocls);
|
||||
+ /*
|
||||
+ * As long as the Offline server has partial hosted support, we must
|
||||
+ * comment out this additional where statement...
|
||||
+ */
|
||||
+ if (hosted)
|
||||
+ /*
|
||||
+ * Everyone and SYSTEM do not have a company but must be
|
||||
+ * included by the query, so write exception case for them.
|
||||
+ */
|
||||
+ query += " AND (company=" + stringify(company) +
|
||||
+ " OR id=" + stringify(company) +
|
||||
+ " OR id=" + stringify(KOPANO_UID_SYSTEM) +
|
||||
+ " OR id=" + stringify(KOPANO_UID_EVERYONE) + ")";
|
||||
+ ret = db->DoSelect(query, &result);
|
||||
if (ret != erSuccess)
|
||||
return KCERR_DATABASE_ERROR;
|
||||
|
||||
out.clear();
|
||||
while ((row = result.fetch_row()) != nullptr) {
|
||||
ECsUserObject u;
|
||||
+ auto lengths = result.fetch_row_lengths();
|
||||
if (row[0] != nullptr)
|
||||
- u.strExternId = row[0];
|
||||
- u.ulClass = static_cast<objectclass_t>(atoui(row[1]));
|
||||
+ u.strExternId.assign(row[0], lengths[0]);
|
||||
u.ulClass = static_cast<objectclass_t>(atoui(row[1]));
|
||||
- u.strSignature = row[2];
|
||||
- u.ulCompanyId = atoui(row[3]);
|
||||
- I_AddUserObject(atoui(row[4]), u.ulClass, u.ulCompanyId, u.strExternId, u.strSignature);
|
||||
- out.emplace(atoui(row[4]), std::move(u));
|
||||
- }
|
||||
- return erSuccess;
|
||||
-}
|
||||
-
|
||||
ECRESULT ECCacheManager::GetUserDetails(unsigned int ulUserId, objectdetails_t *details)
|
||||
{
|
||||
auto er = I_GetUserObjectDetails(ulUserId, details);
|
||||
+ u.strSignature.assign(row[2], lengths[2]);
|
||||
u.ulCompanyId = atoui(row[3]);
|
||||
I_AddUserObject(atoui(row[4]), u.ulClass, u.ulCompanyId, u.strExternId, u.strSignature);
|
||||
out.emplace(atoui(row[4]), std::move(u));
|
||||
|
@ -1,15 +1,14 @@
|
||||
$OpenBSD: patch-provider_libserver_ECCacheManager_h,v 1.1 2019/04/17 13:01:02 robert Exp $
|
||||
|
||||
revert 726a2ce26e2a93cfbe69eed34563db395865fdad
|
||||
$OpenBSD: patch-provider_libserver_ECCacheManager_h,v 1.2 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: provider/libserver/ECCacheManager.h
|
||||
--- provider/libserver/ECCacheManager.h.orig
|
||||
+++ provider/libserver/ECCacheManager.h
|
||||
@@ -264,7 +264,6 @@ class ECCacheManager final { (public)
|
||||
@@ -264,7 +264,7 @@ class ECCacheManager final { (public)
|
||||
ECRESULT GetUserObject(unsigned int ulUserId, objectid_t *lpExternId, unsigned int *lpulCompanyId, std::string *lpstrSignature);
|
||||
ECRESULT GetUserObject(const objectid_t &sExternId, unsigned int *lpulUserId, unsigned int *lpulCompanyId, std::string *lpstrSignature);
|
||||
ECRESULT GetUserObjects(const std::list<objectid_t> &lstExternObjIds, std::map<objectid_t, unsigned int> *lpmapLocalObjIds);
|
||||
- ECRESULT get_all_user_objects(objectclass_t, std::map<unsigned int, ECsUserObject> &out);
|
||||
+ ECRESULT get_all_user_objects(objectclass_t, bool hosted, unsigned int company, std::map<unsigned int, ECsUserObject> &out);
|
||||
|
||||
// Cache user information
|
||||
ECRESULT GetUserDetails(unsigned int ulUserId, objectdetails_t *details);
|
||||
|
@ -1,96 +1,64 @@
|
||||
$OpenBSD: patch-provider_libserver_ECUserManagement_cpp,v 1.1 2019/04/17 13:01:02 robert Exp $
|
||||
|
||||
revert 726a2ce26e2a93cfbe69eed34563db395865fdad
|
||||
$OpenBSD: patch-provider_libserver_ECUserManagement_cpp,v 1.2 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: provider/libserver/ECUserManagement.cpp
|
||||
--- provider/libserver/ECUserManagement.cpp.orig
|
||||
+++ provider/libserver/ECUserManagement.cpp
|
||||
@@ -380,17 +380,18 @@ ECRESULT ECUserManagement::GetCompanyObjectListAndSync
|
||||
ulCompanyId = 0;
|
||||
@@ -364,7 +364,8 @@ ECRESULT ECUserManagement::GetCompanyObjectListAndSync
|
||||
if (er != erSuccess)
|
||||
return er;
|
||||
|
||||
- if (m_lpSession->GetSessionManager()->IsHostedSupported()) {
|
||||
+ auto smgr = m_lpSession->GetSessionManager();
|
||||
+ if (smgr->IsHostedSupported()) {
|
||||
/* When hosted is enabled, the companyid _must_ have an external id,
|
||||
* unless we are requesting the companylist in which case the companyid is 0 and doesn't
|
||||
* need to be resolved at all.*/
|
||||
@@ -381,29 +382,31 @@ ECRESULT ECUserManagement::GetCompanyObjectListAndSync
|
||||
}
|
||||
|
||||
- std::map<unsigned int, ECsUserObject> alluser;
|
||||
std::map<unsigned int, ECsUserObject> alluser;
|
||||
- er = m_lpSession->GetSessionManager()->GetCacheManager()->get_all_user_objects(objclass, alluser);
|
||||
+ // Get all the items of the requested type
|
||||
+ std::vector<unsigned int> local_ids;
|
||||
+ er = GetLocalObjectIdList(objclass, ulCompanyId, local_ids);
|
||||
+ er = smgr->GetCacheManager()->get_all_user_objects(objclass,
|
||||
+ smgr->IsHostedSupported(), ulCompanyId, alluser);
|
||||
if (er != erSuccess)
|
||||
return er;
|
||||
|
||||
objs.clear();
|
||||
- for (const auto &pair : alluser) {
|
||||
for (const auto &pair : alluser) {
|
||||
- if (IsInternalObject(pair.first)) {
|
||||
+ for (const auto &loc_id : local_ids) {
|
||||
+ if (IsInternalObject(loc_id)) {
|
||||
// Local user, add it to the result array directly
|
||||
objectdetails_t details;
|
||||
- // Local user, add it to the result array directly
|
||||
- objectdetails_t details;
|
||||
- er = GetLocalObjectDetails(pair.first, &details);
|
||||
+ er = GetLocalObjectDetails(loc_id, &details);
|
||||
if(er != erSuccess)
|
||||
return er;
|
||||
if (ulFlags & USERMANAGEMENT_ADDRESSBOOK &&
|
||||
@@ -399,13 +400,13 @@ ECRESULT ECUserManagement::GetCompanyObjectListAndSync
|
||||
// Reset details, this saves time copying unwanted data, but keep the correct class
|
||||
if (ulFlags & USERMANAGEMENT_IDS_ONLY)
|
||||
details = objectdetails_t(details.GetClass());
|
||||
- if(er != erSuccess)
|
||||
- return er;
|
||||
- if (ulFlags & USERMANAGEMENT_ADDRESSBOOK &&
|
||||
- MustHide(*lpSecurity, ulFlags, details))
|
||||
- continue;
|
||||
- // Reset details, this saves time copying unwanted data, but keep the correct class
|
||||
- if (ulFlags & USERMANAGEMENT_IDS_ONLY)
|
||||
- details = objectdetails_t(details.GetClass());
|
||||
- objs.emplace_back(pair.first, std::move(details));
|
||||
+ objs.emplace_back(loc_id, std::move(details));
|
||||
+ } else if (GetExternalId(loc_id, &externid, NULL, &signature) == erSuccess) {
|
||||
+ mapSignatureIdToLocal.emplace(std::move(externid), std::pair<unsigned int, std::string>(loc_id, std::move(signature)));
|
||||
+ } else {
|
||||
+ // cached externid not found for local object id
|
||||
+ if (!IsInternalObject(pair.first)) {
|
||||
+ mapSignatureIdToLocal.emplace(
|
||||
+ objectid_t{std::move(pair.second.strExternId), pair.second.ulClass},
|
||||
+ std::make_pair(pair.first, std::move(pair.second.strSignature)));
|
||||
+ continue;
|
||||
}
|
||||
- mapSignatureIdToLocal.emplace(
|
||||
- objectid_t{std::move(pair.second.strExternId), pair.second.ulClass},
|
||||
- std::make_pair(pair.first, std::move(pair.second.strSignature)));
|
||||
+ // Local user, add it to the result array directly
|
||||
+ objectdetails_t details;
|
||||
+ er = GetLocalObjectDetails(pair.first, &details);
|
||||
+ if (er != erSuccess)
|
||||
+ return er;
|
||||
+ if (ulFlags & USERMANAGEMENT_ADDRESSBOOK &&
|
||||
+ MustHide(*lpSecurity, ulFlags, details))
|
||||
+ continue;
|
||||
+ // Reset details, this saves time copying unwanted data, but keep the correct class
|
||||
+ if (ulFlags & USERMANAGEMENT_IDS_ONLY)
|
||||
+ details = objectdetails_t(details.GetClass());
|
||||
+ objs.emplace_back(pair.first, std::move(details));
|
||||
}
|
||||
- alluser.clear();
|
||||
alluser.clear();
|
||||
|
||||
if (bSync && !bIsSafeMode) {
|
||||
// We now have a map, mapping external IDs to local user IDs (and their signatures)
|
||||
@@ -1139,6 +1140,45 @@ ECRESULT ECUserManagement::GetLocalObjectsIdsOrCreate(
|
||||
return er;
|
||||
}
|
||||
result.first->second = ulObjectId;
|
||||
+ }
|
||||
+ return erSuccess;
|
||||
+}
|
||||
+
|
||||
+ECRESULT ECUserManagement::GetLocalObjectIdList(objectclass_t objclass,
|
||||
+ unsigned int ulCompanyId, std::vector<unsigned int> &objs) const
|
||||
+{
|
||||
+ ECDatabase *lpDatabase = NULL;
|
||||
+ DB_RESULT lpResult;
|
||||
+
|
||||
+ auto er = m_lpSession->GetDatabase(&lpDatabase);
|
||||
+ if (er != erSuccess)
|
||||
+ return er;
|
||||
+ std::string strQuery =
|
||||
+ "SELECT id FROM users "
|
||||
+ "WHERE " + OBJECTCLASS_COMPARE_SQL("objectclass", objclass);
|
||||
+ /* As long as the Offline server has partial hosted support,
|
||||
+ * we must comment out this additional where statement... */
|
||||
+ if (m_lpSession->GetSessionManager()->IsHostedSupported())
|
||||
+ /* Everyone and SYSTEM don't have a company but must be
|
||||
+ * included by the query, so write exception case for them */
|
||||
+ strQuery +=
|
||||
+ " AND ("
|
||||
+ "company = " + stringify(ulCompanyId) + " "
|
||||
+ "OR id = " + stringify(ulCompanyId) + " "
|
||||
+ "OR id = " + stringify(KOPANO_UID_SYSTEM) + " "
|
||||
+ "OR id = " + stringify(KOPANO_UID_EVERYONE) + ")";
|
||||
+ er = lpDatabase->DoSelect(strQuery, &lpResult);
|
||||
+ if (er != erSuccess)
|
||||
+ return er;
|
||||
+
|
||||
+ objs.clear();
|
||||
+ objs.reserve(lpResult.get_num_rows());
|
||||
+ while(1) {
|
||||
+ auto lpRow = lpResult.fetch_row();
|
||||
+ if(lpRow == NULL)
|
||||
+ break;
|
||||
+ if (lpRow[0] != nullptr)
|
||||
+ objs.push_back(atoi(lpRow[0]));
|
||||
}
|
||||
return erSuccess;
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-provider_libserver_ECUserManagement_h,v 1.1 2019/04/17 13:01:02 robert Exp $
|
||||
|
||||
revert 726a2ce26e2a93cfbe69eed34563db395865fdad
|
||||
|
||||
Index: provider/libserver/ECUserManagement.h
|
||||
--- provider/libserver/ECUserManagement.h.orig
|
||||
+++ provider/libserver/ECUserManagement.h
|
||||
@@ -133,6 +133,9 @@ class _kc_export ECUserManagement final { (private)
|
||||
_kc_hidden ECRESULT GetLocalObjectIdOrCreate(const objectsignature_t &signature, unsigned int *id);
|
||||
_kc_hidden ECRESULT GetLocalObjectsIdsOrCreate(const signatures_t &, std::map<objectid_t, unsigned int> *local_objids);
|
||||
|
||||
+ // Get a list of local object IDs in the database plus any internal objects (SYSTEM, EVERYONE)
|
||||
+ _kc_hidden ECRESULT GetLocalObjectIdList(objectclass_t, unsigned int company_id, std::vector<unsigned int> &objs) const;
|
||||
+
|
||||
// Converts anonymous Object Detail to property. */
|
||||
_kc_hidden ECRESULT ConvertAnonymousObjectDetailToProp(struct soap *, const objectdetails_t *, unsigned int tag, struct propVal *) const;
|
||||
// Converts the data in user/group/company details fields into property value array for content tables and MAPI_MAILUSER and MAPI_DISTLIST objects
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-spooler_DAgent_cpp,v 1.12 2019/04/17 13:01:02 robert Exp $
|
||||
$OpenBSD: patch-spooler_DAgent_cpp,v 1.13 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: spooler/DAgent.cpp
|
||||
--- spooler/DAgent.cpp.orig
|
||||
@ -15,7 +15,7 @@ Index: spooler/DAgent.cpp
|
||||
/*
|
||||
This is actually from sysexits.h
|
||||
but since those windows lamers don't have it ..
|
||||
@@ -3179,8 +3184,8 @@ int main(int argc, char **argv) try {
|
||||
@@ -3180,8 +3185,8 @@ int main(int argc, char **argv) try {
|
||||
// Default settings
|
||||
static const configsetting_t lpDefaults[] = {
|
||||
{ "server_bind_intf", "" },
|
||||
@ -26,7 +26,7 @@ Index: spooler/DAgent.cpp
|
||||
{ "pid_file", "/var/run/kopano/dagent.pid" },
|
||||
{"coredump_enabled", "systemdefault"},
|
||||
{"socketspec", "", CONFIGSETTING_OBSOLETE},
|
||||
@@ -3200,12 +3205,12 @@ int main(int argc, char **argv) try {
|
||||
@@ -3201,12 +3206,12 @@ int main(int argc, char **argv) try {
|
||||
{ "log_raw_message", "error", CONFIGSETTING_RELOADABLE },
|
||||
{"log_raw_message_path", "/var/lib/kopano", CONFIGSETTING_RELOADABLE},
|
||||
{ "archive_on_delivery", "no", CONFIGSETTING_RELOADABLE },
|
||||
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-swig_python_kopano_kopano_item_py,v 1.4 2018/08/29 16:58:30 robert Exp $
|
||||
$OpenBSD: patch-swig_python_kopano_kopano_item_py,v 1.5 2019/05/09 14:52:33 robert Exp $
|
||||
|
||||
Index: swig/python/kopano/kopano/item.py
|
||||
--- swig/python/kopano/kopano/item.py.orig
|
||||
+++ swig/python/kopano/kopano/item.py
|
||||
@@ -15,6 +15,7 @@ import os
|
||||
@@ -14,6 +14,7 @@ import functools
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
import warnings
|
||||
+from MAPI.Defs import bin2hex
|
||||
|
||||
try:
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.22 2019/04/17 13:01:02 robert Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.23 2019/05/09 14:52:33 robert Exp $
|
||||
@conflict zarafa-*
|
||||
@pkgpath mail/zarafa/zarafa,-main
|
||||
@newgroup _kopano:793
|
||||
@ -78,8 +78,6 @@ include/kopano/charset/convstring.h
|
||||
include/kopano/charset/traits.h
|
||||
include/kopano/charset/utf8string.h
|
||||
include/kopano/codepage.h
|
||||
include/kopano/conversion.h
|
||||
include/kopano/director_util.h
|
||||
include/kopano/ecversion.h
|
||||
include/kopano/fileutil.hpp
|
||||
include/kopano/hl.hpp
|
||||
@ -94,11 +92,8 @@ include/kopano/platform.h
|
||||
include/kopano/platform.linux.h
|
||||
include/kopano/scope.hpp
|
||||
include/kopano/stringutil.h
|
||||
include/kopano/swig_iunknown.h
|
||||
include/kopano/tie.hpp
|
||||
include/kopano/timeutil.hpp
|
||||
include/kopano/typemap.i
|
||||
include/kopano/typemap_python.i
|
||||
include/kopano/userutil.h
|
||||
include/kopano/ustringutil.h
|
||||
include/kopano/zcdefs.h
|
||||
@ -201,11 +196,9 @@ lib/python${MODPY_VERSION}/site-packages/MAPI/Tags.py
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Time.py
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/AddressBook.py
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/Generators.py
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/__init__.py
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/${MODPY_PYCACHE}/
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/${MODPY_PYCACHE}AddressBook.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/${MODPY_PYCACHE}Generators.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/${MODPY_PYCACHE}codepage.${MODPY_PYC_MAGIC_TAG}pyc
|
||||
lib/python${MODPY_VERSION}/site-packages/MAPI/Util/codepage.py
|
||||
|
Loading…
Reference in New Issue
Block a user