Mageia Bugzilla – Attachment 4514 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]
Reviewed dconfsu patch
dconf-0.14.1-mga-dconfsu.patch (text/plain), 850 bytes, created by
Atilla ÖNTAŞ
on 2013-11-17 15:33:14 CET
(
hide
)
Description:
Reviewed dconfsu patch
Filename:
MIME Type:
Creator:
Atilla ÖNTAŞ
Created:
2013-11-17 15:33:14 CET
Size:
850 bytes
patch
obsolete
>diff -Naur a/shm/dconf-shm.c b/shm/dconf-shm.c >--- a/shm/dconf-shm.c 2013-03-14 20:27:40.000000000 +0200 >+++ b/shm/dconf-shm.c 2013-11-17 16:08:44.048343098 +0200 >@@ -33,7 +33,16 @@ > static gchar *shmdir; > > if (g_once_init_enter (&shmdir)) >- g_once_init_leave (&shmdir, g_build_filename (g_get_user_runtime_dir (), "dconf", NULL)); >+ /* 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) >+ g_once_init_leave (&shmdir, g_build_filename (g_get_user_runtime_dir (), "dconf", NULL)); >+ else >+ g_once_init_leave (&shmdir, g_build_filename (g_get_home_dir (), ".cache", "dconf", NULL)); > > return shmdir; > }
diff -Naur a/shm/dconf-shm.c b/shm/dconf-shm.c --- a/shm/dconf-shm.c 2013-03-14 20:27:40.000000000 +0200 +++ b/shm/dconf-shm.c 2013-11-17 16:08:44.048343098 +0200 @@ -33,7 +33,16 @@ static gchar *shmdir; if (g_once_init_enter (&shmdir)) - g_once_init_leave (&shmdir, g_build_filename (g_get_user_runtime_dir (), "dconf", NULL)); + /* 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) + g_once_init_leave (&shmdir, g_build_filename (g_get_user_runtime_dir (), "dconf", NULL)); + else + g_once_init_leave (&shmdir, g_build_filename (g_get_home_dir (), ".cache", "dconf", NULL)); return shmdir; }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11643
:
4500
| 4514