Mageia Bugzilla – Attachment 4500 Details for
Bug 11643
dconf can not access to /run/user/1000/dconf/user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
this patch forces root to use its own homedir (.config/dconf)
dconfsu.patch (text/plain), 898 bytes, created by
Atilla ÖNTAŞ
on 2013-11-11 14:44:47 CET
(
hide
)
Description:
this patch forces root to use its own homedir (.config/dconf)
Filename:
MIME Type:
Creator:
Atilla ÖNTAŞ
Created:
2013-11-11 14:44:47 CET
Size:
898 bytes
patch
obsolete
>--- shm/dconf-shm.c 2013-08-21 09:57:35.346564042 +0200 >+++ shm/dconf-shm.c 2013-08-21 11:34:46.342038989 +0200 >@@ -30,10 +30,22 @@ > static gchar * > dconf_shm_get_shmdir (void) > { >+ static gchar *dconfdir; > static gchar *shmdir; > >+ /* if user is root, he has the ability to overwrite the other users' >+ dconf runtime directory, hence hanging their sessions, despite >+ the 0700 permissions. Make root always use his home dir instead >+ of the common runtime one. >+ */ >+ >+ if (getuid != 0) >+ dconfdir = g_build_filename (g_get_user_runtime_dir (), "dconf", NULL); >+ else >+ dconfdir = g_build_filename (g_get_home_dir (), ".cache", "dconf", NULL); >+ > if (g_once_init_enter (&shmdir)) >- g_once_init_leave (&shmdir, g_build_filename (g_get_user_runtime_dir (), "dconf", NULL)); >+ g_once_init_leave (&shmdir, g_build_filename (dconfdir, NULL)); > > return shmdir; > }
--- shm/dconf-shm.c 2013-08-21 09:57:35.346564042 +0200 +++ shm/dconf-shm.c 2013-08-21 11:34:46.342038989 +0200 @@ -30,10 +30,22 @@ static gchar * dconf_shm_get_shmdir (void) { + static gchar *dconfdir; static gchar *shmdir; + /* if user is root, he has the ability to overwrite the other users' + dconf runtime directory, hence hanging their sessions, despite + the 0700 permissions. Make root always use his home dir instead + of the common runtime one. + */ + + if (getuid != 0) + dconfdir = g_build_filename (g_get_user_runtime_dir (), "dconf", NULL); + else + dconfdir = g_build_filename (g_get_home_dir (), ".cache", "dconf", NULL); + if (g_once_init_enter (&shmdir)) - g_once_init_leave (&shmdir, g_build_filename (g_get_user_runtime_dir (), "dconf", NULL)); + g_once_init_leave (&shmdir, g_build_filename (dconfdir, NULL)); return shmdir; }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11643
:
4500
|
4514