3 Commits

Author SHA1 Message Date
alexhudson 9a34158be7 Tagging for 0.6.1 2009-09-18 16:32:41 +00:00
alexhudson 1a5c310ad6 Update version for 0.6.1 2009-09-18 16:00:50 +00:00
alexhudson 0339297cd1 Merge fixed from r1185 through r1198 from trunk into 0.6 2009-09-18 16:00:28 +00:00
10 changed files with 59 additions and 21 deletions
+6 -6
View File
@@ -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 0)
set(BONGO_V_BUILD 1)
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 "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH "${XPL_DEFAULT_LIB_DIR}")
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)
+1 -1
View File
@@ -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${LIB_SUFFIX}"
"${EXEC_INSTALL_PREFIX}/${LIB_DIR_NAME}"
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
)
SET(LIBEXEC_INSTALL_DIR
+11 -2
View File
@@ -1,9 +1,18 @@
# 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 ${LIBRARY_OUTPUT_PATH})
set(LIBDIR ${PROJECT_BINARY_DIR}/${LIB_DIR_NAME})
set(LIBEXECDIR ${PROJECT_BINARY_DIR}/libexec)
set(DATAROOTDIR ${PROJECT_BINARY_DIR}/share)
set(DATADIR ${PROJECT_BINARY_DIR}/share)
@@ -15,7 +24,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)
set(XPL_DEFAULT_LIB_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_DIR_NAME})
set(XPL_DEFAULT_CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc/bongo)
set(XPL_DEFAULT_NLS_DIR ${CMAKE_INSTALL_PREFIX}/share/bongo/nls)
+1 -1
View File
@@ -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, visit: http://www.bongo-project.com
# Description: Bongo collaboration system, for info visit: http://www.bongo-project.com
### END INIT INFO
# Source SuSE config
+26 -2
View File
@@ -107,6 +107,7 @@ 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) ||
@@ -1133,7 +1134,13 @@ 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>] */
@@ -2119,7 +2126,7 @@ StoreCommandLIST(StoreClient *client,
int ccode;
ccode = StoreObjectCheckAuthorization(client, collection, STORE_PRIV_LIST);
if (ccode) return ccode;
if (ccode) return ConnWriteStr(client->conn, MSG4240NOPERMISSION);
return StoreObjectIterCollectionContents(client, collection, start,
end, flagsmask, flags, props, propcount, NULL, NULL, FALSE);
@@ -2698,6 +2705,23 @@ 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)
+3
View File
@@ -37,6 +37,7 @@ typedef enum {
STORE_COMMAND_IDENTITY,
STORE_COMMAND_MANAGE,
STORE_COMMAND_QUIT,
STORE_COMMAND_STORES,
STORE_COMMAND_STORE,
STORE_COMMAND_TOKEN,
STORE_COMMAND_TOKENS,
@@ -239,6 +240,8 @@ 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);
+1
View File
@@ -105,6 +105,7 @@ 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);
+3 -3
View File
@@ -76,9 +76,6 @@ __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 };
@@ -93,6 +90,9 @@ __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;
+1 -1
View File
@@ -44,7 +44,7 @@ MsgAuthCreateCookie(const char *username, MsgAuthCookie *cookie, uint64_t timeou
xpl_hash_context context;
// create the cookie
cookie->expiration = timeout;
cookie->expiration = time(NULL) + timeout;
XplHashNew(&context, XPLHASH_MD5);
snprintf(cookie->token, sizeof(cookie->token), "%x%x",
+6 -5
View File
@@ -33,6 +33,7 @@
#include <msgapi.h>
#include <nmap.h>
#include <bongostore.h>
#include <logger.h>
struct {
RegistrationStates state;
@@ -1264,18 +1265,18 @@ NMAPReadConfigFile(const char *file, char **output)
XplDelay(1000);
}
if (!conn) {
printf("could not connect to store\n");
Log(LOG_WARN, "could not connect to store\n");
return FALSE;
}
if (!NMAPAuthenticate(conn, buffer, sizeof(buffer))) {
printf("could not authenticate to the store\n");
Log(LOG_WARN, "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) {
printf("cannot access _system collection\n");
Log(LOG_WARN, "cannot access _system collection\n");
goto nmapfinish;
}
@@ -1284,7 +1285,7 @@ NMAPReadConfigFile(const char *file, char **output)
ccode = NMAPReadPropertyValueLength(conn, "nmap.document", &count);
if (ccode != 2001) {
printf("couldn't load config from store\n");
Log(LOG_INFO, "couldn't load config from store: /config/%s\n", file);
goto nmapfinish;
}
@@ -1292,7 +1293,7 @@ NMAPReadConfigFile(const char *file, char **output)
written = NMAPReadCount(conn, *output, count);
NMAPReadCrLf(conn);
if (written != count) {
printf("couldn't read config from store\n");
Log(LOG_INFO, "couldn't read config from store: /config/%s\n", file);
goto nmapfinish;
}
if (count == 0) {