Debian Bug Tracking System wrote:
[snip]
> Changes: 
>  libgksu (2.0.13~pre1-3) unstable; urgency=low
>  .
>    * pt_BR.po: updated Brazilian Portuguese translation by Sérgio
>      Cipolla. Closes: #601168.
>    * 01_tcdrain_kfreebsd.patch: patch from Petr Salinger. Dont use
>      tcdrain on kfreebsd. Closes: #600365.

With the attached libgksu-2.0.13~pre1-kfreebsd_tcdrain-1.patch patch
applied to gksu,  the "Granting Rights" window is now displayed but gksu
does not completely work, the program that is granted rights is never
displayed.

Example of using the command for "Log File Viewer" menu item:

$ gksu gnome-system-log
kvm_open: kvm_nlist: No such file or directory
No protocol specified

(gnome-system-log:4168): gnome-system-log-CRITICAL **: Unable to parse
arguments: Cannot open display:
LibGTop-Server: pid 4184 received eof.
$ echo $?
1

Whereas, the command does run using su:

$ su -c gnome-system-log
Password:
GConf Error: Failed to contact configuration server; the most common
cause is a missing or misconfigured D-Bus session bus daemon. See
http://projects.gnome.org/gconf/ for information. (Details -  1: Failed
to get connection to session: Did not receive a reply. Possible causes
include: the remote application did not send a reply, the message bus
security policy blocked the reply, the reply timeout expired, or the
network connection was broken.)
<lots more error messages like this but gnome-system-log works>
$

Do you want me to open a new bug report for this or continue to use this
bug report?

Additionally, I attach a patch that makes sure the tcdrain function is
not used on FreeBSD as well as kFreeBSD. Perhaps this could be submitted
upstream?

Regards,
Mike.
--- libgksu-2.0.13~pre1/libgksu/libgksu.c	2009-08-16 23:16:09.000000000 +0100
+++ libgksu-2.0.13~pre1-kfreebsd/libgksu/libgksu.c	2010-11-21 15:04:41.000000000 +0000
@@ -2202,7 +2202,9 @@
 	      write (fdpty, line, strlen(line));
 	      g_free (line);
 
+#ifndef __FreeBSD_kernel__
 	      tcdrain (fdpty);
+#endif
 
 	      bzero (buf, 256);
 	      read (fdpty, buf, 255);
Description: Do not use tcdrain on kFreeBSD or FreeBSD.  
 The tcdrain call causes issues on kFreeBSD and FreeBSD so do not use it.
Author: Michael Dorrington <[email protected]>
Last-Update: 2010-11-21

--- libgksu-2.0.13~pre1.orig/libgksu/libgksu.c	2009-08-16 23:16:09.000000000 +0100
+++ libgksu-2.0.13~pre1/libgksu/libgksu.c	2010-11-21 15:10:47.000000000 +0000
@@ -2202,7 +2202,9 @@
 	      write (fdpty, line, strlen(line));
 	      g_free (line);
 
+#if ! defined(__FreeBSD__) && ! defined(__FreeBSD_kernel__)
 	      tcdrain (fdpty);
+#endif
 
 	      bzero (buf, 256);
 	      read (fdpty, buf, 255);

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to