kov changed gksu/tags/2.0.2/, gksu/tags/2.0.2/ChangeLog, gksu/tags/2.0.2/ChangeLog, gksu/tags/2.0.2/configure.ac, gksu/tags/2.0.2/configure.ac, gksu/tags/2.0.2/gksu/gksu.c, gksu/tags/2.0.2/gksu/gksu.c
Gustavo Noronha
kov at alioth.debian.org
Wed Mar 4 19:25:21 UTC 2009
Mensagem de log:
tagging 2.0.2
-----
Copied: gksu/tags/2.0.2 (from rev 840, gksu/trunk)
Deleted: gksu/tags/2.0.2/ChangeLog
===================================================================
--- gksu/trunk/ChangeLog 2009-02-23 02:20:27 UTC (rev 840)
+++ gksu/tags/2.0.2/ChangeLog 2009-03-04 19:25:21 UTC (rev 853)
@@ -1,1326 +0,0 @@
-2009-02-22 Gustavo Noronha Silva <kov at alface>
-
- * Release 2.0.1
-
-2009-02-22 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c: - sanitize environment before running applications
- using su mode
-
-2009-02-22 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac, nautilus-gksu/libnautilus-gksu.c: - port to GIO,
- and newer nautilus
-
-2009-02-22 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac, gksu/gksu.c:
- - accepted patch by Joshua Kwan <jkwan at vmware.com> to
- make gksu return the same status code as the child
-
-2009-02-03 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added th to ALL_LINGUAS
-
-2008-11-22 Gustavo Noronha Silva <kov at debian.org>
-
- * nautilus-gksu/libnautilus-gksu.c:
- - accepted patch by Josselin Mouette to fix a crash
-
-2007-05-11 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added gl to ALL_LINGUAS
-
- * configure.ac:
- - added zh_CN to ALL_LINGUAS
-
-2007-03-25 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added ar to ALL_LINGUAS
-
-2007-03-04 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - accepted patch by Michael Vogt to correctly quote
- strings which have \ or ', when in sudo mode
-
-2007-02-04 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added ja to ALL_LINGUAS
-
-2006-09-23 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 2.0.0
-
-2006-09-03 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - typo fix; thanks to Chris Moore <dooglus at gmail.com>
-
-2006-08-19 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added lt to ALL_LINGUAS
-
- * gksu-migrate-conf.sh:
- - patch by Christian Hamar to fix non-POSIX compliant usage of
- head (Savannah bugs #16530 and 16807)
-
- * Release 1.9.4
-
- * man/man.1:
- - enhanced the description, wrote about the missing options and
- added information about the new usage mode (with no command
- specified); this also addresses the concerns of Debian bug
- #383477
-
-2006-08-17 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - imported gksuexec code into the gksu application; now if you call
- gksu with no commands, it will open the gksuexec UI to request
- for a command, user and other options;
-
-2006-08-09 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added sv to ALL_LINGUAS
-
- * nautilus-gksu/libnautilus-gksu.c:
- - implemented error checking for the code that finds out
- what program to run for the file; that should address the
- segfault related in the Debian BTS:
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380407
- - do not show the menu item for items using the x-nautilus-desktop
- uri scheme; finishes the solution of the bug mentioned above
-
-2006-08-06 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - applied patch by Josselin Mouette to correctly include the
- locale.h file
-
- * Release 1.9.3
-
- * gksu/gksu.c:
- - remove all the startup notification-related code, which
- is now done by the library;
-
- * nautilus-gksu/libnautilus-gksu.c:
- - only display the menu item if we're not already
- root
-
-2006-07-22 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c, man/gksu.1:
- - typo fix (descriptional -> descriptive), thanks to
- A Costa <agcosta at gis.net>; addresses Debian bug
- #379186
-
-2006-07-17 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.9.2
-
-2006-07-10 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - re-ask password 2 times when the first attempt gives us a
- wrong password; use the new libgksu API to display an alert
- warning about the wrong password
-
-2006-07-10 Gustavo Noronha Silva <gustavo.noronha at mds.gov.br>
-
- * nautilus-gksu/libnautilus-gksu.c:
- - handle .desktop files, as well, by reading their Exec key
- - do not avoid handling nautilus folders
-
-2006-07-09 Gustavo Noronha Silva <kov at debian.org>
-
- * nautilus-gksu:
- - wrote an initial nautilus module to provide a 'open as administrator'
- menu item for stuff in nautilus
-
-2006-07-03 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - do not display error message when the error code tells us
- that the dialog has been canceled by the user
-
- * gksu/gksu.c:
- - retry password prompt 3 times; still need a better way to
- handle showing a message to the user
-
-2006-05-01 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.9.1
-
- * gksu/gksu.c:
- - fix typo in help message
-
- * configure.ac:
- - updated version to 1.9.1 and require libgksu
- >= 1.9.2 because of the new APIs and stuff
-
-2006-04-30 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - updated using help2man
-
- * TODO:
- - removed;
-
- * README:
- - updated about the gconf issues
-
- * gksu/gksu.c:
- - reimplemented the --desktop functionality by using
- the new set_description API
- - reimplemented the --print-pass functionality by
- using the new ask_password API;
-
-2006-04-25 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - incorporated Startup Notification patch by Michael Vogt
-
- * gksu/gksu.c:
- - removed the desktop file option; will be replaced by an
- option to tell gksu a 'user-friendly' name for the
- action that is being taken
-
-2006-04-24 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - provide a clear way of forcing sudo and su modes, and
- fall back to the default, using the new gksu_run_full,
- if none is given
-
- * gksu/gksu.c:
- - ignore -i and -t, reimplemented -m using functionality
- that has just been added to libgksu2
-
- * Release 1.9.0
-
-2006-04-23 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - removed all code related to gnome-keyring and gconf,
- which is now on libgksu
-
- * gksu/gksuexec.c, gksu/util.{c,h}:
- - removed; code moved to gksu or simply not so useful and
- unmaintained
-
-2006-04-03 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - fixed typo, patch by Nicolas François
- <nicolas.francois at centraliens.net>
-
-2006-03-29 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu-migrate-conf.sh:
- - remove bash3.0isms, enhance the code that gets the values
- from the config file to be more robust and work on more
- possibilities
-
-2006-03-28 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - applied (modified) patch by Gabor Kelemen <kelemeng at gnome.hu>
- to make the help string a better citizen
-
-2006-01-29 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac, gksu/gksu.c:
- - disabled code that will be moved to the libgksu
- package and started the port to libgksu2
-
- * gksu/gksu.c:
- - removed code moved to libgksu, started porting to
- libgksu2, misc fixes and cleanup, removed trailing
- whitespaces
-
-2006-01-07 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added it to ALL_LINGUAS
-
-2005-11-23 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu{,exec}.desktop.in:
- - modified based on a patch by Thierry Moisan
- <thierryn at videotron.ca> to be compliant with the desktop
- spec (passes desktop-file-validate); thanks to
- Michael Vogt for forwarding the patch
-
-2005-10-26 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.3.6
-
- * gksu/gksu.c:
- - make sure the no-pass window will go away before proceeding
- with calling the program, so we won't have a dead window
- on screen
-
- * gksu/gksu.c:
- - more logic problem fixes, this time with the
- display-no-pass-info gconf key - the meaning of the
- gconf key bool value and the check button bool value
- are inverted, so we need to special case it
-
- * gksu/gksu.c:
- - only try_gnome_keyring if gksu_context_try_need_password
- returns TRUE
-
-2005-10-19 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - added fade in effect when screen was faded out
-
- * gksu/gksuexec.c:
- - applied patch from dennis at kaarsemaker.net, grabbed from
- Ubuntu's bugzilla to use GKSU_CMD be used on the error
- reporting instead of using PREFIX, etc.
-
-2005-09-29 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.3.5
-
-2005-09-20 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - applied patch by Michael Vogt with some modifications
- to avoid dead-locking X when gksu tries to grab mouse
- or keyboard while a menu is open or something else is
- stealing focus (Debian #310951, Ubuntu #14430)
-
- * gksu/gksu.c:
- - do not show the gnome-keyring UI if -a was passed as
- an option
-
-2005-09-16 Guilherme de S. Pastore <guilherme.pastore at terra.com.br>
-
- * man/gksu.1:
- - removed section about the configuration file
-
- * README:
- - tiny rewording (versions are not smaller, they're lower)
-
-2005-09-13 Guilherme de S. Pastore <guilherme.pastore at terra.com.br>
-
- * gksu/gksuexec.c:
- - spit out an error message if no command is given
-
- * gksu/gksuexec.c:
- - switch from the deprecated GtkCombo to GtkComboBox
- - remove check for empty user; GtkComboBox won't allow this
- - drop get_user_list() and use fill_with_user_list() instead,
- for appending to the ComboBox rather than returning a list
- (also drop free_user_list(), consequently)
-
- * gksu/gksuexec.c:
- - destroy the dialog when we no longer need it
-
-
-2005-09-13 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c, man/gksu.1:
- - add a --desktop option so that gksu is now able to
- read some of the information it uses to fill the dialog
- from a desktop file
-
-2005-09-12 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - add another hack for the -- symbol to work correctly so
- you can call "gksu -- commands and its arguments"
-
-2005-09-10 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - change the UI to make it clear that the first choice
- to be made is whether to record the password and the
- second one is in which keyring (default or session)
- when using the GNOME keyring.
-
-2005-08-20 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/{gksu,util}.c:
- - make error reporting more aestheticaly pleasant
-
- * Release 1.3.4
-
-2005-08-18 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu/gksu.c: check if pwentry is not NULL before accessing
- one of the structure members, so we don't segfault when the
- given user does not exist (Debian bug #323836)
-
-2005-08-17 Gustavo Noronha Silva <kov at debian.org>
-
- * README:
- - clarify the migration script location
-
-2005-08-16 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - fix logic problem with disable-grab setting
-
-2005-08-10 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.3.3
-
- * gksu-migrate-conf.sh:
- - fix logic problem with a misplaced else
-
-2005-08-09 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c, gksu/gksu.schemas.in:
- - correct the schema to have save-keyring be string; check
- if gconf_client_get_string returns something valid in that
- case, anyway
-
-2005-08-07 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.3.2
-
- * relibtoolize with libtool 1.5.6 (1.1220.2.95 2004/04/11
- 05:50:42) Debian: 224 $
-
- * configure.ac:
- - bumped version to 1.3.2
- - depend on libgksu1.2 >= 1.3.3 because of the new APIs we
- use
-
-2005-08-07 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu.desktop.in, gksuexec.desktop.in:
- - no longer have the whole paths to the icons hardcoded
-
-2005-08-06 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - set the keyring check buttons to be checked depending
- on how the corresponding gconf keys are set
-
- * gksu/gksu.c:
- - apparently show_all on the dialog instead of several
- show's for widgets added to the dialog caused problems
- with the grabbing, so do the later
-
- * gksu/gksu.c:
- - check boxes and gconf keys for the user to be able to setup
- what to do about gnome-keyring in the gksu window
-
-2005-08-06 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu/gksuexec.c:
- - removed unnecessary call to gtk_set_locale()
-
-2005-08-06 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - use one, global, GConfClient instead of creating and
- unrefing many
-
- * gksu/gksu.c:
- - relocate the detection of sudo mode based on argv[0] so that
- it will actually have an effect
-
- * gksu/gksu.c:
- - cast dialog correctly avoiding warnings on the build
-
- * gksu/gksu.c, gksu/gksu.schemas.in:
- - added a new gconf key that determines whether the warning
- about the program running without the password being asked
- will be shown
-
-2005-08-06 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu/gksu.c:
- - changed the message of the warning shown when no password
- was requested to run the program
-
- * gksu/gksu.c:
- - improved the description of the --always-ask-password
- switch
-
- * gksu/gksu.c:
- - fixed some spelling mistakes
-
- * gksu/gksu.schemas.in:
- - fixed some spelling mistakes
-
-2005-08-05 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu-migrate-conf.sh:
- - adding script written by Guilherme de S. Pastore to migrate
- the configuration done in /etc/gksu.conf to the new gconf-based
- system
-
-2005-08-04 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - use the new run_full functions for both su and sudo backends
- and display a notice if a password is not requested
-
-2005-08-02 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c, gksu/gksu.schemas.in, gksu/Makefil.am, configure.ac,
- po/POTFILES.in:
- - replace the gksu config file with a gconf-based configuration
- system
-
-2005-08-01 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - added support for gnome-keyring, coming from libgksu
- patch originally done by Szilard Novaki and slightly
- modified by me
-
-2005-08-01 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu/gksuexec.c: sort user list by username instead of
- by uid, partially addressing Debian bug #315635
-
-2005-07-20 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - applied patch grabed from ubuntu to keep the
- window above, which addresses window managers
- hiding the window behind other windows, and to
- avoid the 'mouse cursor looks funny' symptom
-
-2005-07-16 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - require libgksu1.2 1.3.2 and libgksuui1.0 1.0.6
-
-2005-07-15 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu{,exec}.desktop.in:
- - add Encoding: UTF-8 field which is required by the Desktop
- spec
-
- * Release 1.3.1
-
- * gksu/gksu.c:
- - put the callback function that asks for the password
- outside of the main function because that would cause
- problems in arches in which you cannot execute the stack
-
-2005-07-12 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - use the new gksu_context_ask_and_run and
- gksuui_dialog_set_prompt APIs to work better
- with stuff like pam-modified prompts and
- 'you don't need a password' cases
-
-2005-06-21 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added xh to ALL_LINGUAS
-
-2005-06-18 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac, Makefile.ac, intltool-{extract,merge,update}.in:
- - adding support for intltool, basically so that .desktop
- files are localized
-
- * Release 1.3.0
-
- * configure.ac:
- - depend on libgksu 1.3.1 because we are using newer
- APIs
-
-2005-06-17 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - use the new gksu_context_sudo_try_need_password to check
- if we need a password for sudo, addressing Debian bug
- #312937
- - we should only return 3 if an error happens when running with
- sudo
-
-2005-06-16 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu/gksu.c:
- - added --always-ask-password (-a) command-line option
- and always-ask-password key to gksu.conf, that makes
- gksu *not* try to run the command without asking for
- a password.
-
-2005-06-14 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added ro to ALL_LINGUAS
-
-2005-06-13 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2.6
-
- * gksu/gksu.c:
- - use gksu_context_try_need_pass to check if we really
- need to ask for the password before doing so
- - rephrase the default sentence for asking password so
- it has better usability, based on suggestions by
- Matthew Thomas, see the ubuntu bug report:
- https://bugzilla.ubuntu.com/show_bug.cgi?id=7385
-
- * configure.ac, gksu/Makefile.am:
- - use PKG_CHECK_MODULES to check for GTK+ >= 2.4
- and libgksu1.2 >= 1.3.0 because we'll be using
- the new API function gksu_context_try_need_pass
-
-2005-05-13 Miroslav Kure <kurem at debian.cz>
-
- * configure.ac:
- - added cs to ALL_LINGUAS
-
-2005-05-12 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - correctly set grab to FALSE if the user clicks 'No' when
- --prompt is passed
-
- * configure.ac:
- - added pl to ALL_LINGUAS
-
-2005-04-27 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added hu to ALL_LINGUAS
-
-2005-04-25 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - renamed no_NB on ALL_LINGUAS to nb
-
-2005-04-19 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added nl to ALL_LINGUAS
-
-2005-04-05 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2.5
-
-2005-03-30 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added fr to ALL_LINGUAS
-
-2005-03-28 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - small patch from Michael Vogt <mvo at debian.org>
- to clean up correctly on NFS-mounted home directories
-
-2005-03-13 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - applied patch to fix formatting problem on the
- manpage, thanks to Loïc Minier <lool at dooz.org>
-
-2005-03-01 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2.4
-
- * gksu/gksu.c:
- - no longer grab Xserver, simply grabing keyboard and
- mouse should be enough and less problematic in some
- cases; accepting suggestion by Edward Liu
- <dhliu at springsoft.com.tw>
-
- * gksu/gksu.c:
- - reverted old locking solution and apply patch from
- Michael Vogt <mvogt at acm.org> that implements a more
- robust strategy.
-
-2005-02-21 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - added a bit more information for sudo functionality
-
- * configure.ac:
- - added sk to ALL_LINGUAS
-
-2005-02-07 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - use a normal window when not grabbing and a popup window
- when grabbing
-
- * gksu/gksu.c:
- - undo the fadeout on ungrabing
-
- * gksu/gksu.c, gksu/gksu.conf:
- - prompt now work when disable-grab is enabled, and prompt
- and sudo-mode behave like they should
- - configuration file documents that prompt will only work
- if force-grab is disabled
- - Thanks for Juergen Kreileder <jk at blackdown.de> for reporting
- these, and providing a patch - this addresses Debian bug
- #293236
-
- * gksu/gksu.c:
- - use a simple lock file to avoid duplicate gksu's running
- at the same time, to avoid drawing problems - finishes
- addressing Debian bug #293214
-
- * gksu/gksu.c:
- - fade out the window when grabing, so that the user
- understands more clearly that only gksu's window is
- usable - addresses some of Debian bug #293214
-
-2005-01-30 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2.3
-
-2005-01-30 Guilherme de S. Pastore <gpastore at colband.com.br>
-
- * gksu/gksu.c (help string only):
- - Fixed the prompt string gramatically
- - Update with newest command-line options
- - Add punctuation to all sentences for consistency
- - Cut out the third person 's' from the end of the
- verbs for consistency
-
-2005-01-25 Gustavo Noronha Silva <kov at debian.org>
-
- [ gksu-1.2.2.pre1.2.3.1 ]
-
- * gksu/Makefile.am, gksu/gksu.conf:
- - install a default gksu.conf file in /etc (hardcoded
- for now)
-
- * gksu/gksu.c:
- - some more error checking
- - check that the file /etc/gksu.conf is owned by root:root and
- has mode 0644.
-
-2005-01-18 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - added --prompt, -P, which will show a window asking
- if the user wishes the screen to be grabed, also added
- to /etc/gksu.conf parsing
- - made -P, -g and -S accept optional arguments so you
- can turn then on or off regardless of the default set
- on /etc/gksu.conf
- - added force-grab option to /etc/gksu.conf, to force
- grabing whatever the user chooses
-
-2005-01-17 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - added support for a /etc/gksu.conf file, which will make some
- of the options available for default setting by the admin -
- still needs some polishing, it is trying to address several
- Debian bugs. See http://bugs.debian.org/271567 for the
- discussion.
-
- * man/gksu.1:
- - updated to document the change to return codes for
- gksu
-
- * gksu/gksu.c:
- - accepted patch by Michael Vogt <mvogt at acm.org>
- to return different error codes when different
- "problems" happen; this fixes Debian bug #266832
-
-2004-12-08 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added pt to ALL_LINGUAS
-
-2004-10-17 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2.2
-
- * gksu/gksuexec.c:
- - set user list combo to be uneditable (the value has got to
- be on the list); this fixes Debian bug #276535
-
- * gksu/gksu.c, man/gksu.1:
- - fixed typo passowrd -> password; this fixes Debian bug
- #262561
-
- * gksu/gksu.c:
- - runs the command immediately if we're already the target
- user; this fixes Debian bug #276432
- - convert password to system locale before using it;
- this fixes Debian bug #276089
- - marked string for translation which was missing
- the mark
-
-2004-10-13 Gustavo Noronha Silva <kov at alface.horta>
-
- * configure.ac:
- - added no_NB to ALL_LINGUAS
-
-2004-09-21 Gustavo Noronha Silva <kov at alface.horta>
-
- * gksu/gksu.c:
- - quotes strings properly and accepts -- now, working-around
- gtk_init removing the -- added by the user
-
-2004-09-07 Gustavo Noronha Silva <kov at alface.horta>
-
- * man/gksu.1:
- - mentions gksudo again, but not yet ready
-
-2004-08-07 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2.1
-
- * gksu/gksuexec.c:
- - really updated all the references to the gksu icon
- for the window
-
- * configure.ac:
- - added ca to ALL_LINGUAS
-
-2004-07-13 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - reimplemented X keyboard and mouse grabing
- copying code from libgksuui (Debian Bug #254949)
-
- * gksu/gksuexec.c:
- - updated the icon location for gksuexec's window
-
-2004-06-09 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu.desktop, gksuexec.desktop:
- - updated german translation, thanks to
- Sebastian Heinlein <sebastian.heinlein at web.de>
-
-2004-06-08 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu.desktop, gksuexec.desktop:
- - Removed the '(GkSU)' string from the gksu and gksuexec
- menu entries (Debian Bug #252334)
- - convert both files to UTF-8
- - fix icon locations for the desktop menu entries
- (Debian Bug #252576)
-
-2004-05-30 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.2
-
-2004-05-06 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1, gksu/gksu.c, gksu/gksuexec.c:
- - rename all 'preserv's to 'preserve' (--preserv-env'
- is now deprecated)
-
-2004-03-25 Gustavo Noronha Silva <kov at debian.org>
-
- * Makefile.am, gksu-terminal.png, gksu.png:
- - renaming icons installed by the gksu application
- so that they won't conflict with previous
- versions of libgksu
-
-2004-03-21 Gustavo Noronha Silva <kov at debian.org>
-
- * Repackaging and splitting off of the
- gksu package from the libraries.
-
-2004-03-21 gettextize <bug-gnu-gettext at gnu.org>
-
- * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
-
-2004-03-21 gettextize <bug-gnu-gettext at gnu.org>
-
- * Makefile.am (SUBDIRS): Remove intl.
- (EXTRA_DIST): New variable.
- * configure.ac (AC_CONFIG_FILES): Add m4/Makefile.
- (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1.
-
-2004-02-03 Gustavo Noronha Silva <kov at debian.org> [1.1.1]
-
- * configure.ac:
- - polished a bit
-
- * libgksu/gksu-private.c:
- - fixed wrong error checking (duh)
-
- * libgksu/gksu-context.[ch]:
- - new implementation of GksuContext, based on
- the GObject glib facility
-
- * libgksu/libgksu.c, gksu/gksu.c:
- - port to the new GObject-based GksuContext
-
-2004-02-02 Gustavo Noronha Silva <kov at debian.org>
-
- * libgksu/gksu-private.c, libgksu-gksu-private.h:
- - added a gksu_init_check function to init
- gtk
-
- * libgksu/libgksu.c, libgksu/gksu.h:
- - added printf-like format support for title and
- message setters
- - call gksu_init_check on all the three main functions
- to make sure gtk will be inited
-
-2004-01-29 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c:
- - ported to the new API
-
- * libgksu/libgksu.c, libgksu/gksu-private.c:
- - more well-defined separation between exported
- and not export symbols (now even using the
- visibility __attribute__)
- - new API, based on contexts, preparation for
- 1.2
-
- * gksu/gksuexec.c:
- - accepted patch from Jorgen Viksell <jorgen.viksell at telia.com>
- to have gksuexec show a combo listing all the users on the
- system, thanks!
-
-2004-01-20 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.0.3
-
- * libgksu/libgksu.c:
- - fixed _gksu_conf->dir allocation for gksu_sudo_run
- to work
-
- * libgksu/libgksu.c:
- - added aditional error checking code to the xauth
- exec to avoid a segfault when it returns nothing
- patch by Doug Holland <meldroc at frii.com>
-
-2004-01-18 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu/gksu.c, Makefile.am:
- - added support to sudo, when called as 'gksudo'
- - create the symlink on install
-
-2004-01-17 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.0.2
-
-2004-01-16 Gustavo Noronha Silva <kov at debian.org>
-
- * libgksu/libgksu.c, libgksu/gksu.h:
- - improved error checking
- - improved error reporting on sudo related stuff
- - added gksu_sudo_run, with sudo support
-
- * remove the common directory and library, integrate
- the relevant parts into libgksu and gksu separately
-
- * libgksu/libgksu.c, common/gksutils.c:
- - incorporated code from gnome-sudo with some
- modifications to have gksu handle sudo, too
- untested, probably unstable code, needs testing
- to be exposed
-
- * libgksu/Makefile.am:
- - build the library with -fPIC, to allow prelinking
-
- * configure.ac:
- - added da to ALL_LINGUAS
-
-2004-01-15 Gustavo Noronha Silva <kov at debian.org>
-
- * libgksu/libgksu.c:
- - Fixed problems with gksu closing the application
- when canceled
- - gtk_init_check instead of gtk_init, to avoid failures
- killing the "parent" application
-
-2004-01-14 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.0.1
-
- * Major update on the documentation stuff
-
- * Small corrections to the locale handling code
-
-2003-12-19 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 1.0.0
-
- * introducing libgksu! I believe the code is stable
- enough for a 1.0 release -- althought the change to
- a library might be a big move, the code has not
- being changed a lot... let's see if the Debian
- unstable trial proves me wrong.
-
-2003-11-18 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.18
-
- * src/gui.c:
- - does not quit when grab fails, warns and continues...
-
- * po/de.po:
- - small fix, thanks to Michael Vogt <mvogt at acm.org>
-
- * src/gksu-run-helper.c:
- - fix bashism
-
-2003-11-14 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.17
-
- * autogen.sh:
- - use automake 1.7, instead of 1.6
-
- * configure.ac, po/pl.po:
- - added polish translation, thanks to Emil <emil5 at go2.pl>
-
- * src/gksu-run-helper.c:
- - added, to help fix the stupid security bug
-
- * src/gksu.{c,h}, src/su.c, src/xauth.c:
- - modified to use the gksu-run-helper, which will
- fix the security bug in which the Xauth token
- appears on a ps auxwww
-
-2003-08-28 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.16
-
-2003-08-26 Gustavo Noronha Silva <kov at debian.org>
-
- * src/xauth.c:
- - take care to take the MIT-MAGIC-COOKIE-1 from
- xauth list, XDM auth strings were biting gksu
-
-2003-08-08 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.15
-
-2003-08-06 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac:
- - added 'de' (German) to ALL_LINGUAS
-
- * gksu.desktop, gksuexec.desktop:
- - added German translation, thanks to:
- Sebastian Heinlein <sebastian.heinlein at campus.lmu.de>
-
-2003-07-29 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.14
-
- * src/su.c:
- - shows a nicer dialog with 'Wrong password.'
- instead of simply 'Child exited with error
- 1' thingy if su returns 'Authentication failure'
-
- * src/su.c:
- - use >& to redirect instead of 2>&1 to make
- non-bash shells happy (Closes: #203386,
- #203387)
-
-2003-07-24 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.13
-
- * README:
- - some explanations added
-
- * src/gui.c, src/su.c:
- - some modifications on the default label that's
- presented explaining why it wants the password,
- and in the label behavior, in general
-
- * src/gksu.c, src/xauth.c:
- - added --ssh-fwd option, which uses just the :x.x
- part of display when working with xauth, for gksu
- to work on ssh X11 forwarding
- (Closes Debian bug: #202532)
-
-2003-07-23 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.12
-
-2003-07-22 Gustavo Noronha Silva <kov at debian.org>
-
- * src/xauth.c:
- - added output about xauth token, file, directory and
- display, for debuging purposes (when --debug is enabled)
- - fixed clean_dir to remove the directory if it is empty
- before clean_dir is called
-
- * src/su.c:
- - do not show xauth's output, unless --debug is given
- - get rid of bashism when calling xauth by using the
- env command
-
- * src/gksu.c:
- - added a --debug option, to ask for more verbose
- output
-
-2003-07-14 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - fixed --icon position
-
-2003-06-14 gettextize <bug-gnu-gettext at gnu.org>
-
- * Makefile.am (ACLOCAL_AMFLAGS): New variable.
- * configure.ac (AC_CONFIG_FILES): Add m4/Makefile.
- (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
-
-2003-06-14 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.11
-
- * Applied patch from Ãlvaro Peña <apg at esware.com>
- to HIG-ify gksu a bit more
-
-2003-05-24 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.10
-
- * src/su.c:
- - Why the hell do I want gksu to automaticaly go to
- background? Changed that, I guess that'll help
- lots of scripts.
-
-2003-05-10 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.9
-
- * src/gksuexec.c:
- - fixed the way the command is passed as argument
- to gksu to fix running programs with arguments (duh)
-
-2003-05-08 Gustavo Noronha Silva <kov at debian.org>
-
- * src/su.c:
- - fixed bug which did not allow gksu to run programs
- with arguments like, say, 'emacs /etc/mozpluggerrc' =)
-
-2003-05-06 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac: added es.po to ALL_LINGUAS
-
-2003-05-02 Gustavo Noronha Silva <kov at debian.org>
-
- * configure.ac: added ru.po to ALL_LINGUAS
-
-2003-04-05 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.8
-
- * src/xauth.c:
- - initialize 'xauth' to avoid problems with junk
- thanks to Alex Stewart <am2stewa at uwaterloo.ca>
-
- * src/gui.c:
- - wait a bit longer before checking for the effectiveness of
- the keyboard/mouse grab
-
-2003-03-29 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.7
-
- * src/gksu.c, src/xauth.c:
- - remove references to sudo, at least for now
-
- * src/sudo.{c,h}:
- - removed, no longer provide sudo functionality, it
- doesn't work as well as it should
-
-2003-03-28 Gustavo Noronha Silva <kov at debian.org>
-
- * src/su.c:
- - use xauth information to make the magic work
-
- * src/xauth.c:
- - implement prepare_xauth_su to handle Xauth in a safer way,
- by using the 'xauth' program instead of a world readable
- .Xauthorization file
- - move the old way of doing things to the prepare_xauth_sudo
- function... sudo is a difficult piece of software to handle
-
- * src/gksu.c:
- - moved as much xauth specific stuff as I could to xauth.c
-
-2003-02-01 Allan Douglas <allan_douglas at gmx.net>
-
- * src/sudo.c:
- - cleanups
-
-2003-01-31 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.1
-
- * AUTHORS:
- - added Allan Douglas
-
-2003-01-31 Allan Douglas <allan_douglas at gmx.net>
-
- * src/su.c:
- - fixed the "missing output" bug
-
-2003-01-30 Allan Douglas <allan_douglas at gmx.net>
-
- * configure.ac:
- - removed yacc dependency
-
- * src/su.c:
- - cleanups
-
-2003-01-30 Gustavo Noronha Silva <kov at debian.org>
-
- * src/su.c, src/sudo.c:
- - fixed some stuff pointed by my friend "o_0" =P
-
- * src/gksuexec.c:
- - has an 'advanced' dialog to select options
- 'login_shell' and '--preserv-env' for gksu
-
-2003-01-30 Gustavo Noronha Silva <kov at debian.org>
-
- * src/gksuexec.c:
- - has an 'advanced' dialog to select options
- 'login_shell' and '--preserv-env' for gksu
-
-2003-01-29 Gustavo Noronha Silva <kov at debian.org>
-
- * man/gksu.1:
- - added reference for gksuexec command
- - updated with the help of the 'help2man' command
-
- * man/gksuexec.1: (new)
- - wrote manpage to the new command
-
- * man/Makefile.am: (new)
- - install manpages
-
- * src/gksu.c:
- - fixed small and harmless segfault when free'ing
- conf.title
- - accept -i, --icon to set window's icon
- - print-pass' message no longer assumes root user
-
- * src/gui.c:
- - use gksu's icon at the window, instead of the
- question mark
- - use conf.icon to set gksu window's icon
-
-2003-01-29 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.9.0
-
- * src/gksuexec.c:
- - a new program, a dialog to ask for other informations
- as a wrapper to gksu's command line
-
- * src/util.{c,h}, src/gui.{c,h}:
- - moved gk_dialog from gui to util to make it easier
- for gksuexec to use it
-
- * gksuexec.desktop:
- - new icon for GNOME, to run gksuexec
-
-2003-01-28 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.8.5
-
- * src/su.c:
- - does not ask for password when the real uid
- is 0 (see http://bugs.debian.org/178675)
-
- * src/gksu.c:
- - minor aesthetical fixes
-
-2003-01-22 Gustavo Noronha Silva <kov at debian.org>
-
- * Release 0.8.4
-
-2003-01-14 Gustavo Noronha Silva <kov at debian.org>
-
- * src/Makefile.am:
- - define DATA_DIR
- - add optimization on compilation
-
- * src/gui.c:
- - set default windows icon (requires Gtk+2.2)
-
- * gksu.png:
- - new icon, from art.gnome.org, Authorization.png
-
- * gksu.png -> gksu-terminal.png:
- - renamed icon for gnome's desktop icon
-
-2003-01-14 Gustavo Noronha Silva <kov at debian.org>
-
- * 0.8.3 Release
-
- * clean up to the build system, using autoconf
- 2.50 and automake-1.6
-
- * man/gksu.1:
- - fixed WHATIS entry
-
- * gksu.desktop, gksu.png:
- - icon for GNOME's System menu, to open a terminal
- as the root user
-
-2003-01-14 Gustavo Noronha Silva <kov at debian.org>
-
- * 0.8.2 Release
- - changed configure.in
-
- * src/gksu.c:
- - make reset environment the default, changed:
- reset-env, r to preserv-env, k
- - make not login shell the default, again, it
- will make the Xauth stuff break... duh
-
- * src/su.c, src/sudo.c:
- - yes, yes, auto-background again =P
-
- * src/gui.c:
- - cleans the Xauth directory in case the dialog is
- canceled or closed
- - changed buttons' positions to reflect the changes
- that happened to GNOME2
-
- * src/gksu.c:
- - made title more i18n friendly, fixed some small
- memory leaks
-
- * po/pt_BR.po:
- - updated translation
-
-2003-01-12 Gustavo Noronha Silva <kov at debian.org>
-
- * src/gksu.c:
- - make login shell by default
-
- * src/su.c, src/sudo.c:
- - no grandchild, no auto-background anymore
- - fixes on outputing things
-
-2002-08-13 gettextize <bug-gnu-gettext at gnu.org>
-
- * Makefile.am (SUBDIRS): Add m4.
- (SUBDIRS): Remove intl.
- (ACLOCAL_AMFLAGS): New variable.
- (EXTRA_DIST): New variable.
-
- * configure.in (AC_OUTPUT): Add m4/Makefile.
-
-2002-02-18 Gustavo Noronha Silva <kov at debian.org>
-
- * gksu: initial version.
-
Copied: gksu/tags/2.0.2/ChangeLog (from rev 852, gksu/trunk/ChangeLog)
===================================================================
--- gksu/tags/2.0.2/ChangeLog (rev 0)
+++ gksu/tags/2.0.2/ChangeLog 2009-03-04 19:25:21 UTC (rev 853)
@@ -0,0 +1,1333 @@
+2009-03-04 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 2.0.2
+
+ * gksu/gksu.c: - revert last change, since it was completely bogus,
+ and any environment change should be up to libgksu, anyway
+
+2009-02-22 Gustavo Noronha Silva <kov at alface>
+
+ * Release 2.0.1
+
+2009-02-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c: - sanitize environment before running applications
+ using su mode
+
+2009-02-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac, nautilus-gksu/libnautilus-gksu.c: - port to GIO,
+ and newer nautilus
+
+2009-02-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac, gksu/gksu.c:
+ - accepted patch by Joshua Kwan <jkwan at vmware.com> to
+ make gksu return the same status code as the child
+
+2009-02-03 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added th to ALL_LINGUAS
+
+2008-11-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * nautilus-gksu/libnautilus-gksu.c:
+ - accepted patch by Josselin Mouette to fix a crash
+
+2007-05-11 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added gl to ALL_LINGUAS
+
+ * configure.ac:
+ - added zh_CN to ALL_LINGUAS
+
+2007-03-25 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added ar to ALL_LINGUAS
+
+2007-03-04 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - accepted patch by Michael Vogt to correctly quote
+ strings which have \ or ', when in sudo mode
+
+2007-02-04 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added ja to ALL_LINGUAS
+
+2006-09-23 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 2.0.0
+
+2006-09-03 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - typo fix; thanks to Chris Moore <dooglus at gmail.com>
+
+2006-08-19 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added lt to ALL_LINGUAS
+
+ * gksu-migrate-conf.sh:
+ - patch by Christian Hamar to fix non-POSIX compliant usage of
+ head (Savannah bugs #16530 and 16807)
+
+ * Release 1.9.4
+
+ * man/man.1:
+ - enhanced the description, wrote about the missing options and
+ added information about the new usage mode (with no command
+ specified); this also addresses the concerns of Debian bug
+ #383477
+
+2006-08-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - imported gksuexec code into the gksu application; now if you call
+ gksu with no commands, it will open the gksuexec UI to request
+ for a command, user and other options;
+
+2006-08-09 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added sv to ALL_LINGUAS
+
+ * nautilus-gksu/libnautilus-gksu.c:
+ - implemented error checking for the code that finds out
+ what program to run for the file; that should address the
+ segfault related in the Debian BTS:
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380407
+ - do not show the menu item for items using the x-nautilus-desktop
+ uri scheme; finishes the solution of the bug mentioned above
+
+2006-08-06 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - applied patch by Josselin Mouette to correctly include the
+ locale.h file
+
+ * Release 1.9.3
+
+ * gksu/gksu.c:
+ - remove all the startup notification-related code, which
+ is now done by the library;
+
+ * nautilus-gksu/libnautilus-gksu.c:
+ - only display the menu item if we're not already
+ root
+
+2006-07-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c, man/gksu.1:
+ - typo fix (descriptional -> descriptive), thanks to
+ A Costa <agcosta at gis.net>; addresses Debian bug
+ #379186
+
+2006-07-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.9.2
+
+2006-07-10 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - re-ask password 2 times when the first attempt gives us a
+ wrong password; use the new libgksu API to display an alert
+ warning about the wrong password
+
+2006-07-10 Gustavo Noronha Silva <gustavo.noronha at mds.gov.br>
+
+ * nautilus-gksu/libnautilus-gksu.c:
+ - handle .desktop files, as well, by reading their Exec key
+ - do not avoid handling nautilus folders
+
+2006-07-09 Gustavo Noronha Silva <kov at debian.org>
+
+ * nautilus-gksu:
+ - wrote an initial nautilus module to provide a 'open as administrator'
+ menu item for stuff in nautilus
+
+2006-07-03 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - do not display error message when the error code tells us
+ that the dialog has been canceled by the user
+
+ * gksu/gksu.c:
+ - retry password prompt 3 times; still need a better way to
+ handle showing a message to the user
+
+2006-05-01 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.9.1
+
+ * gksu/gksu.c:
+ - fix typo in help message
+
+ * configure.ac:
+ - updated version to 1.9.1 and require libgksu
+ >= 1.9.2 because of the new APIs and stuff
+
+2006-04-30 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - updated using help2man
+
+ * TODO:
+ - removed;
+
+ * README:
+ - updated about the gconf issues
+
+ * gksu/gksu.c:
+ - reimplemented the --desktop functionality by using
+ the new set_description API
+ - reimplemented the --print-pass functionality by
+ using the new ask_password API;
+
+2006-04-25 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - incorporated Startup Notification patch by Michael Vogt
+
+ * gksu/gksu.c:
+ - removed the desktop file option; will be replaced by an
+ option to tell gksu a 'user-friendly' name for the
+ action that is being taken
+
+2006-04-24 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - provide a clear way of forcing sudo and su modes, and
+ fall back to the default, using the new gksu_run_full,
+ if none is given
+
+ * gksu/gksu.c:
+ - ignore -i and -t, reimplemented -m using functionality
+ that has just been added to libgksu2
+
+ * Release 1.9.0
+
+2006-04-23 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - removed all code related to gnome-keyring and gconf,
+ which is now on libgksu
+
+ * gksu/gksuexec.c, gksu/util.{c,h}:
+ - removed; code moved to gksu or simply not so useful and
+ unmaintained
+
+2006-04-03 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - fixed typo, patch by Nicolas François
+ <nicolas.francois at centraliens.net>
+
+2006-03-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu-migrate-conf.sh:
+ - remove bash3.0isms, enhance the code that gets the values
+ from the config file to be more robust and work on more
+ possibilities
+
+2006-03-28 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - applied (modified) patch by Gabor Kelemen <kelemeng at gnome.hu>
+ to make the help string a better citizen
+
+2006-01-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac, gksu/gksu.c:
+ - disabled code that will be moved to the libgksu
+ package and started the port to libgksu2
+
+ * gksu/gksu.c:
+ - removed code moved to libgksu, started porting to
+ libgksu2, misc fixes and cleanup, removed trailing
+ whitespaces
+
+2006-01-07 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added it to ALL_LINGUAS
+
+2005-11-23 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu{,exec}.desktop.in:
+ - modified based on a patch by Thierry Moisan
+ <thierryn at videotron.ca> to be compliant with the desktop
+ spec (passes desktop-file-validate); thanks to
+ Michael Vogt for forwarding the patch
+
+2005-10-26 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.3.6
+
+ * gksu/gksu.c:
+ - make sure the no-pass window will go away before proceeding
+ with calling the program, so we won't have a dead window
+ on screen
+
+ * gksu/gksu.c:
+ - more logic problem fixes, this time with the
+ display-no-pass-info gconf key - the meaning of the
+ gconf key bool value and the check button bool value
+ are inverted, so we need to special case it
+
+ * gksu/gksu.c:
+ - only try_gnome_keyring if gksu_context_try_need_password
+ returns TRUE
+
+2005-10-19 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - added fade in effect when screen was faded out
+
+ * gksu/gksuexec.c:
+ - applied patch from dennis at kaarsemaker.net, grabbed from
+ Ubuntu's bugzilla to use GKSU_CMD be used on the error
+ reporting instead of using PREFIX, etc.
+
+2005-09-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.3.5
+
+2005-09-20 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - applied patch by Michael Vogt with some modifications
+ to avoid dead-locking X when gksu tries to grab mouse
+ or keyboard while a menu is open or something else is
+ stealing focus (Debian #310951, Ubuntu #14430)
+
+ * gksu/gksu.c:
+ - do not show the gnome-keyring UI if -a was passed as
+ an option
+
+2005-09-16 Guilherme de S. Pastore <guilherme.pastore at terra.com.br>
+
+ * man/gksu.1:
+ - removed section about the configuration file
+
+ * README:
+ - tiny rewording (versions are not smaller, they're lower)
+
+2005-09-13 Guilherme de S. Pastore <guilherme.pastore at terra.com.br>
+
+ * gksu/gksuexec.c:
+ - spit out an error message if no command is given
+
+ * gksu/gksuexec.c:
+ - switch from the deprecated GtkCombo to GtkComboBox
+ - remove check for empty user; GtkComboBox won't allow this
+ - drop get_user_list() and use fill_with_user_list() instead,
+ for appending to the ComboBox rather than returning a list
+ (also drop free_user_list(), consequently)
+
+ * gksu/gksuexec.c:
+ - destroy the dialog when we no longer need it
+
+
+2005-09-13 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c, man/gksu.1:
+ - add a --desktop option so that gksu is now able to
+ read some of the information it uses to fill the dialog
+ from a desktop file
+
+2005-09-12 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - add another hack for the -- symbol to work correctly so
+ you can call "gksu -- commands and its arguments"
+
+2005-09-10 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - change the UI to make it clear that the first choice
+ to be made is whether to record the password and the
+ second one is in which keyring (default or session)
+ when using the GNOME keyring.
+
+2005-08-20 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/{gksu,util}.c:
+ - make error reporting more aestheticaly pleasant
+
+ * Release 1.3.4
+
+2005-08-18 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu/gksu.c: check if pwentry is not NULL before accessing
+ one of the structure members, so we don't segfault when the
+ given user does not exist (Debian bug #323836)
+
+2005-08-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * README:
+ - clarify the migration script location
+
+2005-08-16 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - fix logic problem with disable-grab setting
+
+2005-08-10 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.3.3
+
+ * gksu-migrate-conf.sh:
+ - fix logic problem with a misplaced else
+
+2005-08-09 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c, gksu/gksu.schemas.in:
+ - correct the schema to have save-keyring be string; check
+ if gconf_client_get_string returns something valid in that
+ case, anyway
+
+2005-08-07 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.3.2
+
+ * relibtoolize with libtool 1.5.6 (1.1220.2.95 2004/04/11
+ 05:50:42) Debian: 224 $
+
+ * configure.ac:
+ - bumped version to 1.3.2
+ - depend on libgksu1.2 >= 1.3.3 because of the new APIs we
+ use
+
+2005-08-07 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu.desktop.in, gksuexec.desktop.in:
+ - no longer have the whole paths to the icons hardcoded
+
+2005-08-06 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - set the keyring check buttons to be checked depending
+ on how the corresponding gconf keys are set
+
+ * gksu/gksu.c:
+ - apparently show_all on the dialog instead of several
+ show's for widgets added to the dialog caused problems
+ with the grabbing, so do the later
+
+ * gksu/gksu.c:
+ - check boxes and gconf keys for the user to be able to setup
+ what to do about gnome-keyring in the gksu window
+
+2005-08-06 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu/gksuexec.c:
+ - removed unnecessary call to gtk_set_locale()
+
+2005-08-06 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - use one, global, GConfClient instead of creating and
+ unrefing many
+
+ * gksu/gksu.c:
+ - relocate the detection of sudo mode based on argv[0] so that
+ it will actually have an effect
+
+ * gksu/gksu.c:
+ - cast dialog correctly avoiding warnings on the build
+
+ * gksu/gksu.c, gksu/gksu.schemas.in:
+ - added a new gconf key that determines whether the warning
+ about the program running without the password being asked
+ will be shown
+
+2005-08-06 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu/gksu.c:
+ - changed the message of the warning shown when no password
+ was requested to run the program
+
+ * gksu/gksu.c:
+ - improved the description of the --always-ask-password
+ switch
+
+ * gksu/gksu.c:
+ - fixed some spelling mistakes
+
+ * gksu/gksu.schemas.in:
+ - fixed some spelling mistakes
+
+2005-08-05 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu-migrate-conf.sh:
+ - adding script written by Guilherme de S. Pastore to migrate
+ the configuration done in /etc/gksu.conf to the new gconf-based
+ system
+
+2005-08-04 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - use the new run_full functions for both su and sudo backends
+ and display a notice if a password is not requested
+
+2005-08-02 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c, gksu/gksu.schemas.in, gksu/Makefil.am, configure.ac,
+ po/POTFILES.in:
+ - replace the gksu config file with a gconf-based configuration
+ system
+
+2005-08-01 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - added support for gnome-keyring, coming from libgksu
+ patch originally done by Szilard Novaki and slightly
+ modified by me
+
+2005-08-01 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu/gksuexec.c: sort user list by username instead of
+ by uid, partially addressing Debian bug #315635
+
+2005-07-20 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - applied patch grabed from ubuntu to keep the
+ window above, which addresses window managers
+ hiding the window behind other windows, and to
+ avoid the 'mouse cursor looks funny' symptom
+
+2005-07-16 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - require libgksu1.2 1.3.2 and libgksuui1.0 1.0.6
+
+2005-07-15 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu{,exec}.desktop.in:
+ - add Encoding: UTF-8 field which is required by the Desktop
+ spec
+
+ * Release 1.3.1
+
+ * gksu/gksu.c:
+ - put the callback function that asks for the password
+ outside of the main function because that would cause
+ problems in arches in which you cannot execute the stack
+
+2005-07-12 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - use the new gksu_context_ask_and_run and
+ gksuui_dialog_set_prompt APIs to work better
+ with stuff like pam-modified prompts and
+ 'you don't need a password' cases
+
+2005-06-21 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added xh to ALL_LINGUAS
+
+2005-06-18 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac, Makefile.ac, intltool-{extract,merge,update}.in:
+ - adding support for intltool, basically so that .desktop
+ files are localized
+
+ * Release 1.3.0
+
+ * configure.ac:
+ - depend on libgksu 1.3.1 because we are using newer
+ APIs
+
+2005-06-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - use the new gksu_context_sudo_try_need_password to check
+ if we need a password for sudo, addressing Debian bug
+ #312937
+ - we should only return 3 if an error happens when running with
+ sudo
+
+2005-06-16 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu/gksu.c:
+ - added --always-ask-password (-a) command-line option
+ and always-ask-password key to gksu.conf, that makes
+ gksu *not* try to run the command without asking for
+ a password.
+
+2005-06-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added ro to ALL_LINGUAS
+
+2005-06-13 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2.6
+
+ * gksu/gksu.c:
+ - use gksu_context_try_need_pass to check if we really
+ need to ask for the password before doing so
+ - rephrase the default sentence for asking password so
+ it has better usability, based on suggestions by
+ Matthew Thomas, see the ubuntu bug report:
+ https://bugzilla.ubuntu.com/show_bug.cgi?id=7385
+
+ * configure.ac, gksu/Makefile.am:
+ - use PKG_CHECK_MODULES to check for GTK+ >= 2.4
+ and libgksu1.2 >= 1.3.0 because we'll be using
+ the new API function gksu_context_try_need_pass
+
+2005-05-13 Miroslav Kure <kurem at debian.cz>
+
+ * configure.ac:
+ - added cs to ALL_LINGUAS
+
+2005-05-12 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - correctly set grab to FALSE if the user clicks 'No' when
+ --prompt is passed
+
+ * configure.ac:
+ - added pl to ALL_LINGUAS
+
+2005-04-27 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added hu to ALL_LINGUAS
+
+2005-04-25 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - renamed no_NB on ALL_LINGUAS to nb
+
+2005-04-19 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added nl to ALL_LINGUAS
+
+2005-04-05 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2.5
+
+2005-03-30 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added fr to ALL_LINGUAS
+
+2005-03-28 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - small patch from Michael Vogt <mvo at debian.org>
+ to clean up correctly on NFS-mounted home directories
+
+2005-03-13 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - applied patch to fix formatting problem on the
+ manpage, thanks to Loïc Minier <lool at dooz.org>
+
+2005-03-01 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2.4
+
+ * gksu/gksu.c:
+ - no longer grab Xserver, simply grabing keyboard and
+ mouse should be enough and less problematic in some
+ cases; accepting suggestion by Edward Liu
+ <dhliu at springsoft.com.tw>
+
+ * gksu/gksu.c:
+ - reverted old locking solution and apply patch from
+ Michael Vogt <mvogt at acm.org> that implements a more
+ robust strategy.
+
+2005-02-21 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - added a bit more information for sudo functionality
+
+ * configure.ac:
+ - added sk to ALL_LINGUAS
+
+2005-02-07 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - use a normal window when not grabbing and a popup window
+ when grabbing
+
+ * gksu/gksu.c:
+ - undo the fadeout on ungrabing
+
+ * gksu/gksu.c, gksu/gksu.conf:
+ - prompt now work when disable-grab is enabled, and prompt
+ and sudo-mode behave like they should
+ - configuration file documents that prompt will only work
+ if force-grab is disabled
+ - Thanks for Juergen Kreileder <jk at blackdown.de> for reporting
+ these, and providing a patch - this addresses Debian bug
+ #293236
+
+ * gksu/gksu.c:
+ - use a simple lock file to avoid duplicate gksu's running
+ at the same time, to avoid drawing problems - finishes
+ addressing Debian bug #293214
+
+ * gksu/gksu.c:
+ - fade out the window when grabing, so that the user
+ understands more clearly that only gksu's window is
+ usable - addresses some of Debian bug #293214
+
+2005-01-30 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2.3
+
+2005-01-30 Guilherme de S. Pastore <gpastore at colband.com.br>
+
+ * gksu/gksu.c (help string only):
+ - Fixed the prompt string gramatically
+ - Update with newest command-line options
+ - Add punctuation to all sentences for consistency
+ - Cut out the third person 's' from the end of the
+ verbs for consistency
+
+2005-01-25 Gustavo Noronha Silva <kov at debian.org>
+
+ [ gksu-1.2.2.pre1.2.3.1 ]
+
+ * gksu/Makefile.am, gksu/gksu.conf:
+ - install a default gksu.conf file in /etc (hardcoded
+ for now)
+
+ * gksu/gksu.c:
+ - some more error checking
+ - check that the file /etc/gksu.conf is owned by root:root and
+ has mode 0644.
+
+2005-01-18 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - added --prompt, -P, which will show a window asking
+ if the user wishes the screen to be grabed, also added
+ to /etc/gksu.conf parsing
+ - made -P, -g and -S accept optional arguments so you
+ can turn then on or off regardless of the default set
+ on /etc/gksu.conf
+ - added force-grab option to /etc/gksu.conf, to force
+ grabing whatever the user chooses
+
+2005-01-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - added support for a /etc/gksu.conf file, which will make some
+ of the options available for default setting by the admin -
+ still needs some polishing, it is trying to address several
+ Debian bugs. See http://bugs.debian.org/271567 for the
+ discussion.
+
+ * man/gksu.1:
+ - updated to document the change to return codes for
+ gksu
+
+ * gksu/gksu.c:
+ - accepted patch by Michael Vogt <mvogt at acm.org>
+ to return different error codes when different
+ "problems" happen; this fixes Debian bug #266832
+
+2004-12-08 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added pt to ALL_LINGUAS
+
+2004-10-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2.2
+
+ * gksu/gksuexec.c:
+ - set user list combo to be uneditable (the value has got to
+ be on the list); this fixes Debian bug #276535
+
+ * gksu/gksu.c, man/gksu.1:
+ - fixed typo passowrd -> password; this fixes Debian bug
+ #262561
+
+ * gksu/gksu.c:
+ - runs the command immediately if we're already the target
+ user; this fixes Debian bug #276432
+ - convert password to system locale before using it;
+ this fixes Debian bug #276089
+ - marked string for translation which was missing
+ the mark
+
+2004-10-13 Gustavo Noronha Silva <kov at alface.horta>
+
+ * configure.ac:
+ - added no_NB to ALL_LINGUAS
+
+2004-09-21 Gustavo Noronha Silva <kov at alface.horta>
+
+ * gksu/gksu.c:
+ - quotes strings properly and accepts -- now, working-around
+ gtk_init removing the -- added by the user
+
+2004-09-07 Gustavo Noronha Silva <kov at alface.horta>
+
+ * man/gksu.1:
+ - mentions gksudo again, but not yet ready
+
+2004-08-07 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2.1
+
+ * gksu/gksuexec.c:
+ - really updated all the references to the gksu icon
+ for the window
+
+ * configure.ac:
+ - added ca to ALL_LINGUAS
+
+2004-07-13 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - reimplemented X keyboard and mouse grabing
+ copying code from libgksuui (Debian Bug #254949)
+
+ * gksu/gksuexec.c:
+ - updated the icon location for gksuexec's window
+
+2004-06-09 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu.desktop, gksuexec.desktop:
+ - updated german translation, thanks to
+ Sebastian Heinlein <sebastian.heinlein at web.de>
+
+2004-06-08 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu.desktop, gksuexec.desktop:
+ - Removed the '(GkSU)' string from the gksu and gksuexec
+ menu entries (Debian Bug #252334)
+ - convert both files to UTF-8
+ - fix icon locations for the desktop menu entries
+ (Debian Bug #252576)
+
+2004-05-30 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.2
+
+2004-05-06 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1, gksu/gksu.c, gksu/gksuexec.c:
+ - rename all 'preserv's to 'preserve' (--preserv-env'
+ is now deprecated)
+
+2004-03-25 Gustavo Noronha Silva <kov at debian.org>
+
+ * Makefile.am, gksu-terminal.png, gksu.png:
+ - renaming icons installed by the gksu application
+ so that they won't conflict with previous
+ versions of libgksu
+
+2004-03-21 Gustavo Noronha Silva <kov at debian.org>
+
+ * Repackaging and splitting off of the
+ gksu package from the libraries.
+
+2004-03-21 gettextize <bug-gnu-gettext at gnu.org>
+
+ * configure.ac (AC_CONFIG_FILES): Add intl/Makefile.
+
+2004-03-21 gettextize <bug-gnu-gettext at gnu.org>
+
+ * Makefile.am (SUBDIRS): Remove intl.
+ (EXTRA_DIST): New variable.
+ * configure.ac (AC_CONFIG_FILES): Add m4/Makefile.
+ (AM_GNU_GETTEXT_VERSION): Bump to 0.14.1.
+
+2004-02-03 Gustavo Noronha Silva <kov at debian.org> [1.1.1]
+
+ * configure.ac:
+ - polished a bit
+
+ * libgksu/gksu-private.c:
+ - fixed wrong error checking (duh)
+
+ * libgksu/gksu-context.[ch]:
+ - new implementation of GksuContext, based on
+ the GObject glib facility
+
+ * libgksu/libgksu.c, gksu/gksu.c:
+ - port to the new GObject-based GksuContext
+
+2004-02-02 Gustavo Noronha Silva <kov at debian.org>
+
+ * libgksu/gksu-private.c, libgksu-gksu-private.h:
+ - added a gksu_init_check function to init
+ gtk
+
+ * libgksu/libgksu.c, libgksu/gksu.h:
+ - added printf-like format support for title and
+ message setters
+ - call gksu_init_check on all the three main functions
+ to make sure gtk will be inited
+
+2004-01-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c:
+ - ported to the new API
+
+ * libgksu/libgksu.c, libgksu/gksu-private.c:
+ - more well-defined separation between exported
+ and not export symbols (now even using the
+ visibility __attribute__)
+ - new API, based on contexts, preparation for
+ 1.2
+
+ * gksu/gksuexec.c:
+ - accepted patch from Jorgen Viksell <jorgen.viksell at telia.com>
+ to have gksuexec show a combo listing all the users on the
+ system, thanks!
+
+2004-01-20 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.0.3
+
+ * libgksu/libgksu.c:
+ - fixed _gksu_conf->dir allocation for gksu_sudo_run
+ to work
+
+ * libgksu/libgksu.c:
+ - added aditional error checking code to the xauth
+ exec to avoid a segfault when it returns nothing
+ patch by Doug Holland <meldroc at frii.com>
+
+2004-01-18 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu/gksu.c, Makefile.am:
+ - added support to sudo, when called as 'gksudo'
+ - create the symlink on install
+
+2004-01-17 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.0.2
+
+2004-01-16 Gustavo Noronha Silva <kov at debian.org>
+
+ * libgksu/libgksu.c, libgksu/gksu.h:
+ - improved error checking
+ - improved error reporting on sudo related stuff
+ - added gksu_sudo_run, with sudo support
+
+ * remove the common directory and library, integrate
+ the relevant parts into libgksu and gksu separately
+
+ * libgksu/libgksu.c, common/gksutils.c:
+ - incorporated code from gnome-sudo with some
+ modifications to have gksu handle sudo, too
+ untested, probably unstable code, needs testing
+ to be exposed
+
+ * libgksu/Makefile.am:
+ - build the library with -fPIC, to allow prelinking
+
+ * configure.ac:
+ - added da to ALL_LINGUAS
+
+2004-01-15 Gustavo Noronha Silva <kov at debian.org>
+
+ * libgksu/libgksu.c:
+ - Fixed problems with gksu closing the application
+ when canceled
+ - gtk_init_check instead of gtk_init, to avoid failures
+ killing the "parent" application
+
+2004-01-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.0.1
+
+ * Major update on the documentation stuff
+
+ * Small corrections to the locale handling code
+
+2003-12-19 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 1.0.0
+
+ * introducing libgksu! I believe the code is stable
+ enough for a 1.0 release -- althought the change to
+ a library might be a big move, the code has not
+ being changed a lot... let's see if the Debian
+ unstable trial proves me wrong.
+
+2003-11-18 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.18
+
+ * src/gui.c:
+ - does not quit when grab fails, warns and continues...
+
+ * po/de.po:
+ - small fix, thanks to Michael Vogt <mvogt at acm.org>
+
+ * src/gksu-run-helper.c:
+ - fix bashism
+
+2003-11-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.17
+
+ * autogen.sh:
+ - use automake 1.7, instead of 1.6
+
+ * configure.ac, po/pl.po:
+ - added polish translation, thanks to Emil <emil5 at go2.pl>
+
+ * src/gksu-run-helper.c:
+ - added, to help fix the stupid security bug
+
+ * src/gksu.{c,h}, src/su.c, src/xauth.c:
+ - modified to use the gksu-run-helper, which will
+ fix the security bug in which the Xauth token
+ appears on a ps auxwww
+
+2003-08-28 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.16
+
+2003-08-26 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/xauth.c:
+ - take care to take the MIT-MAGIC-COOKIE-1 from
+ xauth list, XDM auth strings were biting gksu
+
+2003-08-08 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.15
+
+2003-08-06 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac:
+ - added 'de' (German) to ALL_LINGUAS
+
+ * gksu.desktop, gksuexec.desktop:
+ - added German translation, thanks to:
+ Sebastian Heinlein <sebastian.heinlein at campus.lmu.de>
+
+2003-07-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.14
+
+ * src/su.c:
+ - shows a nicer dialog with 'Wrong password.'
+ instead of simply 'Child exited with error
+ 1' thingy if su returns 'Authentication failure'
+
+ * src/su.c:
+ - use >& to redirect instead of 2>&1 to make
+ non-bash shells happy (Closes: #203386,
+ #203387)
+
+2003-07-24 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.13
+
+ * README:
+ - some explanations added
+
+ * src/gui.c, src/su.c:
+ - some modifications on the default label that's
+ presented explaining why it wants the password,
+ and in the label behavior, in general
+
+ * src/gksu.c, src/xauth.c:
+ - added --ssh-fwd option, which uses just the :x.x
+ part of display when working with xauth, for gksu
+ to work on ssh X11 forwarding
+ (Closes Debian bug: #202532)
+
+2003-07-23 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.12
+
+2003-07-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/xauth.c:
+ - added output about xauth token, file, directory and
+ display, for debuging purposes (when --debug is enabled)
+ - fixed clean_dir to remove the directory if it is empty
+ before clean_dir is called
+
+ * src/su.c:
+ - do not show xauth's output, unless --debug is given
+ - get rid of bashism when calling xauth by using the
+ env command
+
+ * src/gksu.c:
+ - added a --debug option, to ask for more verbose
+ output
+
+2003-07-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - fixed --icon position
+
+2003-06-14 gettextize <bug-gnu-gettext at gnu.org>
+
+ * Makefile.am (ACLOCAL_AMFLAGS): New variable.
+ * configure.ac (AC_CONFIG_FILES): Add m4/Makefile.
+ (AM_GNU_GETTEXT_VERSION): Bump to 0.12.1.
+
+2003-06-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.11
+
+ * Applied patch from Ãlvaro Peña <apg at esware.com>
+ to HIG-ify gksu a bit more
+
+2003-05-24 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.10
+
+ * src/su.c:
+ - Why the hell do I want gksu to automaticaly go to
+ background? Changed that, I guess that'll help
+ lots of scripts.
+
+2003-05-10 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.9
+
+ * src/gksuexec.c:
+ - fixed the way the command is passed as argument
+ to gksu to fix running programs with arguments (duh)
+
+2003-05-08 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/su.c:
+ - fixed bug which did not allow gksu to run programs
+ with arguments like, say, 'emacs /etc/mozpluggerrc' =)
+
+2003-05-06 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac: added es.po to ALL_LINGUAS
+
+2003-05-02 Gustavo Noronha Silva <kov at debian.org>
+
+ * configure.ac: added ru.po to ALL_LINGUAS
+
+2003-04-05 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.8
+
+ * src/xauth.c:
+ - initialize 'xauth' to avoid problems with junk
+ thanks to Alex Stewart <am2stewa at uwaterloo.ca>
+
+ * src/gui.c:
+ - wait a bit longer before checking for the effectiveness of
+ the keyboard/mouse grab
+
+2003-03-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.7
+
+ * src/gksu.c, src/xauth.c:
+ - remove references to sudo, at least for now
+
+ * src/sudo.{c,h}:
+ - removed, no longer provide sudo functionality, it
+ doesn't work as well as it should
+
+2003-03-28 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/su.c:
+ - use xauth information to make the magic work
+
+ * src/xauth.c:
+ - implement prepare_xauth_su to handle Xauth in a safer way,
+ by using the 'xauth' program instead of a world readable
+ .Xauthorization file
+ - move the old way of doing things to the prepare_xauth_sudo
+ function... sudo is a difficult piece of software to handle
+
+ * src/gksu.c:
+ - moved as much xauth specific stuff as I could to xauth.c
+
+2003-02-01 Allan Douglas <allan_douglas at gmx.net>
+
+ * src/sudo.c:
+ - cleanups
+
+2003-01-31 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.1
+
+ * AUTHORS:
+ - added Allan Douglas
+
+2003-01-31 Allan Douglas <allan_douglas at gmx.net>
+
+ * src/su.c:
+ - fixed the "missing output" bug
+
+2003-01-30 Allan Douglas <allan_douglas at gmx.net>
+
+ * configure.ac:
+ - removed yacc dependency
+
+ * src/su.c:
+ - cleanups
+
+2003-01-30 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/su.c, src/sudo.c:
+ - fixed some stuff pointed by my friend "o_0" =P
+
+ * src/gksuexec.c:
+ - has an 'advanced' dialog to select options
+ 'login_shell' and '--preserv-env' for gksu
+
+2003-01-30 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/gksuexec.c:
+ - has an 'advanced' dialog to select options
+ 'login_shell' and '--preserv-env' for gksu
+
+2003-01-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * man/gksu.1:
+ - added reference for gksuexec command
+ - updated with the help of the 'help2man' command
+
+ * man/gksuexec.1: (new)
+ - wrote manpage to the new command
+
+ * man/Makefile.am: (new)
+ - install manpages
+
+ * src/gksu.c:
+ - fixed small and harmless segfault when free'ing
+ conf.title
+ - accept -i, --icon to set window's icon
+ - print-pass' message no longer assumes root user
+
+ * src/gui.c:
+ - use gksu's icon at the window, instead of the
+ question mark
+ - use conf.icon to set gksu window's icon
+
+2003-01-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.9.0
+
+ * src/gksuexec.c:
+ - a new program, a dialog to ask for other informations
+ as a wrapper to gksu's command line
+
+ * src/util.{c,h}, src/gui.{c,h}:
+ - moved gk_dialog from gui to util to make it easier
+ for gksuexec to use it
+
+ * gksuexec.desktop:
+ - new icon for GNOME, to run gksuexec
+
+2003-01-28 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.8.5
+
+ * src/su.c:
+ - does not ask for password when the real uid
+ is 0 (see http://bugs.debian.org/178675)
+
+ * src/gksu.c:
+ - minor aesthetical fixes
+
+2003-01-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * Release 0.8.4
+
+2003-01-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/Makefile.am:
+ - define DATA_DIR
+ - add optimization on compilation
+
+ * src/gui.c:
+ - set default windows icon (requires Gtk+2.2)
+
+ * gksu.png:
+ - new icon, from art.gnome.org, Authorization.png
+
+ * gksu.png -> gksu-terminal.png:
+ - renamed icon for gnome's desktop icon
+
+2003-01-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * 0.8.3 Release
+
+ * clean up to the build system, using autoconf
+ 2.50 and automake-1.6
+
+ * man/gksu.1:
+ - fixed WHATIS entry
+
+ * gksu.desktop, gksu.png:
+ - icon for GNOME's System menu, to open a terminal
+ as the root user
+
+2003-01-14 Gustavo Noronha Silva <kov at debian.org>
+
+ * 0.8.2 Release
+ - changed configure.in
+
+ * src/gksu.c:
+ - make reset environment the default, changed:
+ reset-env, r to preserv-env, k
+ - make not login shell the default, again, it
+ will make the Xauth stuff break... duh
+
+ * src/su.c, src/sudo.c:
+ - yes, yes, auto-background again =P
+
+ * src/gui.c:
+ - cleans the Xauth directory in case the dialog is
+ canceled or closed
+ - changed buttons' positions to reflect the changes
+ that happened to GNOME2
+
+ * src/gksu.c:
+ - made title more i18n friendly, fixed some small
+ memory leaks
+
+ * po/pt_BR.po:
+ - updated translation
+
+2003-01-12 Gustavo Noronha Silva <kov at debian.org>
+
+ * src/gksu.c:
+ - make login shell by default
+
+ * src/su.c, src/sudo.c:
+ - no grandchild, no auto-background anymore
+ - fixes on outputing things
+
+2002-08-13 gettextize <bug-gnu-gettext at gnu.org>
+
+ * Makefile.am (SUBDIRS): Add m4.
+ (SUBDIRS): Remove intl.
+ (ACLOCAL_AMFLAGS): New variable.
+ (EXTRA_DIST): New variable.
+
+ * configure.in (AC_OUTPUT): Add m4/Makefile.
+
+2002-02-18 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu: initial version.
+
Deleted: gksu/tags/2.0.2/configure.ac
===================================================================
--- gksu/trunk/configure.ac 2009-02-23 02:20:27 UTC (rev 840)
+++ gksu/tags/2.0.2/configure.ac 2009-03-04 19:25:21 UTC (rev 853)
@@ -1,79 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.57)
-
-AC_INIT(gksu, 2.0.1, kov at debian.org)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
-AC_CONFIG_SRCDIR(gksu/gksu.c)
-AM_CONFIG_HEADER(config.h)
-
-AM_MAINTAINER_MODE
-
-AC_DEFINE(PACKAGE, AC_PACKAGE_NAME, [package name])
-AC_DEFINE(VERSION, AC_PACKAGE_VERSION, [package version])
-AC_DEFINE([GETTEXT_PACKAGE], ["gksu"], [gettext domain])
-GETTEXT_PACKAGE=gksu
-AC_SUBST(GETTEXT_PACKAGE)
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
-ALL_LINGUAS="ar ca cs da de es fr gl hu it ja ko lt pl pt pt_BR ro ru nb nl sk sv xh th zh_CN"
-
-IT_PROG_INTLTOOL
-AM_GLIB_GNU_GETTEXT
-
-##################################################
-# Check for gtk-doc.
-##################################################
-
-AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
-
-if test "x$with_html_dir" = "x" ; then
- HTML_DIR='${datadir}/gtk-doc/html'
-else
- HTML_DIR=$with_html_dir
-fi
-
-AC_SUBST(HTML_DIR)
-
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
-AM_GCONF_SOURCE_2
-
-PKG_CHECK_MODULES(GKSU, [libgksu2 >= 2.0.8, gtk+-2.0 >= 2.4.0])
-
-gtk_doc_min_version=1.0
-AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
-if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
- AC_MSG_RESULT(yes)
- GTKDOC=true
-else
- AC_MSG_RESULT(no)
- GTKDOC=false
-fi
-
-dnl Let people disable the gtk-doc stuff.
-AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=yes]], enable_gtk_doc="$enableval", enable_gtk_doc=yes)
-
-AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
-AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test x$use_libtool = xyes)
-# end of gtk-doc check
-
-AC_ARG_ENABLE(nautilus-extension, [ --enable-nautilus-extension Build the nautilus extensions module [default=yes]], enable_nautilus_extension="$enableval", enable_nautilus_extension=yes)
-AM_CONDITIONAL(ENABLE_NAUTILUS_EXTENSION, test x$enable_nautilus_extension = xyes)
-
-if test x$enable_nautilus_extension = xyes; then
- PKG_CHECK_MODULES(NAUTILUS, [libgksu2 >= 2.0.0, libnautilus-extension])
-fi
-
-AC_CONFIG_FILES([
- Makefile
- po/Makefile.in
- man/Makefile
- gksu/Makefile
- nautilus-gksu/Makefile
- ])
-AC_OUTPUT
Copied: gksu/tags/2.0.2/configure.ac (from rev 852, gksu/trunk/configure.ac)
===================================================================
--- gksu/tags/2.0.2/configure.ac (rev 0)
+++ gksu/tags/2.0.2/configure.ac 2009-03-04 19:25:21 UTC (rev 853)
@@ -0,0 +1,79 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.57)
+
+AC_INIT(gksu, 2.0.2, kov at debian.org)
+AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AC_CONFIG_SRCDIR(gksu/gksu.c)
+AM_CONFIG_HEADER(config.h)
+
+AM_MAINTAINER_MODE
+
+AC_DEFINE(PACKAGE, AC_PACKAGE_NAME, [package name])
+AC_DEFINE(VERSION, AC_PACKAGE_VERSION, [package version])
+AC_DEFINE([GETTEXT_PACKAGE], ["gksu"], [gettext domain])
+GETTEXT_PACKAGE=gksu
+AC_SUBST(GETTEXT_PACKAGE)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+ALL_LINGUAS="ar ca cs da de es fr gl hu it ja ko lt pl pt pt_BR ro ru nb nl sk sv xh th zh_CN"
+
+IT_PROG_INTLTOOL
+AM_GLIB_GNU_GETTEXT
+
+##################################################
+# Check for gtk-doc.
+##################################################
+
+AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
+
+if test "x$with_html_dir" = "x" ; then
+ HTML_DIR='${datadir}/gtk-doc/html'
+else
+ HTML_DIR=$with_html_dir
+fi
+
+AC_SUBST(HTML_DIR)
+
+AC_PATH_PROG(GCONFTOOL, gconftool-2)
+AM_GCONF_SOURCE_2
+
+PKG_CHECK_MODULES(GKSU, [libgksu2 >= 2.0.8, gtk+-2.0 >= 2.4.0])
+
+gtk_doc_min_version=1.0
+AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
+if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
+ AC_MSG_RESULT(yes)
+ GTKDOC=true
+else
+ AC_MSG_RESULT(no)
+ GTKDOC=false
+fi
+
+dnl Let people disable the gtk-doc stuff.
+AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=yes]], enable_gtk_doc="$enableval", enable_gtk_doc=yes)
+
+AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test x$use_libtool = xyes)
+# end of gtk-doc check
+
+AC_ARG_ENABLE(nautilus-extension, [ --enable-nautilus-extension Build the nautilus extensions module [default=yes]], enable_nautilus_extension="$enableval", enable_nautilus_extension=yes)
+AM_CONDITIONAL(ENABLE_NAUTILUS_EXTENSION, test x$enable_nautilus_extension = xyes)
+
+if test x$enable_nautilus_extension = xyes; then
+ PKG_CHECK_MODULES(NAUTILUS, [libgksu2 >= 2.0.0, libnautilus-extension])
+fi
+
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+ man/Makefile
+ gksu/Makefile
+ nautilus-gksu/Makefile
+ ])
+AC_OUTPUT
Deleted: gksu/tags/2.0.2/gksu/gksu.c
===================================================================
--- gksu/trunk/gksu/gksu.c 2009-02-23 02:20:27 UTC (rev 840)
+++ gksu/tags/2.0.2/gksu/gksu.c 2009-03-04 19:25:21 UTC (rev 853)
@@ -1,773 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <pwd.h>
-#include <string.h>
-#include <getopt.h>
-#include <locale.h>
-
-#include <glib.h>
-#include <glib/gstdio.h>
-
-#include <X11/Xlib.h>
-#include <gtk/gtk.h>
-
-#include <libgksu.h>
-
-#include "defines.h"
-#include "../config.h"
-
-#define BASE_PATH "/apps/gksu/"
-
-/* GLOBALS */
-gboolean print_pass = FALSE;
-gboolean force_grab = FALSE;
-gboolean prompt = FALSE;
-enum
- {
- SUDO_MODE,
- SU_MODE,
- DEFAULT_MODE
- };
-
-struct option long_opts[] = {
- /*
- * { name has_arg *flag val }
- */
- {"help", no_argument, NULL, 'h'},
- {"login", no_argument, NULL, 'l'},
- {"preserv-env", no_argument, NULL, 'k'},
- {"preserve-env", no_argument, NULL, 'k'},
- {"user", required_argument, NULL, 'u'},
- {"print-pass", no_argument, NULL, 'p'},
- {"message", required_argument, NULL, 'm'},
- {"title", required_argument, NULL, 't'},
- {"icon", required_argument, NULL, 'i'},
- {"disable-grab", optional_argument, NULL, 'g'},
- {"ssh-fwd", no_argument, NULL, 's'},
- {"debug", no_argument, NULL, 'd'},
- {"sudo-mode", no_argument, NULL, 'S'},
- {"su-mode", no_argument, NULL, 'w'},
- {"prompt", optional_argument, NULL, 'P'},
- {"desktop", required_argument, NULL, 'D'},
- {"description", required_argument, NULL, 'D'},
- {0, 0, 0, 0}
-};
-
-/**
- * help:
- * @cmdname: name of the command which was called by the user
- * (argv[0])
- *
- * This function is a simple 'usage'-style printing function.
- * It is called if the user calls the program with --help or -h
- */
-void
-help (gchar *cmdname)
-{
- gchar *help_trans;
- const gchar* help_text[] = {
- N_("GKsu version %s\n\n"),
- N_("Usage: %s [-u <user>] [options] <command>\n\n"),
- N_(" --debug, -d\n"
- " Print information on the screen that might be\n"
- " useful for diagnosing and/or solving problems.\n"),
- N_("\n"),
- N_(" --user <user>, -u <user>\n"
- " Call <command> as the specified user.\n"),
- N_("\n"),
- N_(" --disable-grab, -g\n"
- " Disable the \"locking\" of the keyboard, mouse,\n"
- " and focus done by the program when asking for\n"
- " password.\n"),
- N_(" --prompt, -P\n"
- " Ask the user if they want to have their keyboard\n"
- " and mouse grabbed before doing so.\n"),
- N_(" --preserve-env, -k\n"
- " Preserve the current environments, does not set $HOME\n"
- " nor $PATH, for example.\n"),
- N_(" --login, -l\n"
- " Make this a login shell. Beware this may cause\n"
- " problems with the Xauthority magic. Run xhost\n"
- " to allow the target user to open windows on your\n"
- " display!\n"),
- N_("\n"),
- N_(" --description <description|file>, -D <description|file>\n"
- " Provide a descriptive name for the command to\n"
- " be used in the default message, making it nicer.\n"
- " You can also provide the absolute path for a\n"
- " .desktop file. The Name key for will be used in\n"
- " this case.\n"),
- N_(" --message <message>, -m <message>\n"
- " Replace the standard message shown to ask for\n"
- " password for the argument passed to the option.\n"
- " Only use this if --description does not suffice.\n"),
- N_("\n"),
- N_(" --print-pass, -p\n"
- " Ask gksu to print the password to stdout, just\n"
- " like ssh-askpass. Useful to use in scripts with\n"
- " programs that accept receiving the password on\n"
- " stdin.\n"),
- N_("\n"),
- N_(" --sudo-mode, -S\n"
- " Make GKSu use sudo instead of su, as if it had been\n"
- " run as \"gksudo\".\n"),
- N_(" --su-mode, -w\n"
- " Make GKSu use su, instead of using libgksu's\n"
- " default.\n"),
- };
-
- help_trans = g_strconcat(_(help_text[0]), _(help_text[1]),
- _(help_text[2]), _(help_text[3]),
- _(help_text[4]), _(help_text[5]),
- _(help_text[6]), _(help_text[7]),
- _(help_text[8]), _(help_text[9]),
- _(help_text[10]), _(help_text[11]),
- _(help_text[12]), _(help_text[13]),
- _(help_text[14]), _(help_text[15]),
- NULL);
- g_print (_(help_trans), PACKAGE_VERSION, cmdname);
- g_free (help_trans);
-}
-
-static void
-gk_dialog (GtkMessageType type, gchar *format, ...)
-{
- GtkWidget *diag_win;
-
- va_list ap;
- gchar *msg;
-
- va_start(ap, format);
- msg = g_strdup_vprintf(format, ap);
- va_end(ap);
-
- diag_win = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL,
- type, GTK_BUTTONS_CLOSE,
- msg);
-
- gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",
- GTK_SIGNAL_FUNC(gtk_main_quit),
- NULL);
- gtk_window_set_position (GTK_WINDOW(diag_win), GTK_WIN_POS_CENTER);
- gtk_window_set_resizable (GTK_WINDOW(diag_win), FALSE);
-
- gtk_widget_show_all (diag_win);
- gtk_dialog_run (GTK_DIALOG(diag_win));
-
- g_free (msg);
-
- gtk_widget_destroy (diag_win);
-}
-
-void
-set_description_from_desktop (GksuContext *context, gchar *file_name)
-{
- GKeyFile *desktop;
- GError *error = NULL;
- gchar *buffer = NULL;
-
- desktop = g_key_file_new ();
-
- g_key_file_load_from_file (desktop, file_name, G_KEY_FILE_NONE, &error);
- if (error)
- {
- gchar *error_msg;
-
- error_msg = g_strdup_printf ("Could not load desktop file: %s",
- error->message);
- g_warning (error_msg);
- g_free (error_msg);
- g_error_free (error);
- g_key_file_free (desktop);
- return;
- }
-
- buffer = g_key_file_get_locale_string (desktop, "Desktop Entry",
- "Name", NULL, NULL);
- if (buffer)
- {
- gksu_context_set_description (context, buffer);
- g_free (buffer);
- }
-
- g_key_file_free (desktop);
-}
-
-/* gksuexec */
-void
-response_ok_cb (GtkWidget *w, gpointer data)
-{
- GtkWidget *dialog = (GtkWidget*)data;
-
- gtk_dialog_response (GTK_DIALOG(dialog),
- GTK_RESPONSE_OK);
-}
-
-void
-show_hide_advanced (GtkWidget *button, gpointer data)
-{
- GtkWidget *parent, *tmp;
-
- GtkWidget *dialog;
- GtkWidget *vbox;
- GtkWidget *label;
- GtkWidget *check_login;
- GtkWidget *check_presenv;
-
- GksuContext *context = (GksuContext*)data;
- gint response;
-
- parent = gtk_widget_get_parent (button);
- while ((tmp = gtk_widget_get_parent (parent)) != NULL)
- parent = tmp;
-
- dialog = gtk_dialog_new_with_buttons (_("Advanced options"),
- GTK_WINDOW(parent),
- GTK_DIALOG_MODAL,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_CLOSE,
- NULL);
- gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
- gtk_container_set_border_width (GTK_CONTAINER(dialog), 4);
-
- /* vbox points to the dialog's vbox */
- vbox = GTK_DIALOG(dialog)->vbox;
- gtk_box_set_spacing (GTK_BOX(vbox), 3);
-
- /* label */
- label = gtk_label_new ("");
- gtk_label_set_markup (GTK_LABEL(label),
- _("<b>Options to use when changing user</b>"));
- gtk_box_pack_start (GTK_BOX(vbox), label, TRUE, TRUE, 5);
- gtk_widget_show (label);
-
- /* login shell? (--login) */
- check_login = gtk_check_button_new_with_mnemonic (_("_login shell"));
- if (gksu_context_get_login_shell (context) == TRUE) /* window may have been opened before */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_login), TRUE);
- gtk_box_pack_start (GTK_BOX(vbox), check_login, TRUE, TRUE, 0);
- gtk_widget_show (check_login);
-
- /* preserve environment (--preserve-env) */
- check_presenv =
- gtk_check_button_new_with_mnemonic (_("_preserve environment"));
- if (gksu_context_get_keep_env (context) == TRUE)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_presenv), TRUE);
- gtk_box_pack_start (GTK_BOX(vbox), check_presenv, TRUE, TRUE, 0);
- gtk_widget_show (check_presenv);
-
- response = gtk_dialog_run (GTK_DIALOG(dialog));
-
- if (response == GTK_RESPONSE_NONE)
- return;
-
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_login)))
- gksu_context_set_login_shell (context, TRUE);
- else
- gksu_context_set_login_shell (context, FALSE);
-
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_presenv)))
- gksu_context_set_keep_env (context, TRUE);
- else
- gksu_context_set_keep_env (context, FALSE);
-
- gtk_widget_destroy (dialog);
-}
-
-typedef struct {
- char *username;
- uid_t userid;
-} TmpUser;
-
-/*
- * Comparison function for g_list_sort()
- */
-static int fill_with_user_list_cmp(gconstpointer a, gconstpointer b)
-{
- return strcmp(((TmpUser *) a)->username, ((TmpUser *) b)->username);
-}
-
-/*
- * Fill combobox with an alphabetically sorted list of all users on the system
- */
-static void
-fill_with_user_list(GtkWidget *combobox)
-{
- GList *tmp = NULL, *list;
- TmpUser *tu;
- struct passwd *pw;
-
- setpwent();
-
- /* Get all the users info and store it temporary */
- while ((pw = getpwent())) {
- tu = g_new(TmpUser, 1);
-
- tu->username = g_strdup(pw->pw_name);
- tu->userid = pw->pw_uid;
-
- tmp = g_list_prepend(tmp, tu);
- }
-
- /* Sort it! */
- tmp = g_list_sort(tmp, fill_with_user_list_cmp);
-
- /* Add only the usernames */
- for (list = tmp; list; list = g_list_next(list)) {
- tu = list->data;
-
- gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), tu->username);
-
- if (!strcmp (tu->username, "root"))
- gtk_combo_box_set_active (GTK_COMBO_BOX(combobox),
- g_list_position(tmp, list));
-
- g_free(tu);
- }
-
- g_list_free(tmp);
- endpwent();
-}
-
-void
-request_command_and_user (GksuContext *context)
-{
- GtkWidget *dialog;
- GtkWidget *hbox;
- GtkWidget *lvbox;
- GtkWidget *rvbox;
- GtkWidget *image;
-
- GtkWidget *label_cmd;
- GtkWidget *entry_cmd;
-
- GtkWidget *label_user;
- GtkWidget *combo_user;
-
- /* advanced stuff */
- GtkWidget *advanced_button;
-
- gint response;
-
- gchar *tmp = NULL;
-
- dialog = gtk_dialog_new_with_buttons (_("Run program"), NULL, 0,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK,
- GTK_RESPONSE_OK,
- NULL);
- gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
-
- /* horizontal box */
- hbox = gtk_hbox_new (FALSE, 4);
- gtk_container_set_border_width (GTK_CONTAINER(hbox), 5);
- gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox),
- hbox, TRUE, TRUE, 2);
-
- /* left vertical box */
- lvbox = gtk_vbox_new (FALSE, 2);
- gtk_box_pack_start (GTK_BOX(hbox), lvbox, TRUE, TRUE, 0);
-
- /* command */
- label_cmd = gtk_label_new (_("Run:"));
- gtk_label_set_justify (GTK_LABEL(label_cmd), GTK_JUSTIFY_LEFT);
- gtk_box_pack_start (GTK_BOX(lvbox), label_cmd, TRUE, TRUE, 0);
-
- entry_cmd = gtk_entry_new ();
- gtk_signal_connect (GTK_OBJECT(entry_cmd), "activate",
- GTK_SIGNAL_FUNC(response_ok_cb),
- dialog);
- gtk_box_pack_start (GTK_BOX(lvbox), entry_cmd, TRUE, TRUE, 0);
-
- /* user name */
- label_user = gtk_label_new (_("As user:"));
- gtk_label_set_justify (GTK_LABEL(label_user), GTK_JUSTIFY_LEFT);
- gtk_box_pack_start (GTK_BOX(lvbox), label_user, TRUE, TRUE, 0);
- combo_user = gtk_combo_box_new_text ();
- fill_with_user_list (combo_user);
-
- gtk_box_pack_start (GTK_BOX(lvbox), combo_user, TRUE, TRUE, 0);
-
- /* right vertical box */
- rvbox = gtk_vbox_new (FALSE, 2);
- gtk_box_pack_start (GTK_BOX(hbox), rvbox, TRUE, TRUE, 0);
-
- /* image */
- image = gtk_image_new_from_file (DATA_DIR"/pixmaps/gksu-icon.png");
- gtk_box_pack_start (GTK_BOX(rvbox), image, TRUE, TRUE, 0);
-
- /* advanced button */
- advanced_button = gtk_button_new_with_mnemonic (_("_Advanced"));
- g_signal_connect (G_OBJECT(advanced_button), "clicked",
- G_CALLBACK(show_hide_advanced), context);
- gtk_box_pack_start (GTK_BOX(rvbox), advanced_button, TRUE, FALSE, 0);
-
- /* let the magic begin! */
- gtk_widget_show_all (dialog);
-
- while (TRUE)
- {
- response = gtk_dialog_run (GTK_DIALOG(dialog));
-
- switch (response)
- {
- case GTK_RESPONSE_CANCEL:
- case GTK_RESPONSE_DELETE_EVENT:
- case GTK_RESPONSE_NONE:
- exit (0);
- }
-
- tmp = gtk_editable_get_chars (GTK_EDITABLE(entry_cmd), 0, -1);
- if (tmp)
- {
- gksu_context_set_command (context, tmp);
- g_free (tmp);
- }
-
- tmp = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo_user));
- if (tmp)
- {
- gksu_context_set_user (context, tmp);
- g_free (tmp);
- }
-
- if (!strcmp (gksu_context_get_user (context), ""))
- {
- gk_dialog (GTK_MESSAGE_ERROR, _("Missing command to run."));
- }
- else
- {
- gtk_widget_destroy (dialog);
- break;
- }
- }
-}
-/* gksuexec */
-
-int
-main (int argc, char **argv)
-{
- GksuContext *context;
-
- GError *error = NULL;
-
- gint newargc = 0;
- gchar **newargv = NULL;
- gint8 exit_status = -1;
-
- guint run_mode = DEFAULT_MODE;
-
- int c = 0;
-
- setlocale (LC_ALL, "");
- bindtextdomain(PACKAGE_NAME, LOCALEDIR);
- bind_textdomain_codeset (PACKAGE_NAME, "UTF-8");
- textdomain(PACKAGE_NAME);
-
- /*
- * bad, bad code... adds a second -- right after the first one,
- * because gtk_init will remove one of them...
- */
- {
- /* to check whether a -- was already found when parsing arguments */
- gboolean separator_found = 0;
-
- for (c = 0; c < argc; c++)
- {
- if (!strcmp ("--", argv[c]) && (!separator_found))
- {
- newargv = g_realloc (newargv, sizeof(char*) * (newargc + 2));
- newargv[newargc] = g_strdup (argv[c]);
- newargv[newargc + 1] = g_strdup (argv[c]);
-
- newargc = newargc + 2;
- separator_found = TRUE;
- }
- else
- {
- newargv = g_realloc (newargv, sizeof(char*) * (newargc + 1));
- newargv[newargc] = g_strdup (argv[c]);
-
- newargc++;
- }
- }
- }
-
- gtk_init (&newargc, &newargv);
-
- context = gksu_context_new ();
- while ((c = getopt_long(newargc, newargv, "?hu:lpm:kt:i:gdsSwP::aD:", long_opts, NULL))
- != EOF)
- {
- switch (c)
- {
- case 0:
- break;
-
- case 'h':
- help (newargv[0]);
- exit(0);
- break;
- case '?':
- help (newargv[0]);
- exit(0);
- break;
- case 'u':
- gksu_context_set_user (context, optarg);
- break;
- case 'l':
- gksu_context_set_login_shell (context, TRUE);
- break;
- case 'p':
- print_pass = TRUE;
- break;
- case 'm':
- gksu_context_set_message (context, optarg);
- break;
- case 'k':
- gksu_context_set_keep_env (context, TRUE);
- break;
- case 'g':
- gksu_context_set_grab (context, FALSE);
-
- if (optarg != NULL)
- {
- if (!strcasecmp (optarg, "yes")); /* ignore, already set */
- else if (!strcasecmp (optarg, "no"))
- gksu_context_set_grab (context, FALSE);
- else
- {
- fprintf (stderr, _("Option not accepted for --disable-grab: %s\n"),
- optarg);
- return 1;
- }
- }
-
- break;
- case 'd':
- gksu_context_set_debug (context, TRUE);
- break;
- case 'D':
- if (!g_access (optarg, R_OK))
- set_description_from_desktop (context, optarg);
- else
- gksu_context_set_description (context, optarg);
- break;
- case 'S':
- run_mode = SUDO_MODE;
- break;
- case 'w':
- run_mode = SU_MODE;
- break;
- case 'P':
- prompt = TRUE;
-
- if (optarg != NULL)
- {
- if (!strcasecmp (optarg, "yes")); /* ignore, already set */
- else if (!strcasecmp (optarg, "no"))
- prompt = FALSE;
- else
- {
- fprintf (stderr, _("Option not accepted for --prompt: %s\n"),
- optarg);
- return 1;
- }
- }
-
- break;
- }
- }
-
- { /* support gksu_sudo_run */
- gchar *myname = g_path_get_basename (argv[0]);
- if (!strcmp(myname, "gksudo"))
- run_mode = SUDO_MODE;
- g_free (myname);
- }
-
- if (force_grab)
- gksu_context_set_grab (context, TRUE);
-
- if (prompt)
- {
- GtkWidget *d;
-
- d = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("<b>Would you like your screen to be \"grabbed\"\n"
- "while you enter the password?</b>"
- "\n\n"
- "This means all applications will be paused to avoid\n"
- "the eavesdropping of your password by a a malicious\n"
- "application while you type it."));
-
- if (gtk_dialog_run (GTK_DIALOG(d)) == GTK_RESPONSE_NO)
- gksu_context_set_grab (context, FALSE);
- else
- gksu_context_set_grab (context, TRUE);
-
- gtk_widget_destroy (d);
- }
-
- if (print_pass)
- {
- gchar *password = NULL;
-
- if ((gksu_context_get_message (context) == NULL) &&
- (gksu_context_get_description (context) == NULL) &&
- (gksu_context_get_command (context) == NULL))
- {
- gk_dialog (GTK_MESSAGE_ERROR,
- _("<big><b>Missing options or arguments</b></big>\n\n"
- "You need to provide --description or --message."));
- return 1;
- }
-
- password = gksu_ask_password_full (context, NULL, &error);
-
- if (error)
- {
- gk_dialog (GTK_MESSAGE_ERROR,
- _("<b>Failed to request password.</b>\n\n%s"),
- error->message);
- return 3;
- }
-
- if (password)
- printf ("%s\n", password);
-
- return 0;
- }
-
- /* now we can begin to care about a command */
- if (newargc <= optind)
- request_command_and_user (context); /* previously known as gksuexec */
- else
- {
- gchar *command = g_strdup (newargv[optind]);
- gchar *tmp = NULL;
- gint i = 0;
-
- if (!strncmp ("--", command, 2))
- {
- optind = optind + 1;
-
- if (newargc <= optind)
- {
- gk_dialog (GTK_MESSAGE_ERROR, _("Missing command to run."));
- return 1;
- }
-
- g_free (command);
- command = g_strdup (newargv[optind]);
- }
-
- for (i = optind + 1; i < newargc; i++)
- {
- // in sudo mode, check for ' and \ in string and escape it
- if(run_mode == SUDO_MODE &&
- (strchr(newargv[i],'\'') || strchr(newargv[i],'\\')))
- {
- const gchar *p = newargv[i];
- gchar *q,*dest;
- dest = q = g_malloc(strlen(newargv[i])*2+1);
- while(*p) {
- if (*p == '\'')
- *q++ = '\\';
- else if (*p == '\\')
- *q++ = '\\';
- *q++ = *p++;
- }
- *q = 0;
- g_free(newargv[i]);
- newargv[i] = dest;
- }
- tmp = g_strconcat (command, " '", newargv[i], "'", NULL);
- g_free (command);
- command = tmp;
- }
- gksu_context_set_command (context, command);
- g_free (command);
- }
-
- /*
- * FIXME: should be moved to libgksu, which should have two new API functions:
- * gksu_context_launcher_context_{initiate,complete}
- */
-
- {
- struct passwd *pwentry;
-
- pwentry = getpwnam (gksu_context_get_user (context));
-
- if (!pwentry)
- {
- gk_dialog (GTK_MESSAGE_ERROR, _("User %s does not exist."),
- gksu_context_get_user (context));
- return 1;
- }
-
- if (pwentry->pw_uid == geteuid ())
- {
- gint retval = g_spawn_command_line_sync (gksu_context_get_command (context),
- NULL, NULL, NULL, NULL);
- return retval;
- }
- }
-
- {
- gint count = 0;
-
- for (count = 0; count < 3; count++)
- {
- if (error) /* wrong password was given */
- {
- gksu_context_set_alert (context, _("<b>Incorrect password... try again.</b>"));
- g_error_free (error);
- error = NULL;
- }
-
- if (run_mode == SUDO_MODE)
- gksu_sudo_fuller (context,
- NULL, NULL,
- NULL, NULL,
- &exit_status,
- &error);
- else
- {
- /* make sure the environment will not break running
- * GNOME applications
- */
- unsetenv ("ORBIT_SOCKETDIR");
- unsetenv ("DBUS_SESSION_BUS_ADDRESS");
-
- gksu_su_fuller (context,
- NULL, NULL,
- NULL, NULL,
- &exit_status,
- &error);
- }
- if ((error == NULL) || (error->code != GKSU_ERROR_WRONGPASS))
- break;
- }
- }
-
- if (error && (error->code != GKSU_ERROR_CANCELED))
- {
- gk_dialog (GTK_MESSAGE_ERROR,
- _("<b>Failed to run %s as user %s.</b>\n\n%s"),
- gksu_context_get_command (context),
- gksu_context_get_user (context),
- error->message);
- return 3;
- }
-
- return exit_status;
-}
Copied: gksu/tags/2.0.2/gksu/gksu.c (from rev 841, gksu/trunk/gksu/gksu.c)
===================================================================
--- gksu/tags/2.0.2/gksu/gksu.c (rev 0)
+++ gksu/tags/2.0.2/gksu/gksu.c 2009-03-04 19:25:21 UTC (rev 853)
@@ -0,0 +1,772 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <pwd.h>
+#include <string.h>
+#include <getopt.h>
+#include <locale.h>
+
+#include <glib.h>
+#include <glib/gstdio.h>
+
+#include <X11/Xlib.h>
+#include <gtk/gtk.h>
+
+#include <libgksu.h>
+
+#include "defines.h"
+#include "../config.h"
+
+#define BASE_PATH "/apps/gksu/"
+
+/* GLOBALS */
+gboolean print_pass = FALSE;
+gboolean force_grab = FALSE;
+gboolean prompt = FALSE;
+enum
+ {
+ SUDO_MODE,
+ SU_MODE,
+ DEFAULT_MODE
+ };
+
+struct option long_opts[] = {
+ /*
+ * { name has_arg *flag val }
+ */
+ {"help", no_argument, NULL, 'h'},
+ {"login", no_argument, NULL, 'l'},
+ {"preserv-env", no_argument, NULL, 'k'},
+ {"preserve-env", no_argument, NULL, 'k'},
+ {"user", required_argument, NULL, 'u'},
+ {"print-pass", no_argument, NULL, 'p'},
+ {"message", required_argument, NULL, 'm'},
+ {"title", required_argument, NULL, 't'},
+ {"icon", required_argument, NULL, 'i'},
+ {"disable-grab", optional_argument, NULL, 'g'},
+ {"ssh-fwd", no_argument, NULL, 's'},
+ {"debug", no_argument, NULL, 'd'},
+ {"sudo-mode", no_argument, NULL, 'S'},
+ {"su-mode", no_argument, NULL, 'w'},
+ {"prompt", optional_argument, NULL, 'P'},
+ {"desktop", required_argument, NULL, 'D'},
+ {"description", required_argument, NULL, 'D'},
+ {0, 0, 0, 0}
+};
+
+/**
+ * help:
+ * @cmdname: name of the command which was called by the user
+ * (argv[0])
+ *
+ * This function is a simple 'usage'-style printing function.
+ * It is called if the user calls the program with --help or -h
+ */
+void
+help (gchar *cmdname)
+{
+ gchar *help_trans;
+ const gchar* help_text[] = {
+ N_("GKsu version %s\n\n"),
+ N_("Usage: %s [-u <user>] [options] <command>\n\n"),
+ N_(" --debug, -d\n"
+ " Print information on the screen that might be\n"
+ " useful for diagnosing and/or solving problems.\n"),
+ N_("\n"),
+ N_(" --user <user>, -u <user>\n"
+ " Call <command> as the specified user.\n"),
+ N_("\n"),
+ N_(" --disable-grab, -g\n"
+ " Disable the \"locking\" of the keyboard, mouse,\n"
+ " and focus done by the program when asking for\n"
+ " password.\n"),
+ N_(" --prompt, -P\n"
+ " Ask the user if they want to have their keyboard\n"
+ " and mouse grabbed before doing so.\n"),
+ N_(" --preserve-env, -k\n"
+ " Preserve the current environments, does not set $HOME\n"
+ " nor $PATH, for example.\n"),
+ N_(" --login, -l\n"
+ " Make this a login shell. Beware this may cause\n"
+ " problems with the Xauthority magic. Run xhost\n"
+ " to allow the target user to open windows on your\n"
+ " display!\n"),
+ N_("\n"),
+ N_(" --description <description|file>, -D <description|file>\n"
+ " Provide a descriptive name for the command to\n"
+ " be used in the default message, making it nicer.\n"
+ " You can also provide the absolute path for a\n"
+ " .desktop file. The Name key for will be used in\n"
+ " this case.\n"),
+ N_(" --message <message>, -m <message>\n"
+ " Replace the standard message shown to ask for\n"
+ " password for the argument passed to the option.\n"
+ " Only use this if --description does not suffice.\n"),
+ N_("\n"),
+ N_(" --print-pass, -p\n"
+ " Ask gksu to print the password to stdout, just\n"
+ " like ssh-askpass. Useful to use in scripts with\n"
+ " programs that accept receiving the password on\n"
+ " stdin.\n"),
+ N_("\n"),
+ N_(" --sudo-mode, -S\n"
+ " Make GKSu use sudo instead of su, as if it had been\n"
+ " run as \"gksudo\".\n"),
+ N_(" --su-mode, -w\n"
+ " Make GKSu use su, instead of using libgksu's\n"
+ " default.\n"),
+ };
+
+ help_trans = g_strconcat(_(help_text[0]), _(help_text[1]),
+ _(help_text[2]), _(help_text[3]),
+ _(help_text[4]), _(help_text[5]),
+ _(help_text[6]), _(help_text[7]),
+ _(help_text[8]), _(help_text[9]),
+ _(help_text[10]), _(help_text[11]),
+ _(help_text[12]), _(help_text[13]),
+ _(help_text[14]), _(help_text[15]),
+ NULL);
+ g_print (_(help_trans), PACKAGE_VERSION, cmdname);
+ g_free (help_trans);
+}
+
+static void
+gk_dialog (GtkMessageType type, gchar *format, ...)
+{
+ GtkWidget *diag_win;
+
+ va_list ap;
+ gchar *msg;
+
+ va_start(ap, format);
+ msg = g_strdup_vprintf(format, ap);
+ va_end(ap);
+
+ diag_win = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL,
+ type, GTK_BUTTONS_CLOSE,
+ msg);
+
+ gtk_signal_connect_object (GTK_OBJECT(diag_win), "delete_event",
+ GTK_SIGNAL_FUNC(gtk_main_quit),
+ NULL);
+ gtk_window_set_position (GTK_WINDOW(diag_win), GTK_WIN_POS_CENTER);
+ gtk_window_set_resizable (GTK_WINDOW(diag_win), FALSE);
+
+ gtk_widget_show_all (diag_win);
+ gtk_dialog_run (GTK_DIALOG(diag_win));
+
+ g_free (msg);
+
+ gtk_widget_destroy (diag_win);
+}
+
+void
+set_description_from_desktop (GksuContext *context, gchar *file_name)
+{
+ GKeyFile *desktop;
+ GError *error = NULL;
+ gchar *buffer = NULL;
+
+ desktop = g_key_file_new ();
+
+ g_key_file_load_from_file (desktop, file_name, G_KEY_FILE_NONE, &error);
+ if (error)
+ {
+ gchar *error_msg;
+
+ error_msg = g_strdup_printf ("Could not load desktop file: %s",
+ error->message);
+ g_warning (error_msg);
+ g_free (error_msg);
+ g_error_free (error);
+ g_key_file_free (desktop);
+ return;
+ }
+
+ buffer = g_key_file_get_locale_string (desktop, "Desktop Entry",
+ "Name", NULL, NULL);
+ if (buffer)
+ {
+ gksu_context_set_description (context, buffer);
+ g_free (buffer);
+ }
+
+ g_key_file_free (desktop);
+}
+
+/* gksuexec */
+void
+response_ok_cb (GtkWidget *w, gpointer data)
+{
+ GtkWidget *dialog = (GtkWidget*)data;
+
+ gtk_dialog_response (GTK_DIALOG(dialog),
+ GTK_RESPONSE_OK);
+}
+
+void
+show_hide_advanced (GtkWidget *button, gpointer data)
+{
+ GtkWidget *parent, *tmp;
+
+ GtkWidget *dialog;
+ GtkWidget *vbox;
+ GtkWidget *label;
+ GtkWidget *check_login;
+ GtkWidget *check_presenv;
+
+ GksuContext *context = (GksuContext*)data;
+ gint response;
+
+ parent = gtk_widget_get_parent (button);
+ while ((tmp = gtk_widget_get_parent (parent)) != NULL)
+ parent = tmp;
+
+ dialog = gtk_dialog_new_with_buttons (_("Advanced options"),
+ GTK_WINDOW(parent),
+ GTK_DIALOG_MODAL,
+ GTK_STOCK_CLOSE,
+ GTK_RESPONSE_CLOSE,
+ NULL);
+ gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER(dialog), 4);
+
+ /* vbox points to the dialog's vbox */
+ vbox = GTK_DIALOG(dialog)->vbox;
+ gtk_box_set_spacing (GTK_BOX(vbox), 3);
+
+ /* label */
+ label = gtk_label_new ("");
+ gtk_label_set_markup (GTK_LABEL(label),
+ _("<b>Options to use when changing user</b>"));
+ gtk_box_pack_start (GTK_BOX(vbox), label, TRUE, TRUE, 5);
+ gtk_widget_show (label);
+
+ /* login shell? (--login) */
+ check_login = gtk_check_button_new_with_mnemonic (_("_login shell"));
+ if (gksu_context_get_login_shell (context) == TRUE) /* window may have been opened before */
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_login), TRUE);
+ gtk_box_pack_start (GTK_BOX(vbox), check_login, TRUE, TRUE, 0);
+ gtk_widget_show (check_login);
+
+ /* preserve environment (--preserve-env) */
+ check_presenv =
+ gtk_check_button_new_with_mnemonic (_("_preserve environment"));
+ if (gksu_context_get_keep_env (context) == TRUE)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_presenv), TRUE);
+ gtk_box_pack_start (GTK_BOX(vbox), check_presenv, TRUE, TRUE, 0);
+ gtk_widget_show (check_presenv);
+
+ response = gtk_dialog_run (GTK_DIALOG(dialog));
+
+ if (response == GTK_RESPONSE_NONE)
+ return;
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_login)))
+ gksu_context_set_login_shell (context, TRUE);
+ else
+ gksu_context_set_login_shell (context, FALSE);
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(check_presenv)))
+ gksu_context_set_keep_env (context, TRUE);
+ else
+ gksu_context_set_keep_env (context, FALSE);
+
+ gtk_widget_destroy (dialog);
+}
+
+typedef struct {
+ char *username;
+ uid_t userid;
+} TmpUser;
+
+/*
+ * Comparison function for g_list_sort()
+ */
+static int fill_with_user_list_cmp(gconstpointer a, gconstpointer b)
+{
+ return strcmp(((TmpUser *) a)->username, ((TmpUser *) b)->username);
+}
+
+/*
+ * Fill combobox with an alphabetically sorted list of all users on the system
+ */
+static void
+fill_with_user_list(GtkWidget *combobox)
+{
+ GList *tmp = NULL, *list;
+ TmpUser *tu;
+ struct passwd *pw;
+
+ setpwent();
+
+ /* Get all the users info and store it temporary */
+ while ((pw = getpwent())) {
+ tu = g_new(TmpUser, 1);
+
+ tu->username = g_strdup(pw->pw_name);
+ tu->userid = pw->pw_uid;
+
+ tmp = g_list_prepend(tmp, tu);
+ }
+
+ /* Sort it! */
+ tmp = g_list_sort(tmp, fill_with_user_list_cmp);
+
+ /* Add only the usernames */
+ for (list = tmp; list; list = g_list_next(list)) {
+ tu = list->data;
+
+ gtk_combo_box_append_text (GTK_COMBO_BOX(combobox), tu->username);
+
+ if (!strcmp (tu->username, "root"))
+ gtk_combo_box_set_active (GTK_COMBO_BOX(combobox),
+ g_list_position(tmp, list));
+
+ g_free(tu);
+ }
+
+ g_list_free(tmp);
+ endpwent();
+}
+
+void
+request_command_and_user (GksuContext *context)
+{
+ GtkWidget *dialog;
+ GtkWidget *hbox;
+ GtkWidget *lvbox;
+ GtkWidget *rvbox;
+ GtkWidget *image;
+
+ GtkWidget *label_cmd;
+ GtkWidget *entry_cmd;
+
+ GtkWidget *label_user;
+ GtkWidget *combo_user;
+
+ /* advanced stuff */
+ GtkWidget *advanced_button;
+
+ gint response;
+
+ gchar *tmp = NULL;
+
+ dialog = gtk_dialog_new_with_buttons (_("Run program"), NULL, 0,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK,
+ GTK_RESPONSE_OK,
+ NULL);
+ gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE);
+
+ /* horizontal box */
+ hbox = gtk_hbox_new (FALSE, 4);
+ gtk_container_set_border_width (GTK_CONTAINER(hbox), 5);
+ gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dialog)->vbox),
+ hbox, TRUE, TRUE, 2);
+
+ /* left vertical box */
+ lvbox = gtk_vbox_new (FALSE, 2);
+ gtk_box_pack_start (GTK_BOX(hbox), lvbox, TRUE, TRUE, 0);
+
+ /* command */
+ label_cmd = gtk_label_new (_("Run:"));
+ gtk_label_set_justify (GTK_LABEL(label_cmd), GTK_JUSTIFY_LEFT);
+ gtk_box_pack_start (GTK_BOX(lvbox), label_cmd, TRUE, TRUE, 0);
+
+ entry_cmd = gtk_entry_new ();
+ gtk_signal_connect (GTK_OBJECT(entry_cmd), "activate",
+ GTK_SIGNAL_FUNC(response_ok_cb),
+ dialog);
+ gtk_box_pack_start (GTK_BOX(lvbox), entry_cmd, TRUE, TRUE, 0);
+
+ /* user name */
+ label_user = gtk_label_new (_("As user:"));
+ gtk_label_set_justify (GTK_LABEL(label_user), GTK_JUSTIFY_LEFT);
+ gtk_box_pack_start (GTK_BOX(lvbox), label_user, TRUE, TRUE, 0);
+ combo_user = gtk_combo_box_new_text ();
+ fill_with_user_list (combo_user);
+
+ gtk_box_pack_start (GTK_BOX(lvbox), combo_user, TRUE, TRUE, 0);
+
+ /* right vertical box */
+ rvbox = gtk_vbox_new (FALSE, 2);
+ gtk_box_pack_start (GTK_BOX(hbox), rvbox, TRUE, TRUE, 0);
+
+ /* image */
+ image = gtk_image_new_from_file (DATA_DIR"/pixmaps/gksu-icon.png");
+ gtk_box_pack_start (GTK_BOX(rvbox), image, TRUE, TRUE, 0);
+
+ /* advanced button */
+ advanced_button = gtk_button_new_with_mnemonic (_("_Advanced"));
+ g_signal_connect (G_OBJECT(advanced_button), "clicked",
+ G_CALLBACK(show_hide_advanced), context);
+ gtk_box_pack_start (GTK_BOX(rvbox), advanced_button, TRUE, FALSE, 0);
+
+ /* let the magic begin! */
+ gtk_widget_show_all (dialog);
+
+ while (TRUE)
+ {
+ response = gtk_dialog_run (GTK_DIALOG(dialog));
+
+ switch (response)
+ {
+ case GTK_RESPONSE_CANCEL:
+ case GTK_RESPONSE_DELETE_EVENT:
+ case GTK_RESPONSE_NONE:
+ exit (0);
+ }
+
+ tmp = gtk_editable_get_chars (GTK_EDITABLE(entry_cmd), 0, -1);
+ if (tmp)
+ {
+ gksu_context_set_command (context, tmp);
+ g_free (tmp);
+ }
+
+ tmp = gtk_combo_box_get_active_text (GTK_COMBO_BOX(combo_user));
+ if (tmp)
+ {
+ gksu_context_set_user (context, tmp);
+ g_free (tmp);
+ }
+
+ if (!strcmp (gksu_context_get_user (context), ""))
+ {
+ gk_dialog (GTK_MESSAGE_ERROR, _("Missing command to run."));
+ }
+ else
+ {
+ gtk_widget_destroy (dialog);
+ break;
+ }
+ }
+}
+/* gksuexec */
+
+int
+main (int argc, char **argv)
+{
+ GksuContext *context;
+
+ GError *error = NULL;
+
+ gint newargc = 0;
+ gchar **newargv = NULL;
+ gint8 exit_status = -1;
+
+ guint run_mode = DEFAULT_MODE;
+
+ int c = 0;
+
+ setlocale (LC_ALL, "");
+ bindtextdomain(PACKAGE_NAME, LOCALEDIR);
+ bind_textdomain_codeset (PACKAGE_NAME, "UTF-8");
+ textdomain(PACKAGE_NAME);
+
+ /*
+ * bad, bad code... adds a second -- right after the first one,
+ * because gtk_init will remove one of them...
+ */
+ {
+ /* to check whether a -- was already found when parsing arguments */
+ gboolean separator_found = 0;
+
+ for (c = 0; c < argc; c++)
+ {
+ if (!strcmp ("--", argv[c]) && (!separator_found))
+ {
+ newargv = g_realloc (newargv, sizeof(char*) * (newargc + 2));
+ newargv[newargc] = g_strdup (argv[c]);
+ newargv[newargc + 1] = g_strdup (argv[c]);
+
+ newargc = newargc + 2;
+ separator_found = TRUE;
+ }
+ else
+ {
+ newargv = g_realloc (newargv, sizeof(char*) * (newargc + 1));
+ newargv[newargc] = g_strdup (argv[c]);
+
+ newargc++;
+ }
+ }
+ }
+
+ gtk_init (&newargc, &newargv);
+
+ context = gksu_context_new ();
+ while ((c = getopt_long(newargc, newargv, "?hu:lpm:kt:i:gdsSwP::aD:", long_opts, NULL))
+ != EOF)
+ {
+ switch (c)
+ {
+ case 0:
+ break;
+
+ case 'h':
+ help (newargv[0]);
+ exit(0);
+ break;
+ case '?':
+ help (newargv[0]);
+ exit(0);
+ break;
+ case 'u':
+ gksu_context_set_user (context, optarg);
+ break;
+ case 'l':
+ gksu_context_set_login_shell (context, TRUE);
+ break;
+ case 'p':
+ print_pass = TRUE;
+ break;
+ case 'm':
+ gksu_context_set_message (context, optarg);
+ break;
+ case 'k':
+ gksu_context_set_keep_env (context, TRUE);
+ break;
+ case 'g':
+ gksu_context_set_grab (context, FALSE);
+
+ if (optarg != NULL)
+ {
+ if (!strcasecmp (optarg, "yes")); /* ignore, already set */
+ else if (!strcasecmp (optarg, "no"))
+ gksu_context_set_grab (context, FALSE);
+ else
+ {
+ fprintf (stderr, _("Option not accepted for --disable-grab: %s\n"),
+ optarg);
+ return 1;
+ }
+ }
+
+ break;
+ case 'd':
+ gksu_context_set_debug (context, TRUE);
+ break;
+ case 'D':
+ if (!g_access (optarg, R_OK))
+ set_description_from_desktop (context, optarg);
+ else
+ gksu_context_set_description (context, optarg);
+ break;
+ case 'S':
+ run_mode = SUDO_MODE;
+ break;
+ case 'w':
+ run_mode = SU_MODE;
+ break;
+ case 'P':
+ prompt = TRUE;
+
+ if (optarg != NULL)
+ {
+ if (!strcasecmp (optarg, "yes")); /* ignore, already set */
+ else if (!strcasecmp (optarg, "no"))
+ prompt = FALSE;
+ else
+ {
+ fprintf (stderr, _("Option not accepted for --prompt: %s\n"),
+ optarg);
+ return 1;
+ }
+ }
+
+ break;
+ }
+ }
+
+ { /* support gksu_sudo_run */
+ gchar *myname = g_path_get_basename (argv[0]);
+ if (!strcmp(myname, "gksudo"))
+ run_mode = SUDO_MODE;
+ g_free (myname);
+ }
+
+ if (force_grab)
+ gksu_context_set_grab (context, TRUE);
+
+ if (prompt)
+ {
+ GtkWidget *d;
+
+ d = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
+ _("<b>Would you like your screen to be \"grabbed\"\n"
+ "while you enter the password?</b>"
+ "\n\n"
+ "This means all applications will be paused to avoid\n"
+ "the eavesdropping of your password by a a malicious\n"
+ "application while you type it."));
+
+ if (gtk_dialog_run (GTK_DIALOG(d)) == GTK_RESPONSE_NO)
+ gksu_context_set_grab (context, FALSE);
+ else
+ gksu_context_set_grab (context, TRUE);
+
+ gtk_widget_destroy (d);
+ }
+
+ if (print_pass)
+ {
+ gchar *password = NULL;
+
+ if ((gksu_context_get_message (context) == NULL) &&
+ (gksu_context_get_description (context) == NULL) &&
+ (gksu_context_get_command (context) == NULL))
+ {
+ gk_dialog (GTK_MESSAGE_ERROR,
+ _("<big><b>Missing options or arguments</b></big>\n\n"
+ "You need to provide --description or --message."));
+ return 1;
+ }
+
+ password = gksu_ask_password_full (context, NULL, &error);
+
+ if (error)
+ {
+ gk_dialog (GTK_MESSAGE_ERROR,
+ _("<b>Failed to request password.</b>\n\n%s"),
+ error->message);
+ return 3;
+ }
+
+ if (password)
+ printf ("%s\n", password);
+
+ return 0;
+ }
+
+ /* now we can begin to care about a command */
+ if (newargc <= optind)
+ request_command_and_user (context); /* previously known as gksuexec */
+ else
+ {
+ gchar *command = g_strdup (newargv[optind]);
+ gchar *tmp = NULL;
+ gint i = 0;
+
+ if (!strncmp ("--", command, 2))
+ {
+ optind = optind + 1;
+
+ if (newargc <= optind)
+ {
+ gk_dialog (GTK_MESSAGE_ERROR, _("Missing command to run."));
+ return 1;
+ }
+
+ g_free (command);
+ command = g_strdup (newargv[optind]);
+ }
+
+ for (i = optind + 1; i < newargc; i++)
+ {
+ // in sudo mode, check for ' and \ in string and escape it
+ if(run_mode == SUDO_MODE &&
+ (strchr(newargv[i],'\'') || strchr(newargv[i],'\\')))
+ {
+ const gchar *p = newargv[i];
+ gchar *q,*dest;
+ dest = q = g_malloc(strlen(newargv[i])*2+1);
+ while(*p) {
+ if (*p == '\'')
+ *q++ = '\\';
+ else if (*p == '\\')
+ *q++ = '\\';
+ *q++ = *p++;
+ }
+ *q = 0;
+ g_free(newargv[i]);
+ newargv[i] = dest;
+ }
+ tmp = g_strconcat (command, " '", newargv[i], "'", NULL);
+ g_free (command);
+ command = tmp;
+ }
+ gksu_context_set_command (context, command);
+ g_free (command);
+ }
+
+ /*
+ * FIXME: should be moved to libgksu, which should have two new API functions:
+ * gksu_context_launcher_context_{initiate,complete}
+ */
+
+ {
+ struct passwd *pwentry;
+
+ pwentry = getpwnam (gksu_context_get_user (context));
+
+ if (!pwentry)
+ {
+ gk_dialog (GTK_MESSAGE_ERROR, _("User %s does not exist."),
+ gksu_context_get_user (context));
+ return 1;
+ }
+
+ if (pwentry->pw_uid == geteuid ())
+ {
+ gint retval = g_spawn_command_line_sync (gksu_context_get_command (context),
+ NULL, NULL, NULL, NULL);
+ return retval;
+ }
+ }
+
+ {
+ gint count = 0;
+
+ for (count = 0; count < 3; count++)
+ {
+ if (error) /* wrong password was given */
+ {
+ gksu_context_set_alert (context, _("<b>Incorrect password... try again.</b>"));
+ g_error_free (error);
+ error = NULL;
+ }
+
+ if (run_mode == SUDO_MODE)
+ gksu_sudo_fuller (context,
+ NULL, NULL,
+ NULL, NULL,
+ &exit_status,
+ &error);
+ else if (run_mode == SU_MODE)
+ gksu_su_fuller (context,
+ NULL, NULL,
+ NULL, NULL,
+ &exit_status,
+ &error);
+
+ else
+ gksu_run_fuller (context,
+ NULL, NULL,
+ NULL, NULL,
+ &exit_status,
+ &error);
+ if ((error == NULL) || (error->code != GKSU_ERROR_WRONGPASS))
+ break;
+ }
+ }
+
+ if (error && (error->code != GKSU_ERROR_CANCELED))
+ {
+ gk_dialog (GTK_MESSAGE_ERROR,
+ _("<b>Failed to run %s as user %s.</b>\n\n%s"),
+ gksu_context_get_command (context),
+ gksu_context_get_user (context),
+ error->message);
+ return 3;
+ }
+
+ return exit_status;
+}
More information about the gksu-commits
mailing list