Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
1a45998
Post-release bump to 0.6.1
aburgm Aug 23, 2014
6d6223e
Explicitly link against libresolv (libinfinity #3)
aburgm Aug 24, 2014
8a72d4d
Release libinfinity 0.6.1
aburgm Aug 24, 2014
b868937
Post-release bump to 0.6.2
aburgm Aug 24, 2014
97ae9ae
Makefile.am: ship the new markdown formatted README
pkern Aug 25, 2014
7933a56
infinoted man page: correct a grammar mistake, escape hyphens
pkern Aug 26, 2014
9a51d6f
infinoted/infinoted-options.c: Fix a grammar mistake.
pkern Aug 26, 2014
381364e
Refresh pot and pos to pick up a new string.
pkern Aug 26, 2014
7c2333c
infinoted: Load default account storage only after loading plugins
aburgm Aug 27, 2014
7dd6fc9
infinoted man page: correct the usage of --plugins
pkern Aug 28, 2014
b514cb7
Build documentation conditionally
dev-zero Sep 1, 2014
e3460de
Fix crash in inf_gtk_browser_store_tree_model_iter_has_child() (gobby…
aburgm Sep 8, 2014
5444ca6
Fix a crash when a certificate is added into the known hosts file
aburgm Sep 12, 2014
ced2948
Release libinfinity 0.6.2
aburgm Sep 12, 2014
43bc053
Post-release bump to 0.6.3
aburgm Sep 12, 2014
2f58375
Write certificate to known hosts file also if it was not present before
aburgm Sep 20, 2014
adbdba8
infinoted-plugin-document-stream: Don't join a user if username is empty
aburgm Oct 5, 2014
01f6500
Change the mode parameter for directory creation to 0777 (#6)
aburgm Oct 6, 2014
84b7171
Fix check for empty path component in InfdFilesystemStorage
aburgm Oct 9, 2014
ccff017
Fix possible warning when session could not be created
aburgm Oct 9, 2014
d42034c
Use length-independent string compare for password check
aburgm Oct 9, 2014
e4c9f27
Release libinfinity 0.6.3
aburgm Oct 9, 2014
1555e18
Post-release bump to 0.6.4
aburgm Oct 9, 2014
2845142
inf-name-resolver: Include <arpa/nameser.h> and <arpa/nameser_compat.…
aburgm Oct 18, 2014
a0a94bd
infinoted-plugin-document-stream: Only use MSG_NOSIGNAL if available …
aburgm Oct 18, 2014
94ff96e
Release libinfinity 0.6.4
aburgm Oct 18, 2014
e9c35ca
Post-release bump to 0.6.5
aburgm Oct 18, 2014
a07f1c8
Fix possible memory corruption on insert in fixline buffer
aburgm Oct 22, 2014
567a4a1
Fix error message in server log when a client certificate is not trusted
aburgm Oct 27, 2014
2120a2c
Add a missing status notify in InfXmppConnection
aburgm Oct 28, 2014
f0857d1
Make sure messages are not attempted to be sent on closed connections
aburgm Oct 28, 2014
f606e2d
Fix possible crash when a connection goes down while broadcasting data
aburgm Oct 28, 2014
0ea3d86
Fix a memory leak in the plugin manager
aburgm Oct 28, 2014
4fd9cad
Fix assertion failure when directory without storage is disposed
aburgm Jan 6, 2015
70913b5
InfdDirectory: Fail add-subdirectory request if name already exists
aburgm Jan 6, 2015
66432aa
Fix a crash when sending unsubscribe message causes connection failure
aburgm Jan 6, 2015
7b4efd3
Check whether we need -lresolv for res_query() (gobby #23)
aburgm Jan 14, 2015
1a0ff80
Release libinfinity 0.6.5
aburgm Jan 18, 2015
0ce0012
Post-release bump to 0.6.6
aburgm Jan 18, 2015
8990cf9
Fix a crash when the server explicitly changes client account to default
aburgm Apr 3, 2015
9b00916
Fix create_end_iter() implementation in InfTextFixlineBuffer
aburgm May 1, 2015
da06a82
Fix insert/erase notifications in InfTextFixlineBuffer
aburgm May 3, 2015
fb0c853
fixline buffer: Fix crash when iterating backwards through empty base…
aburgm May 5, 2015
244c7e8
Update caret position when only updating fixline state
aburgm May 6, 2015
06fa945
Fix expired certificate validation (gobby #61)
aburgm May 12, 2015
3862714
Fix make distcheck for recent automake versions
aburgm May 13, 2015
a5bc24e
Release libinfinity 0.6.6
aburgm May 13, 2015
4522baf
Post-release bump to 0.6.7
aburgm May 13, 2015
cf45880
Fix a possible crash when removing a browser entry
aburgm May 22, 2015
822b227
Fix session becoming inconsistent with active local users during subs…
aburgm May 23, 2015
d17398a
InfdDirectory: Fix error reply to client when session proxy cannot be…
aburgm May 28, 2015
4dfaf22
Fix g_free / g_slice_free mismatch
aburgm May 28, 2015
28dd073
InfXmppConnection: Fix strncmp invocation when suggesting SASL mechanism
aburgm Jun 8, 2015
4fc1227
Fix uninitialized variable when suggesting a SASL mechanism
aburgm Jun 10, 2015
3fb2be4
Fix integrity check in inf_text_chunk_get_byte_index_utf8()
aburgm Oct 12, 2015
d447fc4
InfTextChunk: fix segment lookup for offset=0 (#10)
aburgm Oct 12, 2015
a7bdd26
Release libinfinity 0.6.7
aburgm Oct 13, 2015
2c04774
Post-release bump to 0.6.8
aburgm Oct 13, 2015
e59c1a4
Fix g_return_val_if_fail on uninitialized memory
aburgm Dec 9, 2015
65b191b
Run apt-get noninteractive in travis
tyll Mar 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ compiler:
- gcc
- clang
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq gtk-doc-tools libgnutls-dev libgsasl7-dev libxml2-dev libgtk-3-dev libavahi-client-dev libdaemon-dev libpam-dev
- sudo DEBIAN_FRONTEND=noninteractive apt-get update -qq
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq gtk-doc-tools libgnutls-dev libgsasl7-dev libxml2-dev libgtk-3-dev libavahi-client-dev libdaemon-dev libpam-dev
script: ./autogen.sh --with-gtk3 --with-infgtk --with-inftextgtk --with-avahi --with-libdaemon --enable-gtk-doc && make && make check
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ endif

SUBDIRS += pixmaps test docs po

EXTRA_DIST = README.md

DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc

MAINTAINERCLEANFILES = \
Expand Down
48 changes: 48 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
libinfinity 0.6.7:
* Fix a possible crash when an entry is removed from the document
browser.
* Fix a possible crash in infinoted when access control lists are
enabled.
* Fix an assertion failure when operating with text documents and
using glib 2.46 or newer.

libinfinity 0.6.6:
* Fix certificates being only verified for expiration and other
criteria such as weak algorithms if the CA is not trusted.
(gobby #61)
* Fix some assertion failures and inconsistencies in
InfTextFixlineBuffer.
* Fix a client-side crash when the server shuts down ordinarily
while still connected.

libinfinity 0.6.5:
* Fix memory corruption in InfTextFixlineBuffer.
* infinoted: Fix error message in server log when a client certificate
is not trusted.
* Fix various crashes related to sending data to already closed
connections.
* Build fix when res_query is provided by libc, not libresolv, such
as on FreeBSD (gobby #23, Samantha Michelle Smith).

libinfinity 0.6.4:
* Build fixes for Mac OS X (#7, Dominyk Tiller).

libinfinity 0.6.3:
* infinoted: Fix a possible timing attack on the server password
(Jann Horn).
* infinoted: Use mode 0777 instead of 0700 when creating directories
in the directory-sync plugin.
* Write certificates not seen before into the known hosts file.

libinfinity 0.6.2:
* Fix accounts being deleted when a plugin overrides the default
account storage.
* The infinoted manual page has been corrected for the syntax of the
--plugins option.
* A crash has been fixed when a connection is closed for which the
the certificate dialog was shown.

libinfinity 0.6.1:
* Explicitly link against libresolv on unix-based systems, to avoid
a possible build failure.

libinfinity 0.6.0:

* infinoted: Introduced a plugin infrastructure, and ported some of
Expand Down
38 changes: 37 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
m4_define([libinfinity_version], [0.6.0])
m4_define([libinfinity_version], [0.6.8])
m4_define([libinfinity_api_version], [0.6])
m4_define([libinfinity_libtool_version], [0:0:0])

Expand Down Expand Up @@ -124,6 +124,42 @@ PKG_CHECK_MODULES([inftext], [glib-2.0 >= 2.16 gobject-2.0 >= 2.16 libxml-2.0])

if test $platform = 'win32'; then
infinity_LIBS="$infinity_LIBS -lws2_32 -ldnsapi"
else
# Check whether we need libresolv for res_query()
# Can't use AC_SEARCH_LIBS because res_query is a macro defined in
# resolv.h
AC_MSG_CHECKING(for res_query)
AC_TRY_LINK(
[
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
],
[res_query(NULL, 0, 0, NULL, 0);],
[
# res_init() available in libc
AC_MSG_RESULT(yes)
],
[
LIBS="-lresolv"
AC_TRY_LINK(
[
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
],
[res_query(NULL, 0, 0, NULL, 0);],
[
AC_MSG_RESULT(in libresolv)
LIBS=""
infinity_LIBS="$infinity_LIBS -lresolv" # res_init available in libresolv
],
[AC_MSG_ERROR(res_query not provided by either libc or libresolv)]
)
]
)
fi

###################################
Expand Down
16 changes: 15 additions & 1 deletion docs/reference/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
SUBDIRS = . libinfinity libinftext libinfgtk libinftextgtk libinfinoted-plugin-manager
SUBDIRS = . libinfinity libinftext

if WITH_INFGTK
SUBDIRS += libinfgtk
endif

if WITH_INFTEXTGTK
SUBDIRS += libinftextgtk
endif

if WITH_INFINOTED
SUBDIRS += libinfinoted-plugin-manager
endif

# Note that nodist doesn't work here actually because gtk-doc pulls them
# in anyway (see content_files in a subdirectory's Makefile.am)
Expand All @@ -7,9 +19,11 @@ nodist_noinst_DATA = version.xml api_version.xml
# Remove the trailing newline of the version files, to have the entities
# in the docbook XML substituted without it.
version.xml: version.xml.in
rm -f version.xml
echo -n `cat version.xml.in` > version.xml

api_version.xml: api_version.xml.in
rm -f api_version.xml
echo -n `cat api_version.xml.in` > api_version.xml

CLEANFILES = version.xml api_version.xml
Expand Down
8 changes: 4 additions & 4 deletions infinoted/infinoted-0.6.man
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The server's private key
The server's certificate
.TP
\fB\-\-certificate\-chain\fR
The certificate chain to the root certificate, if not included in the file given in --certificate-file.
The certificate chain to the root certificate, if not included in the file given in \-\-certificate\-file.
.TP
\fB\-\-create\-key\fR
Creates a new random private key
Expand All @@ -55,13 +55,13 @@ to this, when the autosave plugin is enabled, it is possible to save
sessions into the tree periodically. The default directory is
~/.infinote.
.TP
\fB\-\-plugins\fR=\fIPLUGIN1;PLUGIN2;...\fR
Additional plugins to load, separated by semi-colon. Plugin options can be configured in the configuration file (one section for each plugin), or with the --plugin-parameter option.
\fB\-\-plugins\fR=\fIPLUGIN\fR
Additional plugin to load. Repeat the option on the command-line to specify multiple plugins and semi-colons in the configuration file. Plugin options can be configured in the configuration file (one section for each plugin), or with the \-\-plugin\-parameter option.
.TP
\fB\-\-plugin-parameter\fR=\fIPLUGIN:KEY:VALUE\fR
Sets the option KEY for plugin PLUGIN to the given VALUE. Normally, plugin
options are specified in the configuration file, but this command line
option allows to set or override plugin options on the command line.
option allows one to set or override plugin options on the command line.
.TP
\fB\-P\fR, \fB\-\-password\fR=\fIPASSWORD\fR
Require given password on connections
Expand Down
6 changes: 5 additions & 1 deletion infinoted/infinoted-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ infinoted_options_validate(InfinotedOptions* options,
requires_password = requires_password || options->pam_service != NULL;
#endif /* LIBINFINITY_HAVE_PAM */

if(options->password != NULL)
options->password_len = strlen(options->password);

if(requires_password &&
options->security_policy == INF_XMPP_CONNECTION_SECURITY_ONLY_UNSECURED)
{
Expand Down Expand Up @@ -702,7 +705,7 @@ infinoted_options_load(InfinotedOptions* options,
}, {
"plugin-parameter", 0, 0,
G_OPTION_ARG_STRING_ARRAY, &plugin_parameters,
N_("Allows to override configuration entries for plugins from the "
N_("Allows one to override configuration entries for plugins from the "
"command line. The syntax is --plugin-parameter=plugin:key:value, "
"where plugin is the name of the plugin for which to override a "
"configuration parameter, key is the parameter which to override "
Expand Down Expand Up @@ -971,6 +974,7 @@ infinoted_options_new(const gchar* const* config_files,
options->plugins[0] = g_strdup("note-text");
options->plugins[1] = NULL;
options->password = NULL;
options->password_len = 0;
#ifdef LIBINFINITY_HAVE_PAM
options->pam_service = NULL;
options->pam_allowed_users = NULL;
Expand Down
1 change: 1 addition & 0 deletions infinoted/infinoted-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct _InfinotedOptions {
gchar** plugins;

gchar* password;
gsize password_len;
#ifdef LIBINFINITY_HAVE_PAM
gchar* pam_service;
gchar** pam_allowed_users;
Expand Down
2 changes: 2 additions & 0 deletions infinoted/infinoted-plugin-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@ infinoted_plugin_manager_finalize(GObject* object)
g_hash_table_unref(priv->connections);
g_hash_table_unref(priv->sessions);

g_free(priv->path);

G_OBJECT_CLASS(parent_class)->finalize(object);
}

Expand Down
69 changes: 43 additions & 26 deletions infinoted/infinoted-run.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,6 @@ infinoted_run_load_directory(InfinotedRun* run,

storage = infd_filesystem_storage_new(startup->options->root_directory);

/* Set an account storage, too. This can be replaced by something more fancy
* by a plugin. */
account_storage = infd_filesystem_account_storage_new();

result = infd_filesystem_account_storage_set_filesystem(
account_storage,
storage,
error
);

if(result == FALSE)
{
g_object_unref(account_storage);
g_object_unref(storage);
return FALSE;
}

communication_manager = inf_communication_manager_new();

run->io = inf_standalone_io_new();
Expand All @@ -78,17 +61,8 @@ infinoted_run_load_directory(InfinotedRun* run,
communication_manager
);

g_object_set(
G_OBJECT(run->directory),
"account-storage",
account_storage,
NULL
);

infd_directory_enable_chat(run->directory, TRUE);

g_object_unref(storage);
g_object_unref(account_storage);
g_object_unref(communication_manager);

/* Load server plugins via plugin manager */
Expand Down Expand Up @@ -119,6 +93,8 @@ infinoted_run_load_directory(InfinotedRun* run,

if(result == FALSE)
{
g_object_unref(storage);

g_object_unref(run->plugin_manager);
g_object_unref(run->directory);
g_object_unref(run->io);
Expand All @@ -128,6 +104,47 @@ infinoted_run_load_directory(InfinotedRun* run,
return FALSE;
}

/* Set an account storage, too. This can be replaced by something more fancy
* by a plugin. */
/* TODO: This filesystem storage should be moved into a plugin, so that
* users can enable it optionally. */
g_object_get(G_OBJECT(run->directory), "account-storage", &account_storage, NULL);
if(account_storage == NULL)
{
account_storage = infd_filesystem_account_storage_new();

result = infd_filesystem_account_storage_set_filesystem(
account_storage,
storage,
error
);

if(result == FALSE)
{
g_object_unref(storage);
g_object_unref(account_storage);

g_object_unref(run->plugin_manager);
g_object_unref(run->directory);
g_object_unref(run->io);
run->plugin_manager = NULL;
run->directory = NULL;
run->io = NULL;

return FALSE;
}

g_object_set(
G_OBJECT(run->directory),
"account-storage",
account_storage,
NULL
);
}

g_object_unref(storage);
g_object_unref(account_storage);

return TRUE;
}

Expand Down
20 changes: 19 additions & 1 deletion infinoted/infinoted-startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ infinoted_startup_sasl_callback(InfSaslContextSession* session,
const char* username;
const char* password;
InfXmppConnection* xmpp;
gchar cmp;
gsize password_len;
gsize i;

#ifdef LIBINFINITY_HAVE_PAM
const gchar* pam_service;
Expand Down Expand Up @@ -367,7 +370,22 @@ infinoted_startup_sasl_callback(InfSaslContextSession* session,
#endif /* LIBINFINITY_HAVE_PAM */
{
g_assert(startup->options->password != NULL);
if(strcmp(startup->options->password, password) == 0)

/* length-independent string compare */
cmp = 0;
password_len = strlen(password);
for(i = 0; i < startup->options->password_len; ++i)
{
if(i < password_len)
cmp |= (startup->options->password[i] ^ password[i]);
else
cmp |= (startup->options->password[i] ^ 0x00);
}

if(startup->options->password_len != password_len)
cmp |= 0xFF;

if(cmp == 0)
{
infinoted_log_info(
startup->log,
Expand Down
2 changes: 1 addition & 1 deletion infinoted/infinoted-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ infinoted_util_create_dirname(const gchar* path,
gboolean result;

dirname = g_path_get_dirname(path);
result = inf_file_util_create_directory(dirname, 0700, error);
result = inf_file_util_create_directory(dirname, 0777, error);
g_free(dirname);

return result;
Expand Down
2 changes: 1 addition & 1 deletion infinoted/plugins/infinoted-plugin-certificate-auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ infinoted_plugin_certificate_auth_certificate_func(InfXmppConnection* xmpp,
if(res != GNUTLS_E_SUCCESS)
inf_gnutls_set_error(&error, res);
else if( (verify_result & GNUTLS_CERT_INVALID) != 0)
inf_gnutls_certificate_verification_set_error(&error, res);
inf_gnutls_certificate_verification_set_error(&error, verify_result);

if(error != NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion infinoted/plugins/infinoted-plugin-directory-sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ infinoted_plugin_directory_sync_initialize(InfinotedPluginManager* manager,

plugin->manager = manager;

if(inf_file_util_create_directory(plugin->directory, 0700, error) == FALSE)
if(inf_file_util_create_directory(plugin->directory, 0777, error) == FALSE)
return FALSE;

g_signal_connect(
Expand Down
Loading