Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d1708f9cc |
+6
-6
@@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
|
||||
|
||||
set(BONGO_V_MAJOR 0)
|
||||
set(BONGO_V_MINOR 6)
|
||||
set(BONGO_V_BUILD 1)
|
||||
set(BONGO_V_BUILD 0)
|
||||
set(BONGO_V_STR "${BONGO_V_MAJOR}.${BONGO_V_MINOR}.${BONGO_V_BUILD}")
|
||||
|
||||
# arguments we can supply to the build system - TODO
|
||||
@@ -19,15 +19,15 @@ include(cmake/BongoCompiler.cmake)
|
||||
# find our various build requirements
|
||||
include(cmake/Requirements.cmake)
|
||||
|
||||
# set up defines for build directories
|
||||
include(cmake/Directories.cmake)
|
||||
include(cmake/DefineInstallationPaths.cmake)
|
||||
|
||||
# define RPATH for debug/etc. builds - allows us to install libraries
|
||||
# in non-system location and the binaries still link to them
|
||||
set(CMAKE_INSTALL_RPATH "${XPL_DEFAULT_LIB_DIR}")
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
# set up defines for build directories
|
||||
include(cmake/DefineInstallationPaths.cmake)
|
||||
include(cmake/Directories.cmake)
|
||||
|
||||
# any legacy defines which we want to get rid of eventually
|
||||
include(cmake/Legacy.cmake)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ if (UNIX)
|
||||
CACHE PATH "The ${APPLICATION_NAME} sbin install dir (default prefix/sbin)"
|
||||
)
|
||||
SET(LIB_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/${LIB_DIR_NAME}"
|
||||
"${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
|
||||
)
|
||||
SET(LIBEXEC_INSTALL_DIR
|
||||
|
||||
+2
-11
@@ -1,18 +1,9 @@
|
||||
# various directory definitions we use throughout Bongo
|
||||
|
||||
if(EXISTS /lib64)
|
||||
set(_LIB_DIR_NAME lib64)
|
||||
else(EXISTS /lib64)
|
||||
set(_LIB_DIR_NAME lib)
|
||||
endif(EXISTS /lib64)
|
||||
|
||||
set(LIB_DIR_NAME ${_LIB_DIR_NAME} CACHE PATH
|
||||
"Name of library location (arch-specific), usually 'lib' or 'lib64'")
|
||||
|
||||
# 'default' locations for where objects get built
|
||||
set(BINDIR ${PROJECT_BINARY_DIR}/bin)
|
||||
set(SBINDIR ${PROJECT_BINARY_DIR}/sbin)
|
||||
set(LIBDIR ${PROJECT_BINARY_DIR}/${LIB_DIR_NAME})
|
||||
set(LIBDIR ${LIBRARY_OUTPUT_PATH})
|
||||
set(LIBEXECDIR ${PROJECT_BINARY_DIR}/libexec)
|
||||
set(DATAROOTDIR ${PROJECT_BINARY_DIR}/share)
|
||||
set(DATADIR ${PROJECT_BINARY_DIR}/share)
|
||||
@@ -24,7 +15,7 @@ set(XPL_DEFAULT_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/bongo)
|
||||
set(XPL_DEFAULT_STATE_DIR ${CMAKE_INSTALL_PREFIX}/var/bongo)
|
||||
|
||||
set(XPL_DEFAULT_BIN_DIR ${CMAKE_INSTALL_PREFIX}/sbin)
|
||||
set(XPL_DEFAULT_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_DIR_NAME})
|
||||
set(XPL_DEFAULT_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(XPL_DEFAULT_CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc/bongo)
|
||||
set(XPL_DEFAULT_NLS_DIR ${CMAKE_INSTALL_PREFIX}/share/bongo/nls)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Start and stops Bongo
|
||||
# Description: Bongo collaboration system, for info visit: http://www.bongo-project.com
|
||||
# Description: Bongo collaboration system, visit: http://www.bongo-project.com
|
||||
### END INIT INFO
|
||||
|
||||
# Source SuSE config
|
||||
|
||||
@@ -107,7 +107,6 @@ StoreSetupCommands()
|
||||
BongoHashtablePutNoReplace(CommandTable, "COOKIE", (void *) STORE_COMMAND_COOKIE) ||
|
||||
BongoHashtablePutNoReplace(CommandTable, "QUIT", (void *) STORE_COMMAND_QUIT) ||
|
||||
BongoHashtablePutNoReplace(CommandTable, "STORE", (void *) STORE_COMMAND_STORE) ||
|
||||
BongoHashtablePutNoReplace(CommandTable, "STORES", (void *) STORE_COMMAND_STORES) ||
|
||||
BongoHashtablePutNoReplace(CommandTable, "TOKEN", (void *) STORE_COMMAND_TOKEN) ||
|
||||
BongoHashtablePutNoReplace(CommandTable, "TOKENS", (void *) STORE_COMMAND_TOKENS) ||
|
||||
BongoHashtablePutNoReplace(CommandTable, "USER", (void *) STORE_COMMAND_USER) ||
|
||||
@@ -1134,13 +1133,7 @@ StoreCommandLoop(StoreClient *client)
|
||||
/* SHUTDOWN */
|
||||
exit(0);
|
||||
break;
|
||||
|
||||
case STORE_COMMAND_STORES:
|
||||
if (TOKEN_OK == (ccode = RequireIdentity(client))) {
|
||||
ccode = StoreCommandSTORES(client);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case STORE_COMMAND_STORE:
|
||||
/* STORE [<storename>] */
|
||||
|
||||
@@ -2126,7 +2119,7 @@ StoreCommandLIST(StoreClient *client,
|
||||
int ccode;
|
||||
|
||||
ccode = StoreObjectCheckAuthorization(client, collection, STORE_PRIV_LIST);
|
||||
if (ccode) return ConnWriteStr(client->conn, MSG4240NOPERMISSION);
|
||||
if (ccode) return ccode;
|
||||
|
||||
return StoreObjectIterCollectionContents(client, collection, start,
|
||||
end, flagsmask, flags, props, propcount, NULL, NULL, FALSE);
|
||||
@@ -2705,23 +2698,6 @@ StoreCommandRESET(StoreClient *client)
|
||||
return ConnWriteStr(client->conn, MSG1000OK);
|
||||
}
|
||||
|
||||
CCode
|
||||
StoreCommandSTORES(StoreClient *client)
|
||||
{
|
||||
char **userlist;
|
||||
int result;
|
||||
|
||||
result = MsgAuthUserList(&userlist);
|
||||
if (result) {
|
||||
int i;
|
||||
|
||||
for (i = 0; userlist[i] != 0; i++) {
|
||||
ConnWriteF(client->conn, "2001 %s\r\n", userlist[i]);
|
||||
}
|
||||
MsgAuthUserListFree(&userlist);
|
||||
}
|
||||
return ConnWriteStr(client->conn, MSG1000OK);
|
||||
}
|
||||
|
||||
CCode
|
||||
StoreCommandSTORE(StoreClient *client, char *user)
|
||||
|
||||
@@ -37,7 +37,6 @@ typedef enum {
|
||||
STORE_COMMAND_IDENTITY,
|
||||
STORE_COMMAND_MANAGE,
|
||||
STORE_COMMAND_QUIT,
|
||||
STORE_COMMAND_STORES,
|
||||
STORE_COMMAND_STORE,
|
||||
STORE_COMMAND_TOKEN,
|
||||
STORE_COMMAND_TOKENS,
|
||||
@@ -240,8 +239,6 @@ CCode StoreCommandRESET(StoreClient *client);
|
||||
|
||||
CCode StoreCommandSEARCH(StoreClient *client, uint64_t guid, StoreSearchInfo *query);
|
||||
|
||||
CCode StoreCommandSTORES(StoreClient *client);
|
||||
|
||||
CCode StoreCommandSTORE(StoreClient *client, char *user);
|
||||
|
||||
CCode StoreCommandTIMEOUT(StoreClient *client, int timeout);
|
||||
|
||||
@@ -105,7 +105,6 @@ StoreObjectDBCreate(StoreClient *client)
|
||||
StoreObjectCreate(client, &collection);
|
||||
|
||||
collection.guid = STORE_CALENDARS_PERSONAL_GUID;
|
||||
collection.collection_guid = STORE_CALENDARS_GUID;
|
||||
snprintf(collection.filename, MAX_FILE_NAME, "/calendars/personal");
|
||||
StoreObjectCreate(client, &collection);
|
||||
|
||||
|
||||
@@ -76,6 +76,9 @@ __gnutls_new(Connection *conn, bongo_ssl_context *context, gnutls_connection_end
|
||||
|
||||
/* store in the credetials loaded earler */
|
||||
ccode = gnutls_credentials_set(conn->ssl.context, GNUTLS_CRD_CERTIFICATE, context->cert_cred);
|
||||
|
||||
/* initialize the dh bits */
|
||||
gnutls_dh_set_prime_bits(conn->ssl.context, 1024);
|
||||
} else {
|
||||
const int cert_type_priority[4] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
|
||||
|
||||
@@ -90,9 +93,6 @@ __gnutls_new(Connection *conn, bongo_ssl_context *context, gnutls_connection_end
|
||||
|
||||
/* set the empty credentials in the session */
|
||||
gnutls_credentials_set (conn->ssl.context, GNUTLS_CRD_CERTIFICATE, conn->ssl.credentials);
|
||||
|
||||
/* require at least 512 dh bits */
|
||||
gnutls_dh_set_prime_bits(conn->ssl.context, 512);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -44,7 +44,7 @@ MsgAuthCreateCookie(const char *username, MsgAuthCookie *cookie, uint64_t timeou
|
||||
xpl_hash_context context;
|
||||
|
||||
// create the cookie
|
||||
cookie->expiration = time(NULL) + timeout;
|
||||
cookie->expiration = timeout;
|
||||
|
||||
XplHashNew(&context, XPLHASH_MD5);
|
||||
snprintf(cookie->token, sizeof(cookie->token), "%x%x",
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <msgapi.h>
|
||||
#include <nmap.h>
|
||||
#include <bongostore.h>
|
||||
#include <logger.h>
|
||||
|
||||
struct {
|
||||
RegistrationStates state;
|
||||
@@ -1265,18 +1264,18 @@ NMAPReadConfigFile(const char *file, char **output)
|
||||
XplDelay(1000);
|
||||
}
|
||||
if (!conn) {
|
||||
Log(LOG_WARN, "could not connect to store\n");
|
||||
printf("could not connect to store\n");
|
||||
return FALSE;
|
||||
}
|
||||
if (!NMAPAuthenticate(conn, buffer, sizeof(buffer))) {
|
||||
Log(LOG_WARN, "could not authenticate to the store\n");
|
||||
printf("could not authenticate to the store\n");
|
||||
goto nmapfinish;
|
||||
}
|
||||
|
||||
NMAPSendCommandF(conn, "STORE _system\r\n");
|
||||
ccode = NMAPReadAnswer(conn, buffer, sizeof(buffer), TRUE);
|
||||
if (ccode != 1000) {
|
||||
Log(LOG_WARN, "cannot access _system collection\n");
|
||||
printf("cannot access _system collection\n");
|
||||
goto nmapfinish;
|
||||
}
|
||||
|
||||
@@ -1285,7 +1284,7 @@ NMAPReadConfigFile(const char *file, char **output)
|
||||
|
||||
ccode = NMAPReadPropertyValueLength(conn, "nmap.document", &count);
|
||||
if (ccode != 2001) {
|
||||
Log(LOG_INFO, "couldn't load config from store: /config/%s\n", file);
|
||||
printf("couldn't load config from store\n");
|
||||
goto nmapfinish;
|
||||
}
|
||||
|
||||
@@ -1293,7 +1292,7 @@ NMAPReadConfigFile(const char *file, char **output)
|
||||
written = NMAPReadCount(conn, *output, count);
|
||||
NMAPReadCrLf(conn);
|
||||
if (written != count) {
|
||||
Log(LOG_INFO, "couldn't read config from store: /config/%s\n", file);
|
||||
printf("couldn't read config from store\n");
|
||||
goto nmapfinish;
|
||||
}
|
||||
if (count == 0) {
|
||||
|
||||
Reference in New Issue
Block a user