! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Writable system directory are considered as user dirs
Status:
RESOLVED: FIXED

Comments

Description Mike Massonnet editbugs 2008-11-08 19:29:25 CET
Created attachment 1962 
use g_slist_prepend instead of append

I attach a small patch which fixes an oddness when the user has (for instance as on my system) a group that can write towards a system dir.

Because of this the conf in ~/.config is read prior to the system wide conf.  But that's not what we wish.

The patch simply replaces g_slist_append against prepend (the API says you win 2 to 3 CPU cycles with prepend :P).

Cheers
Comment 1 Mike Massonnet editbugs 2008-11-08 19:35:42 CET
Some quick pointer,

libxfce4util/libxfce4util/xfce-resource.c (_res_init) reads the home directories prior to the system directories.
Comment 2 Brian J. Tarricone (not reading bugmail) 2008-11-08 21:16:32 CET
Hmm, I'm not convinced the existing behavior is incorrect.  You're misunderstanding "system" and "user" in this context.  I don't care where the directory is actually located, if the user can write to it, it's a "user" dir.
Comment 3 Mike Massonnet editbugs 2008-11-08 21:28:47 CET
What I want is the conf from ~/.config to be merged at the very end.  I don't touch the other settings from /usr/local etc.
Comment 4 Brian J. Tarricone (not reading bugmail) 2008-11-08 21:52:15 CET
Ok, I just read the thread on xfce4-dev.  For starters:  why is /usr/local writable by you on your system?  That's completely broken.

Anyhow... Enrico's use-case makes sense there.  I think it should just consider the return of xfce_resource_save_location() as the "user dir" and everything else as a system dir.
Comment 5 Enrico Tröger editbugs 2008-11-08 23:49:05 CET
SVN r28676 works fine for me, thanks Brian.
Comment 6 Mike Massonnet editbugs 2008-11-09 11:03:39 CET
Cause I happen to be re-tard-ed (hard to break old habits).

Thanks the fix ;)

PS: my habit is the next: chmod 775 -R /usr/local where the group is staff, since I'm lazy of typing sudo for instance for make install (which also helps when files wanna get installed outside that prefix)

Bug #4592

Reported by:
Mike Massonnet
Reported on: 2008-11-08
Last modified on: 2015-02-16

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Version:
Unspecified

Attachments

use g_slist_prepend instead of append (827 bytes, patch)
2008-11-08 19:29 CET , Mike Massonnet
no flags

Additional information