summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-06-05Ensure g_file_copy() does not temporarily expose private filesColin Walters5-24/+63
Previously, g_file_copy() would (on Unix) create files with the default mode of 644. For applications which might at user request copy arbitrary private files such as ~/.ssh or /etc/shadow, a world-readable copy would be temporarily exposed. This patch is suboptimal in that it *only* fixes g_file_copy() for the case where both source and destination are instances of GLocalFile on Unix. The reason for this is that the public GFile APIs for creating files allow very limited control over the access permissions for the created file; one can either say a file is "private" or not. Fixing this by adding e.g. g_file_create_with_attributes() would make sense, except this would entail 8 new API calls for all the variants of _create(), _create_async(), _replace(), _replace_async(), _create_readwrite(), _create_readwrite_async(), _replace_readwrite(), _replace_readwrite_async(). That can be done as a separate patch later. https://bugzilla.gnome.org/show_bug.cgi?id=699959
2013-06-05g_file_copy(): Clean up logic for info queryColin Walters1-40/+88
Previously, we called g_file_query_info() *again* on the source at the very end of the copy. This has the lame semantics that if the source happened to be deleted, we would fail to apply attributes to the destination. This could even be a security flaw. This commit changes things so that we query info from the source *stream* after opening - i.e. on Unix we use the proper fstat() and friends. That way we operate more atomically. https://bugzilla.gnome.org/show_bug.cgi?id=699959
2013-06-05GApplication: implement fd.o application specRyan Lortie1-2/+76
The freedesktop application specification is largely overlapping the GLib application D-Bus interface but implementing it will allow for applications to be launched directly from desktop files, which we want. We keep the old Gtk interface for compatibility reasons and because it has some functionality not in the freedesktop spec (Busy state, CommandLine, etc.). https://bugzilla.gnome.org/show_bug.cgi?id=699259
2013-06-05GApplication: set prgname to appid for servicesRyan Lortie1-5/+19
Since services are based on D-Bus activation and desktop files are supposed to be named like the busname for DBusActivatable applications and since gnome-shell wants wmclass equal to the desktop file name, we therefore want wmclass equal to the application ID in this case. wmclass is determined from the prgname, which is otherwise pretty pointless to set to some random thing in $(libexec) for a D-Bus service, so set that to the appid. This means that for D-Bus services, the following things are now all the same: - application ID - prgname - wmclass property set on all windows - desktop file name - well-known bus name There are not many applications running as D-Bus services at present so this shouldn't impact anybody except for gnome-clocks (where this change will be fixing a bug) and gnome-terminal. https://bugzilla.gnome.org/show_bug.cgi?id=699259
2013-06-05Updated Spanish translationDaniel Mustieles1-29/+22
2013-06-05Updated Odia Translation.ManojKumar Giri1-29/+22
2013-06-05Updated Marathi TranslationsSandeep Sheshrao Shedmake1-237/+233
2013-06-05Updated Gujarati TranslationsSweta Kothari1-29/+22
2013-06-04g_file_set_contents(): don't fsync on ext3/4Ryan Lortie1-1/+8
ext3 and ext4 (for quite some time) with default mount options don't need fsync() to ensure safety of replace-by-rename. Stop doing that for these filesystems. Note: this patch also impacts ext2, which is probably not safe, but I don't know of any way to check ext2. vs the others because they all have the same magic numbers (short of opening /proc/mount). This patch assumes that if BTRFS_SUPER_MAGIC is defined then so will be EXT3_SUPER_MAGIC. https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-04gio/tests/inet-address: fix to work on OS XDan Winship2-5/+25
OS X's getaddrinfo() only supports IPv6 scope IDs that are interface names, not numbers. So use if_indextoname() to get the name of an interface and construct an address using that. https://bugzilla.gnome.org/show_bug.cgi?id=700123
2013-06-03g_file_set_contents: change {posix_ => }fallocateRyan Lortie2-3/+3
Use fallocate() instead of posix_fallocate() so that we just fail instead of getting the emulated version from the libc. https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03g_file_set_contents(): fix simple logic errorRyan Lortie1-1/+1
CI FTW.
2013-06-03g_file_set_contents(): use unistd instead of stdioRyan Lortie1-33/+19
Use a normal write() system call instead of fdopen() and fwrite(). This will definitely work on UNIX system and should work on Windows as well... As an added bonus, we can use g_close() now as well. https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03g_file_set_contents(): don't allocate display nameRyan Lortie1-78/+46
g_file_set_contents() sets a GError in the event of various failures that count occur. It uses g_filename_display_name() in order to get the filename to include in the messages. Factor out the error handling to make it easier to allocate the display name only when we need it (instead of allocating it every time). https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03g_file_set_contents(): use posix_fallocate()Ryan Lortie2-1/+8
Extents-based filesystems like knowing in advance how much data will be written to a file in order to prevent fragmentation. If we have it, use posix_fallocate() before writing data in g_file_set_contents(). https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-03Updated Slovenian translationMatej Urbančič1-5/+5
2013-06-03Updated Spanish translationDaniel Mustieles1-24/+24
2013-06-03Updated Odia Translation.ManojKumar Giri1-7/+7
2013-06-03Updated Gujarati TranslationsSweta Kothari1-24/+24
2013-06-03Remove extra comma in gtestutils.hKjell Ahlstedt1-1/+1
https://bugzilla.gnome.org/show_bug.cgi?id=701474
2013-06-02Improve GSettings test coverageMatthias Clasen1-0/+100
2013-06-02Add a directory monitoring testMatthias Clasen2-0/+185
2013-06-02Remove some unused inotify codeMatthias Clasen2-137/+20
2013-06-02tests: Remove a leftover debug printfRyan Lortie1-1/+0
https://bugzilla.gnome.org/show_bug.cgi?id=701456
2013-06-02Improve unix stream test coverageMatthias Clasen1-0/+4
2013-06-02Improve GAppInfo test coverageMatthias Clasen1-0/+14
2013-06-02Improve GMemoryInputStream test coverageMatthias Clasen1-0/+23
2013-06-02Improve GMenuModel test coverageMatthias Clasen1-0/+19
2013-06-02Improve GFileAttributeMatcher test coverageMatthias Clasen1-3/+21
2013-06-02Improve GIcon test coverageMatthias Clasen1-11/+107
2013-06-02Improve test coverage for GZipCompressorMatthias Clasen1-1/+11
2013-06-02Improve test coverage for GBufferedOutputStreamMatthias Clasen1-0/+6
2013-06-02Trivial formatting fixMatthias Clasen1-1/+1
2013-06-01Skip spawn tests when collecting coverageMatthias Clasen1-0/+5
These tests break gcov's data collection, so don't link them against -lgov. See bug 682133.
2013-06-01Improve test coverage a bitMatthias Clasen2-0/+30
2013-06-01mem-overflow: test malloc and realloc corner casesMatthias Clasen1-0/+25
2013-06-02Updated Galician translationsFran Diéguez1-197/+204
2013-06-01Fix failure to build exit-on-close gdbus testRyan Lortie1-3/+2
In the case that HAVE_DBUS_DAEMON was undefined (as in ostree where glib is built before D-Bus) this test was failing. Move it inside the HAVE_DBUS_DAEMON block.
2013-06-01glib.mk: Rework win32 test supportRyan Lortie1-4/+5
Newer versions of automake (~1.13.1) seem to generate some new rules for testcases that get tripped up on our use of $(addsuffix) and $(strip) so take those out of the definition of TESTS on win32.
2013-06-01Change a pair of TESTS = to TEST +=Ryan Lortie2-2/+2
2013-05-31GSettings tests: reverse installed test complexityRyan Lortie2-38/+17
Remove the complications that were introduced in an attempt to make the gsettings and gschema-compile tests function as installed tests. These tests are designed (in large part for gsettings and entirely for gschema-compile) to test the in-tree tools and should not be testing the system versions. In the future we may want to move the use of the in-tree tools from the gsettings testcase into the Makefile and install the resulting files, allowing this testcase to run against those files, installed.
2013-05-31Rework the build system for a new tests approachRyan Lortie38-1119/+974
Perform a substantial cleanup of the build system with respect to building and installing testcases. First, Makefile.decl has been renamed glib.mk and substantially expanded. We intend to add more stuff here in the future, like canned rules for mkenums, marshallers, resources, etc. By default, tests are no longer compiled as part of 'make'. They will be built when 'make check' is run. The old behaviour can be obtained with --enable-always-build-tests. --disable-modular-tests is gone (because tests are no longer built by default). There is no longer any way to cause 'make check' to be a no-op, but that's not very useful anyway. A new glibtests.m4 file is introduced. Along with glib.mk, this provides for consistent handling of --enable-installed-tests and --enable-always-build-tests (mentioned above). Port our various test-installing Makefiles to the new framework. This patch substantially improves the situation in the toplevel tests/ directory. Things are now somewhat under control there. There were some tests being built that weren't even being run and we run those now. The long-running GObject performance tests in this directory have been removed from 'make check' because they take too long. As an experiment, 'make check' now runs the testcases on win32 builds, by default. We can't run them under gtester (since it uses a pipe to communicate with the subprocess) so just toss them in TESTS. Most of them are passing on win32. Things are not quite done here, but this patch is already a substantial improvement. More to come.
2013-05-31Remove a bunch of lingering g_thread_init()Ryan Lortie8-18/+1
After this patch, there is but one remaining use of g_thread_init(), which is in tests/slice-threadinit.c, a testcase dedicated to testing the functionality of gslice across a g_thread_init() boundary. This testcase is pretty meaningless these days... probably we should delete it.
2013-05-31Some final g_test_build_filename() portingRyan Lortie8-38/+20
This should be the last users that need to be ported. For some of the oldschool non-gtester-ified tests, we call g_test_init() from main() because it is necessary in order to use g_test_build_filename().
2013-05-31Move a pair of gobject tests to tests/gobject/Ryan Lortie4-6/+7
testgobject.c and timeloop-closure.c are the only two tests in the toplevel tests/ directory that depend on gobject, so move them to tests/gobject/ along with the other gobject tests. Both of these were in noinst_PROGRAMS and not TESTS, so keep them that way when we move them.
2013-05-31Split off the gdbus-overflow testMatthias Clasen3-126/+255
It is unrealiable under load, and frequently fails in the ostree tests. See https://bugzilla.gnome.org/show_bug.cgi?id=701105
2013-05-31Fix a typoMatthias Clasen1-1/+1
2013-05-30Bump version.Ryan Lortie1-1/+1
2013-05-30Fix property example in gobject tutorialWilliam Jon McCann1-6/+4
https://bugzilla.gnome.org/show_bug.cgi?id=692848
2013-05-29Remove org.gtk.test.gschemaRyan Lortie2-40/+0
This is the old non-xml schema file format that we were playing around with at one time. Nothing is using this file anymore.