kov changed libgksu/trunk/ChangeLog, libgksu/trunk/libgksu/gksu-context.c

Gustavo Noronha kov at costa.debian.org
Wed Sep 21 18:46:55 UTC 2005


Mensagem de log: 
	* libgksu/gksu-context.c:
	- handle 'not in sudoers' message (Ubuntu's #14922)



-----


Modified: libgksu/trunk/ChangeLog
===================================================================
--- libgksu/trunk/ChangeLog	2005-09-20 21:37:28 UTC (rev 445)
+++ libgksu/trunk/ChangeLog	2005-09-21 18:46:54 UTC (rev 446)
@@ -1,3 +1,8 @@
+2005-09-21  Gustavo Noronha Silva  <kov at debian.org>
+
+	* libgksu/gksu-context.c:
+	- handle 'not in sudoers' message (Ubuntu's #14922)
+
 2005-09-18  Gustavo Noronha Silva  <kov at debian.org>
 
 	* libgksu/gksu-context.c:

Modified: libgksu/trunk/libgksu/gksu-context.c
===================================================================
--- libgksu/trunk/libgksu/gksu-context.c	2005-09-20 21:37:28 UTC (rev 445)
+++ libgksu/trunk/libgksu/gksu-context.c	2005-09-21 18:46:54 UTC (rev 446)
@@ -1471,7 +1471,23 @@
 		     _("The underlying authorization mechanism (sudo) "
 		       "does not allow you to run this program. Contact "
 		       "the system administrator."));
+      else
+	{
+	  gchar *haystack = buffer;
+	  gchar *needle;
 
+	  needle = g_strstr_len (haystack, strlen (haystack), " ");
+	  if (needle && (needle + 1))
+	    {
+	      needle += 1;
+	      if (!strncmp (needle, "is not in", 9))
+		g_set_error (error, gksu_quark, GKSU_CONTEXT_ERROR_NOT_ALLOWED,
+			     _("The underlying authorization mechanism (sudo) "
+			       "does not allow you to run this program. Contact "
+			       "the system administrator."));
+	    }
+	}
+
       while (!waitpid (pid, &status, WNOHANG))
 	{
 	  cmdline = get_process_name (pid);




More information about the gksu-commits mailing list