commit seahorse-plugins for openSUSE:Factory

Hello community, here is the log from the commit of package seahorse-plugins for openSUSE:Factory checked in at Sun Nov 1 10:11:54 CET 2009. -------- --- seahorse-plugins/seahorse-plugins.changes 2009-10-08 16:09:13.000000000 +0200 +++ /mounts/work_src_done/STABLE/seahorse-plugins/seahorse-plugins.changes 2009-10-28 11:16:33.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Oct 28 08:56:54 UTC 2009 - aj@suse.de + +- Fix interoperability of gnupg-2.0.12 and seahorse (bnc#545961) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- seahorse-agent-careful-repeat.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ seahorse-plugins.spec ++++++ --- /var/tmp/diff_new_pack.vVz7nE/_old 2009-11-01 10:11:45.000000000 +0100 +++ /var/tmp/diff_new_pack.vVz7nE/_new 2009-11-01 10:11:45.000000000 +0100 @@ -20,7 +20,7 @@ Name: seahorse-plugins Version: 2.28.0 -Release: 2 +Release: 3 BuildRequires: epiphany-devel BuildRequires: fdupes # For directory ownership: @@ -44,6 +44,8 @@ Requires: %{name}-lang = %{version} Summary: Plugins for the seahorse cryptography interface Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM seahorse-agent-careful-repeat.patch bnc#545691 aj@suse.de -- Taken from upstream +Patch1: seahorse-agent-careful-repeat.patch Url: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-build %gconf_schemas_prereq @@ -120,7 +122,8 @@ %lang_package %prep -%setup +%setup -q +%patch1 -p1 %build %configure \ ++++++ seahorse-agent-careful-repeat.patch ++++++ diff --git a/agent/seahorse-agent-io.c b/agent/seahorse-agent-io.c index 11f2a3c..ffb9417 100644 --- a/agent/seahorse-agent-io.c +++ b/agent/seahorse-agent-io.c @@ -93,12 +93,14 @@ struct _SeahorseAgentConn { #define ASS_OPTION "OPTION" #define ASS_GETPASS "GET_PASSPHRASE" #define ASS_CLRPASS "CLEAR_PASSPHRASE" +#define ASS_GETINFO "GETINFO" #define ASS_OPT_DISPLAY "display=" /* Options */ #define ASS_FLAG_DATA "data" #define ASS_FLAG_CHECK "check" +#define ASS_FLAG_REPEAT "repeat" /* Responses */ #define ASS_OK "OK " @@ -269,8 +271,21 @@ static guint32 parse_assuan_flag (gchar *flag) { g_assert (flag); - if (g_str_equal (flag, "data")) + if (g_str_equal (flag, ASS_FLAG_DATA)) return SEAHORSE_AGENT_PASS_AS_DATA; + else if (g_str_has_prefix (flag, ASS_FLAG_REPEAT)) { + gint count = 1; + + flag += strlen(ASS_FLAG_REPEAT); + if (*flag == '=') { + count = atoi (++flag); + if (!(count == 0 || count == 1)) + g_warning ("--repeat=%d treated as --repeat=1", count); + } + + if (count) + return SEAHORSE_AGENT_REPEAT; + } return 0; } @@ -373,6 +388,68 @@ x11_displays_eq (const gchar *d1, const gchar *d2) return (g_ascii_strncasecmp (d1, d2, l1 > l2 ? l1 : l2) == 0); } +/* Does command have option? */ +static gboolean +command_has_option (SeahorseAgentConn *cn, gchar * command, gchar * option) +{ + gboolean has_option = FALSE; + + if (!strcmp (command, ASS_GETPASS)) { + has_option = (!strcmp (option, ASS_FLAG_DATA) || + !strcmp (option, ASS_FLAG_REPEAT)); + } + /* else if (other commands) */ + + if (has_option) + seahorse_agent_io_reply (cn, TRUE, NULL); + + return has_option; +} + +/* Process a GETINFO request */ +static void +ass_getinfo (SeahorseAgentConn *cn, gchar * request) +{ + gchar *args; + gboolean implemented = FALSE; + + args = strchr (request, ' '); + if (args) { + *args = 0; + args++; + while (isspace (*args)) + args++; + } + + if (!strcmp (request, "cmd_has_option")) { + gchar *command = args; + gchar *option; + + if (!command || !*command) { + seahorse_agent_io_reply (cn, FALSE, "105 parameter error"); + return; + } + + option = strchr(args, ' '); + + if (option) { + *option = 0; + option++; + while (isspace (*option)) + option++; + } else { + seahorse_agent_io_reply (cn, FALSE, "105 parameter error"); + return; + } + + implemented = command_has_option(cn, command, option); + } + /* else if (other info request) */ + + if (!implemented) + seahorse_agent_io_reply (cn, FALSE, "100 not implemented"); +} + /* Process a request line from client */ static void process_line (SeahorseAgentConn *cn, gchar *string) @@ -484,6 +561,10 @@ process_line (SeahorseAgentConn *cn, gchar *string) seahorse_agent_actions_clrpass (cn, id); } + else if (strcasecmp (string, ASS_GETINFO) == 0) { + ass_getinfo (cn, args); + } + else if (strcasecmp (string, ASS_NOP) == 0) { seahorse_agent_io_reply (cn, TRUE, NULL); } diff --git a/agent/seahorse-agent-prompt.c b/agent/seahorse-agent-prompt.c index e897464..b69b773 100644 --- a/agent/seahorse-agent-prompt.c +++ b/agent/seahorse-agent-prompt.c @@ -155,8 +155,13 @@ seahorse_agent_prompt_pass (SeahorseAgentPassReq *pr) g_return_if_fail (!seahorse_agent_prompt_have ()); - dialog = seahorse_passphrase_prompt_show (NULL, pr->errmsg ? pr->errmsg : pr->description, - pr->prompt, NULL, FALSE); + dialog = + seahorse_passphrase_prompt_show (NULL, + (pr->errmsg ? + pr->errmsg : pr->description), + pr->prompt, NULL, + pr->flags & SEAHORSE_AGENT_REPEAT); + g_signal_connect (dialog, "response", G_CALLBACK (passphrase_response), pr); g_current_win = GTK_WIDGET (dialog); } diff --git a/agent/seahorse-agent.h b/agent/seahorse-agent.h index 92267a9..0be3209 100644 --- a/agent/seahorse-agent.h +++ b/agent/seahorse-agent.h @@ -81,6 +81,7 @@ void seahorse_agent_io_data (SeahorseAgentConn *cn, const gchar *data); */ #define SEAHORSE_AGENT_PASS_AS_DATA 0x00000001 +#define SEAHORSE_AGENT_REPEAT 0x00000002 typedef struct _SeahorseAgentPassReq { const gchar *id; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de