path: root/src/util.h
diff options
authorMatthias Clasen <>2010-03-30 12:36:04 -0400
committerMatthias Clasen <>2010-03-30 12:36:04 -0400
commit69b526a6cd4c078732068de2ba393cf9242a404b (patch)
treed56257876d50517d55fbb1202db45fb30a80fc2b /src/util.h
parenta1d944672acb3c350abacf461f13f020aff87057 (diff)
Be more careful when copying the icon file
Don't read the file in the root process, instead fork, become the calling user, then read the file and pipe it back to the parent process. This protects against callers passing e.g. "/etc/shadow" as filename.
Diffstat (limited to 'src/util.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 9a47150..bfdf780 100644
--- a/src/util.h
+++ b/src/util.h
@@ -31,6 +31,8 @@ void sys_log (DBusGMethodInvocation *context,
const gchar *format,
+gboolean get_caller_uid (DBusGMethodInvocation *context, gint *uid);
gboolean spawn_with_login_uid (DBusGMethodInvocation *context,
gchar *argv[],
GError **error);