Nmap Development mailing list archives

Help needed: run Zenmap as root on Fedora


From: David Fifield <david () bamsoftware com>
Date: Thu, 28 Aug 2008 17:59:08 -0600

Hello,

If you have installed Zenmap from source recently on Unix you may have
noticed that it installs two menu items: "Zenmap" and "Zenmap (as root)".
That's because of the zenmap.desktop and zenmap-root.desktop files that
are now installed in /usr/share/applications, which work was done by
Michael Pattrick during the past Summer of Code.

zenmap-root.desktop uses a helper script, /usr/share/zenmap/su-to-zenmap.sh,
to get root access. su-to-zenmap.sh tries various ways to get root:
gksu, kdesu, kdesu4, ktsuss, xterm with sudo, and xterm with su. The
problem is, none of these work on Fedora. If you click "Zenmap (as root)",
nothing happens.

I couldn't find any easy way to run an application as root in Fedora.
Fedora uses a mechanism called consolehelper to run apps as root. To use
it involves setting /usr/bin/zenmap to be a symlink to consolehelper,
creating a PAM settings file, and stashing the real zenmap executable
somewhere else. This is all possible, of course, but it's pretty
different from what our current RPMs do. It seems like to support both
we would have to have two RPMs.

Even if we can't manage to run as root on Fedora, there at least needs
to me an error message shown when Zenmap can't be launched. I tried
returning a non-zero exit code from su-to-zenmap.sh, and that didn't
work. Is there an easy way to display a GUI window with a message from a
shell script?

How prevalent is the su-to-root command? I guess it's only available on
Debian and Debian derivatives. We could decide that for this release, we
only support su-to-root, put "TryExec=su-to-root" in
zenmap-root.desktop, and then the root icon will appear only when
su-to-root is available.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: