Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310031 - net-analyzer/nmap asks for root privileges, but, running as root fails to open net interface
Summary: net-analyzer/nmap asks for root privileges, but, running as root fails to ope...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-18 08:25 UTC by Sergey S. Starikoff
Modified: 2010-09-30 15:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey S. Starikoff 2010-03-18 08:25:22 UTC
zenmap gui while starting at unpriviledged user warns, that some functions may be unavailable.
The rest one works OK.

While starting nmap with root privilesges I fall to error:

Starting Nmap 5.21 ( http://nmap.org ) at 2010-03-18 10:24 MSK
Initiating ARP Ping Scan at 10:24
dnet: Failed to open device eth0
QUITTING!


Reproducible: Always

Steps to Reproduce:
1. $ nmap 192.168.1.1 (starting as unpriviledged user)
2. works without error
3. # nmap 192.168.1.1 (starting as root)

Actual Results:  
The quoted earlier error.

Expected Results:  
normal work

$ emerge --info
Portage 2.1.7.17 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.30-gentoo-r88 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r88-i686-Intel-R-_Pentium-R-_4_CPU_3.00GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 09 Mar 2010 01:45:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d/50glib2 /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildsyspkg collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.corbina.net/pub/Linux/gentoo/                   ftp://mirror.aiya.ru/pub/gentoo/                 ftp://ftp.org.kemsu.ru/gentoo/                 http://ftp.chg.ru/pub/Linux/distributions/gentoo/                 ftp://ftp.chg.ru/pub/Linux/distributions/gentoo/"
LANG="ru_RU.KOI8-R"
LC_ALL=""
LDFLAGS="-Wl,-O1"
LINGUAS="ru en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage-ftn"
SYNC="rsync://rsync.org.kemsu.ru/gentoo       rsync://rsync.asia.gentoo.org/gentoo-portage       rsync://mirror.aiya.ru/gentoo"
USE="X a52 ac3 acl alsa avi berkdb bzip2 cdr cli cracklib crypt cups cxx dbus dri dvd flac fortran gdbm gif gtk iconv jpeg jpeg2k modules mp3 mudflap ncurses nls nptl nptlonly ogg openmp pam pcre perl png pppd python qt3support readline reflection session spl ssl sysfs tcpd vorbis x86 xcb xorg xulrunner zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="sis" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2010-03-25 18:59:06 UTC
Please include the output of `emerge -pv libpcap`.  Also, if you run `ifconfig`, is the eth0 interface listed as UP?
Comment 2 Sergey S. Starikoff 2010-03-26 06:05:02 UTC
emerge -pv libpcap shows:

[ebuild   R   ] net-libs/libpcap-1.0.0-r2  USE="-bluetooth -ipv6" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

eth0 of course is up. Even more: running from unpriviledged user nmap does scan finding everything I need.
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2010-03-26 09:22:01 UTC
(In reply to comment #2)
> emerge -pv libpcap shows:
> 
> [ebuild   R   ] net-libs/libpcap-1.0.0-r2  USE="-bluetooth -ipv6" 0 kB
> 
> Total: 1 package (1 reinstall), Size of downloads: 0 kB

Could you please try upgrading libpcap to libpcap-1.0.1_pre20090812 to see whether this affects the problem in any way?
Comment 4 Sergey S. Starikoff 2010-03-29 11:30:23 UTC
(In reply to comment #3)
> Could you please try upgrading libpcap to libpcap-1.0.1_pre20090812 to see
> whether this affects the problem in any way?
> 
I've updated libpcap to net-libs/libpcap-1.0.1_pre20090812
The result is the same.
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2010-04-04 09:34:07 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Could you please try upgrading libpcap to libpcap-1.0.1_pre20090812 to see
> > whether this affects the problem in any way?
> > 
> I've updated libpcap to net-libs/libpcap-1.0.1_pre20090812
> The result is the same.

Do you have libdnet installed on your system?  Could you please post the output of `ldd /usr/bin/nmap`?
Comment 6 Sergey S. Starikoff 2010-04-05 06:37:35 UTC
No, dev-libs/libdnet is not installed on my system.

$ ldd /usr/bin/nmap
	linux-gate.so.1 =>  (0xb80a9000)
	libpcre.so.0 => /lib/libpcre.so.0 (0xb805f000)
	libpcap.so.1 => /usr/lib/libpcap.so.1 (0xb802f000)
	libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7fe6000)
	libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7e9a000)
	libdl.so.2 => /lib/libdl.so.2 (0xb7e96000)
	libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libstdc++.so.6 (0xb7da9000)
	libm.so.6 => /lib/libm.so.6 (0xb7d83000)
	libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 (0xb7d75000)
	libc.so.6 => /lib/libc.so.6 (0xb7c2d000)
	libz.so.1 => /lib/libz.so.1 (0xb7c19000)
	/lib/ld-linux.so.2 (0xb80aa000)
Comment 7 Michal Januszewski (RETIRED) gentoo-dev 2010-08-28 21:27:06 UTC
Is this still a problem with nmap 5.35?
Comment 8 Sergey S. Starikoff 2010-08-29 07:15:48 UTC
(In reply to comment #7)
> Is this still a problem with nmap 5.35?
> 
net-analyzer/nmap-5.21-r1 on another system works normally.
Tomorrow I'll check it on the problem one.
Comment 9 Sergey S. Starikoff 2010-08-30 11:17:26 UTC
(In reply to comment #7)
> Is this still a problem with nmap 5.35?
> 
Also after complete rebuild world (emerge -e world) on the problem installation net-analyzer/nmap-5.21-r1 works normally (as it should).
Comment 10 Michal Januszewski (RETIRED) gentoo-dev 2010-09-30 15:42:11 UTC
Let's close the bug as WORKSFORME then.  If you run into this problem again, feel free to reopen it.