On Fri, 2009-07-31 at 22:22 +0200, David Eriksson wrote:
> On Fri, 2009-07-31 at 12:38 -0700, Adam Williamson wrote:
> > I noticed while testing synce on Fedora Rawhide recently that synce-hal
> > was causing a lot of SELinux denials related to its creation of randomly
> > named sockets in /tmp. I reported a Red Hat bug on this:
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=514768
> > 
> > Daniel Walsh, one of our SELinux gurus, suggested it would be better for
> > synce-hal to place its sockets in /var/run rather than /tmp - see
> > comment #6 - so I said I'd pass the suggestion along to the list. Does
> > this sound like something we should do?
> 

Sounds like a fine plan. Changed in svn. I've attached a patch which
will fix a released source if you would like to prod the fedora packager
to apply it or just attach it to the bug. Might want to test it first :)

To satisfy curiosity, we put the socket there because it's always been
put there :) since some of synce-hal comes from odccm.

Mark

> 
> +1
> 
> 
> > (sorry for the email address / signature mismatch; one day I'll get
> > around to switching my mailing list subscriptions...)
> > 
> 
> Cheers,
> 
> David Eriksson, http://www.divideandconquer.se/
> 
diff -Nurp hal.orig/src/Makefile.am hal/src/Makefile.am
--- hal.orig/src/Makefile.am	2009-02-06 18:41:55.000000000 +0000
+++ hal/src/Makefile.am	2009-08-01 11:28:00.000000000 +0100
@@ -1,4 +1,5 @@
-AM_CFLAGS = -Wall
+AM_CFLAGS = -Wall \
+	-DLOCALSTATEDIR=\""$(localstatedir)"\"
 
 libexec_PROGRAMS = hal-dccm synce-serial-chat
 
diff -Nurp hal.orig/src/Makefile.in hal/src/Makefile.in
--- hal.orig/src/Makefile.in	2009-08-01 11:30:09.000000000 +0100
+++ hal/src/Makefile.in	2009-08-01 11:28:42.000000000 +0100
@@ -211,7 +211,9 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = -Wall
+AM_CFLAGS = -Wall \
+	-DLOCALSTATEDIR=\""$(localstatedir)"\"
+
 BUILT_SOURCES = synce-device-signals-marshal.h \
 		synce-device-signals-marshal.c \
 		synce-device-glue.h
diff -Nurp hal.orig/src/synce-connection-broker.c hal/src/synce-connection-broker.c
--- hal.orig/src/synce-connection-broker.c	2008-10-28 11:23:00.000000000 +0000
+++ hal/src/synce-connection-broker.c	2009-08-01 11:28:00.000000000 +0100
@@ -236,7 +236,7 @@ _synce_connection_broker_take_connection
   priv->conn = conn;
 
   rnd = g_rand_new ();
-  priv->filename = g_strdup_printf ("/tmp/synce-%08x%08x%08x%08x.sock",
+  priv->filename = g_strdup_printf ("%s/run/synce-%08x%08x%08x%08x.sock", LOCALSTATEDIR,
       g_rand_int (rnd), g_rand_int (rnd), g_rand_int (rnd), g_rand_int (rnd));
   g_rand_free (rnd);
 

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to