[nautilus-actions] Fix permissions when creating the configuration directory
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Fix permissions when creating the configuration directory
- Date: Tue, 6 Dec 2011 23:32:50 +0000 (UTC)
commit 768c7aa988d343b0a548e7b102d82dea03f297a9
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Dec 7 00:30:57 2011 +0100
Fix permissions when creating the configuration directory
ChangeLog | 5 +++++
src/core/na-settings.c | 3 ++-
src/io-desktop/nadp-writer.c | 7 +++++--
3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d1b07ed..c7d93e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-12-06 Pierre Wieser <pwieser trychlos org>
+ * src/core/na-settings.c (settings_new):
+ * src/io-desktop/nadp-writer.c
+ (nadp_iio_provider_is_able_to_write, nadp_iio_provider_write_item):
+ Fix permissions when creating the configuration directory.
+
* src/api/na-core-utils.h:
* src/core/na-core-utils.c (na_core_utils_dir_list_perms): New function.
diff --git a/src/core/na-settings.c b/src/core/na-settings.c
index c777f82..2cccf50 100644
--- a/src/core/na-settings.c
+++ b/src/core/na-settings.c
@@ -422,7 +422,8 @@ settings_new( void )
g_free( dir );
dir = g_build_filename( g_get_home_dir(), ".config", PACKAGE, NULL );
- g_mkdir_with_parents( dir, 750 );
+ g_mkdir_with_parents( dir, 0750 );
+ na_core_utils_dir_list_perms( dir, thisfn );
g_debug( "%s: reading user configuration", thisfn );
st_settings->private->user = key_file_new( dir );
g_free( dir );
diff --git a/src/io-desktop/nadp-writer.c b/src/io-desktop/nadp-writer.c
index 1f1be0a..50c9e72 100644
--- a/src/io-desktop/nadp-writer.c
+++ b/src/io-desktop/nadp-writer.c
@@ -104,10 +104,11 @@ nadp_iio_provider_is_able_to_write( const NAIIOProvider *provider )
if( g_file_test( userdir, G_FILE_TEST_IS_DIR )){
able_to = na_core_utils_dir_is_writable_path( userdir );
- } else if( g_mkdir_with_parents( userdir, 0700 )){
+ } else if( g_mkdir_with_parents( userdir, 0750 )){
g_warning( "%s: %s: %s", thisfn, userdir, g_strerror( errno ));
} else {
+ na_core_utils_dir_list_perms( userdir, thisfn );
able_to = na_core_utils_dir_is_writable_path( userdir );
}
@@ -156,9 +157,11 @@ nadp_iio_provider_write_item( const NAIIOProvider *provider, const NAObjectItem
dir_ok = TRUE;
if( !g_file_test( fulldir, G_FILE_TEST_IS_DIR )){
- if( g_mkdir_with_parents( fulldir, 0700 )){
+ if( g_mkdir_with_parents( fulldir, 0750 )){
g_warning( "%s: %s: %s", thisfn, userdir, g_strerror( errno ));
dir_ok = FALSE;
+ } else {
+ na_core_utils_dir_list_perms( userdir, thisfn );
}
}
g_free( userdir );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]