Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254934 - app-admin/sudo - sudo changes current working directory to /
Summary: app-admin/sudo - sudo changes current working directory to /
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-14 09:01 UTC by Jon Severinsson
Modified: 2009-04-08 17:44 UTC (History)
1 user (show)

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


Attachments
/etc/sudoers (sudoers,323 bytes, text/plain)
2009-01-14 18:05 UTC, Jon Severinsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Severinsson 2009-01-14 09:01:07 UTC
After a world update, including upgrading form sudo-1.6.9_p16 to sudo-1.6.9_p17, sudo started to change the working directory to / on ordinary invocation.

Reproducible: Always

Steps to Reproduce:
$ pwd
/home/jon
$ sudo pwd
Actual Results:  
/

Expected Results:  
/home/jon

Note that while this problem happens every time on my amd4 box, sudo works as expected on my x86 box, even though it uses the same version of sudo, the same USE flags on most packages (including sudo) and has an identical /etc/sudoers file.
Downgrading my amd64 box to sudo-1.6.9_p13 (oldest version in portage) or upgrading to sudo-1.7.0 (newest version in portage) does not help, nor does copying the /usr/bin/sudo executable from the working x86 system.

$ emerge --info
Portage 2.2_rc21 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r7 x86_64)
=================================================================                                        
System uname: Linux-2.6.27-gentoo-r7-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-glibc2.2.5
Timestamp of tree: Wed, 14 Jan 2009 06:20:01 +0000                                                        
ccache version 2.4 [enabled]                                                                              
app-shells/bash:     3.2_p39                                                                              
dev-java/java-config: 1.3.7-r1, 2.1.6-r1                                                                  
dev-lang/python:     2.5.2-r7                                                                             
dev-util/ccache:     2.4-r7                                                                               
dev-util/cmake:      2.6.2-r1                                                                             
sys-apps/baselayout: 1.12.11.1                                                                            
sys-apps/sandbox:    1.2.18.1-r2                                                                          
sys-devel/autoconf:  2.13, 2.63                                                                           
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                            
sys-devel/binutils:  2.18-r3                                                                              
sys-devel/gcc-config: 1.4.0-r4                                                                            
sys-devel/libtool:   1.5.26                                                                               
virtual/os-headers:  2.6.27-r2                                                                            
ACCEPT_KEYWORDS="amd64"                                                                                   
CBUILD="x86_64-pc-linux-gnu"                                                                              
CFLAGS="-march=athlon64 -O2 -pipe"                                                                        
CHOST="x86_64-pc-linux-gnu"                                                                               
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config /var/lib/hsqldb"                                                                   
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
FEATURES="ccache collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="sv_SE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="sv sv_SE en en_GB en_US"
MAKEOPTS="-j3"
PKGDIR="/var/tmp/packages"
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/repositories/gentoo"
PORTDIR_OVERLAY="/usr/repositories/kde-testing /usr/repositories/local-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X a52 aac acl acpi alsa amd64 asf audiofile avahi bash-completion berkdb bluetooth branding bzip2 cairo caps cdparanoia cdr chm cli cracklib crypt cups curl dbus dga djvu dri dts dv dvd dvdr dvdread ebook emacs emboss encode evo fam ffmpeg firefox flac fortran ftp fuse gdbm gif gmp gnutls gpm gtk gzip hal htmlhandbook http iconv idn imagemagick imap imlib isdnlog java java5 jpeg jpeg2k kde kdeenablefinal kdeprefix kipi lcms ldap libnotify lzo mad matroska midi mikmod mjpeg mmx mmxext mng mp2 mp3 mp4 mpeg mudflap multilib musepack musicbrainz mysql ncurses network nls nptl nptlonly nsplugin ogg openexr opengl openmp pam pcre pdf perl plasma png ppds pppd ps python qt3 qt3support qt4 quicktime rar rdesktop readline reflection samba scanner sdl semantic-desktop session slp smp sndfile snmp speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification subtitles subversion svg sysfs szip tcpd theora threads tiff timidity truetype unicode usb vnc vorbis webdav wmf xattr xcb xcomposite xine xinerama xml xmp xorg xulrunner xv xvid xvmc zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audiovia82xx via82xx-modem ymfpci" 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" CAMERAS="canon samsung" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv sv_SE en en_GB en_US" USERLAND="GNU" VIDEO_CARDS="fbdev radeonradeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-01-14 16:45:03 UTC
Please attach the sudoers file (clean of eventual sensible information), since this shouldn't really happen:

flame@yamato ~ % sudo pwd  
/home/flame

Comment 2 Jon Severinsson 2009-01-14 18:05:34 UTC
Created attachment 178499 [details]
/etc/sudoers

My sudoers file, sans the comments.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-08 17:44:01 UTC
Please reopen if this is still a problem with 1.7.0 or later.