exporting _gtk_selection_request for selection manager use
I'm working on a secure selection manager based on glipper. What it needs to be able to do is intervene and make a security determination when a paste is requested. 'glipper' currently monitors clipboard ownership changes at which time is gets the clipboard contents. I've modified glipper to become the selection owner after it get the clipboard contents and connected a 'selection-request-event' handler to process pastes. I'd like to make the security decision and then either send a selection notify with GDK_NONE or use the default behavior of _gtk_selection_request but this function isn't exported, could it be? ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: exporting _gtk_selection_request for selection manager use
Sorry this is a noop. As I read further I realized that this will be the behavior if my handler returns false. On Thu, Mar 13, 2008 at 12:38 PM, Xavier Toth <[EMAIL PROTECTED]> wrote: > I'm working on a secure selection manager based on glipper. What it > needs to be able to do is intervene and make a security determination > when a paste is requested. 'glipper' currently monitors clipboard > ownership changes at which time is gets the clipboard contents. I've > modified glipper to become the selection owner after it get the > clipboard contents and connected a 'selection-request-event' handler > to process pastes. I'd like to make the security decision and then > either send a selection notify with GDK_NONE or use the default > behavior of _gtk_selection_request but this function isn't exported, > could it be? > ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: exporting _gtk_selection_request for selection manager use
On Thu, Mar 13, 2008 at 1:38 PM, Xavier Toth <[EMAIL PROTECTED]> wrote: > I'm working on a secure selection manager based on glipper. What it > needs to be able to do is intervene and make a security determination > when a paste is requested. 'glipper' currently monitors clipboard > ownership changes at which time is gets the clipboard contents. I've > modified glipper to become the selection owner after it get the > clipboard contents and connected a 'selection-request-event' handler > to process pastes. I'd like to make the security decision and then > either send a selection notify with GDK_NONE or use the default > behavior of _gtk_selection_request but this function isn't exported, > could it be? I hope you are aware that such 'eager' clipboard manager can cause a lot of problems. GTK+ supports a protocol that lets clipboard manager defer getting the actual clipboard contents until the clipboard owner is about to die. An implementation of such a clipboard manager can be found in gnome-settings-daemon. Matthias ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: exporting _gtk_selection_request for selection manager use
Thanks I'll look at the gnome-settings-daemon. A little background, the problem I'm looking to address is the one related to MCS/MLS policy in the SELinux world where you are copying and pasting between windows of different contexts and or levels. In particular my concern is MLS where you need a 'middle man' to be able to downgrade information in a secure way when copying from a higher level window/app and pasting to a lower level window/app. Could you please expand upon what types of problems 'eager' clipboard managers cause? Ted On Sat, Mar 15, 2008 at 11:57 AM, Matthias Clasen <[EMAIL PROTECTED]> wrote: > > On Thu, Mar 13, 2008 at 1:38 PM, Xavier Toth <[EMAIL PROTECTED]> wrote: > > I'm working on a secure selection manager based on glipper. What it > > needs to be able to do is intervene and make a security determination > > when a paste is requested. 'glipper' currently monitors clipboard > > ownership changes at which time is gets the clipboard contents. I've > > modified glipper to become the selection owner after it get the > > clipboard contents and connected a 'selection-request-event' handler > > to process pastes. I'd like to make the security decision and then > > either send a selection notify with GDK_NONE or use the default > > behavior of _gtk_selection_request but this function isn't exported, > > could it be? > > I hope you are aware that such 'eager' clipboard manager can cause a > lot of problems. > GTK+ supports a protocol that lets clipboard manager defer getting the > actual clipboard contents until the clipboard owner is about to die. > > An implementation of such a clipboard manager can be found in > gnome-settings-daemon. > > Matthias > ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: exporting _gtk_selection_request for selection manager use
On Sat, 2008-03-15 at 13:46 -0500, Xavier Toth wrote: > Thanks I'll look at the gnome-settings-daemon. A little background, > the problem I'm looking to address is the one related to MCS/MLS > policy in the SELinux world where you are copying and pasting between > windows of different contexts and or levels. In particular my concern > is MLS where you need a 'middle man' to be able to downgrade > information in a secure way when copying from a higher level > window/app and pasting to a lower level window/app. Could you please > expand upon what types of problems 'eager' clipboard managers cause? Load large spreadsheet, click "select all", watch your eager clipboard manager suck down lots and lots of data, probably in duplicates converted to all possible data types the spreadsheet can convert to. And this may happen even for in-process cut&paste, greatly slowing it down and causing it to serialize all data. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: exporting _gtk_selection_request for selection manager use
Hi, On Tue, 2008-03-18 at 17:50 +0100, Alexander Larsson wrote: > Load large spreadsheet, click "select all", watch your eager clipboard > manager suck down lots and lots of data, probably in duplicates > converted to all possible data types the spreadsheet can convert to. And > this may happen even for in-process cut&paste, greatly slowing it down > and causing it to serialize all data. This is exactly what happens (or at least used to happen) when people run klipper or glipper and use GIMP. You are working on a large image and want to duplicate a layer, Ctrl-C, Ctrl-V. Within GIMP this is a copy-on-write operation and happens almost immidiately, even for large layers. If you have one of those misbehaving clipboard managers running, it will ask GIMP for this data in various formats and GIMP will be busy for several minutes dealing with this request. This is absolutely pointless as GIMP is a nice application and pushes the contents of the clipboard to the clipboard manager when it exits. All we really need is an implementation of the clipboard manager spec. And as far as I know gnome-settings-daemon does this. Sven ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list