From nobody@FreeBSD.org  Fri Jan 27 11:34:45 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 542031065675
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Jan 2012 11:34:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 221A48FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Jan 2012 11:34:45 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0RBYhD7006674
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 27 Jan 2012 11:34:43 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q0RBYh87006673;
	Fri, 27 Jan 2012 11:34:43 GMT
	(envelope-from nobody)
Message-Id: <201201271134.q0RBYh87006673@red.freebsd.org>
Date: Fri, 27 Jan 2012 11:34:43 GMT
From: Alexandr Matveev <timon@timon.net.nz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: print/system-config-printer D-Bus config patch
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         164537
>Category:       ports
>Synopsis:       print/system-config-printer D-Bus config patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 27 11:40:12 UTC 2012
>Closed-Date:    Wed Mar 14 15:34:15 UTC 2012
>Last-Modified:  Wed Mar 14 15:40:04 UTC 2012
>Originator:     Alexandr Matveev
>Release:        9.0-RELEASE
>Organization:
.masterhost
>Environment:
FreeBSD localhost 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
printer-applet don't start with following error:

Traceback (most recent call last):
  File "/usr/local/kde4/bin/printer-applet", line 1153, in <module>
    applet = JobManager()
  File "/usr/local/kde4/bin/printer-applet", line 299, in __init__
    notification = NewPrinterNotification(bus, self)
  File "/usr/local/kde4/bin/printer-applet", line 1042, in __init__
    bus_name = dbus.service.BusName (PDS_OBJ, bus=bus)
  File "/usr/local/lib/python2.7/site-packages/dbus/service.py", line 129, in __new__
    retval = bus.request_name(name, name_flags)
  File "/usr/local/lib/python2.7/site-packages/dbus/bus.py", line 306, in request_name
    'su', (name, flags))
  File "/usr/local/lib/python2.7/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.28" is not allowed to own the service "com.redhat.NewPrinterNotification" due to security policies in the configuration file

The reason is wrong dbus configuration file. Policy "at_console" work in Linux, but don't work in FreeBSD.
>How-To-Repeat:
Install print/system-config-printer and try to run printer-applet or look into .xsession-errors
>Fix:
Add following patch to ports/print/system-config-printer/files/ (remove .txt from file name)


Patch attached with submission follows:

--- newprinternotification.conf.orig	2012-01-27 15:12:33.000000000 +0400
+++ newprinternotification.conf	2012-01-27 15:12:53.000000000 +0400
@@ -2,7 +2,7 @@
  "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig>
-	<policy at_console="true">
+	<policy group="operator">
 		<allow own="com.redhat.NewPrinterNotification"/>
 	</policy>
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Jan 27 11:40:22 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164537 
State-Changed-From-To: open->closed 
State-Changed-By: mezz 
State-Changed-When: Wed Mar 14 15:34:02 UTC 2012 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=164537 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/164537: commit references a PR
Date: Wed, 14 Mar 2012 15:33:59 +0000 (UTC)

 mezz        2012-03-14 15:33:50 UTC
 
   FreeBSD ports repository
 
   Modified files:
     print/system-config-printer Makefile 
   Added files:
     print/system-config-printer/files 
                                       patch-newprinternotification.conf 
   Log:
   Policy "at_console" work in Linux, but don't work in FreeBSD so changed it
   to group="operator" instead. Bump the PORTREVISION.
   
   PR:             ports/164537
   Submitted by:   Alexandr Matveev <timon@timon.net.nz>
   Feature safe:   yes
   
   Revision  Changes    Path
   1.25      +1 -1      ports/print/system-config-printer/Makefile
   1.1       +10 -0     ports/print/system-config-printer/files/patch-newprinternotification.conf (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
