Bug 426871

Summary: startkde fails when $HOME includes space characters
Product: [Fedora] Fedora Reporter: Anthony Stuckey <anthonystuckey>
Component: kdebaseAssignee: Than Ngo <than>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: kevin, ltinkl, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.5.9-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-03 18:25:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anthony Stuckey 2007-12-27 19:20:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

Description of problem:
starkde uses xargs to break the $HOME path into components.

# set up user environment if not present
# check for space on /tmp and "$HOME" and for write access
#  error exit, if not
space_tmp=`LANG=C df /tmp | xargs | cut -d" " -f11`
homedir_mount=`LANG=C df "$HOME" | xargs | cut -d" " -f8`

This fails to produce the proper result when the mount path includes space characters.

mark.bme.utexas.edu:/Volumes/Mark Data/Users
                     1464886912 922651072 542235840  63% /Network/Servers/mark.bme.utexas.edu/Volumes/Mark Data/Users

Because the base directory is detected incorrectly, explicit checks later in the script fail, and the login is aborted.

Version-Release number of selected component (if applicable):
kdebase-6:3.5.8-9.fc8 

How reproducible:
Always


Steps to Reproduce:
1.  Create a user whose home directory path includes spaces.  This example uses an NFS mount from a macosx server and LDAP authentication, but a simple directory tree should suffice.
2.  Attempt to log in via KDE graphical login
3.  Boom.

Actual Results:
After accepting the user password, but before showing a desktop, login was aborted back to the login prompt.

Expected Results:
The user should have logged in.

Additional info:

Comment 1 Rex Dieter 2007-12-27 23:07:04 UTC
Best report this to upsteam kde at bugs.kde.org too, this is definitely not
fedora-specific.

Comment 2 Kevin Kofler 2007-12-28 17:02:42 UTC
> this is definitely not fedora-specific.

Actually it is, the offending lines are added by the redhat-startkde patch, 
so...

> Best report this to upsteam kde at bugs.kde.org too,

... this should not be needed.


Comment 3 Rex Dieter 2007-12-28 19:40:22 UTC
Doh, fair enough.

Perhaps the startkde patch needs to be re-evaluated, pushing upstream the parts
that make sense, and omit anything else not essential.

Comment 4 Rex Dieter 2007-12-29 04:07:08 UTC
Just took a closer look at the startkde patch, and, fwiw, the bits about
checking for free space and writability can all go as far as I'm concerned. 
They are, as highlighted by this bug, fragile, and mostly bogus to boot (if you
have no writability or free space, you're pretty much screwed anyway).

Comment 5 Rex Dieter 2008-02-14 21:46:53 UTC
fixed in cvs/rawhide, update for F-7/F-8 coming soon (~1 weekish)

%changelog
...
- fixup startkde patch, omitting broken bits, for now (#426871)

Comment 6 Anthony Stuckey 2008-02-14 21:55:21 UTC
I would just note that startkde is far from the only program which behaves badly
in this perfectly legal case.

selinux and vncserver, among other tools, also produce bogus error messages.

Comment 7 Rex Dieter 2008-02-14 22:03:21 UTC
to be fair, "in this perfectly legal case." misses the "but still probably not a
good idea to do in practice" qualifier, but, point taken.

Keep fighting the good fight, we'll have perfect software... someday. :)

Comment 8 Kevin Kofler 2008-02-15 05:37:23 UTC
I've seen your commit to kdebase3, but we also need to fix this for 
kdebase-workspace in Rawhide.

Comment 9 Kevin Kofler 2008-02-16 08:06:23 UTC
I fixed this for KDE 4 (which is what actually provides startkde in Rawhide) in 
kdebase-workspace-4.0.1-7.fc9. (I dropped the broken hunk from the 
redhat-startkde patch, just like Rex Dieter did in kdebase3.)

Rex Dieter has built fixed kdebase packages for F7 and F8 now, they'll be 
pushed as updates as part of the KDE 3.5.9 update coming soon.

> selinux and vncserver, among other tools, also produce bogus error messages.

Then please file separate bug reports for those tools, they need to be fixed 
too.

Comment 10 Anthony Stuckey 2008-02-16 17:55:47 UTC
I have filed a similar bug against vncserver.
https://bugzilla.redhat.com/show_bug.cgi?id=433133

I don't have any idea which login component this one applies to.  Bash?  The
user is left in /, not $HOME, so the error is real in that sense.  It's phantom
in the sense that everything is working right.  With just a simple "cd", I'm in
my home directory, and can read/write files, etc.  $HOME is set appropriately.

astuckey.utexas.edu's password:
Last login: Wed Feb 13 13:33:42 2008 from kareen.bme.utexas.edu
Unauthorized use of UT Austin computer and networking resources is prohibited.
If you log on to this computer system, you acknowledge your awareness of and
concurrence with the UT Austin Acceptable Use Policy. The University will
prosecute violators to the full extent of the law.
Could not chdir to home directory
/Network/Servers/mark.bme.utexas.edu/Volumes/Mark Data/Users/astuckey:
Permission denied
-bash-3.2$ ls -ld /Network/Servers/mark.bme.utexas.edu/Volumes/Mark\
Data/Users/astuckey/
drwxr-xr-x 69 astuckey games 2346 2008-02-14 23:05
/Network/Servers/mark.bme.utexas.edu/Volumes/Mark Data/Users/astuckey//
-bash-3.2$ id -a
uid=1026(astuckey) gid=20(games) groups=20(games)
context=unconfined_u:system_r:unconfined_t:s0-s0:c0.c1023
-bash-3.2$ df -k /Network/Servers/mark.bme.utexas.edu/Volumes/Mark\ Data/Users/
Filesystem           1K-blocks      Used Available Use% Mounted on
mark.bme.utexas.edu:/Volumes/Mark Data/Users
                     1464886912 1109081856 355805056  76%
/Network/Servers/mark.bme.utexas.edu/Volumes/Mark Data/Users
-bash-3.2$

Comment 11 Anthony Stuckey 2008-02-16 18:17:37 UTC
And now also against SElinux.

https://bugzilla.redhat.com/show_bug.cgi?id=433134

Comment 12 Fedora Update System 2008-02-16 23:58:40 UTC
kdevelop-3.5.1-1.fc8,arts-1.5.9-1.fc8,kdelibs-3.5.9-1.fc8,kdeaccessibility-3.5.9-1.fc8,kdeaddons-3.5.9-1.fc8,kdeadmin-3.5.9-1.fc8,kdeartwork-3.5.9-1.fc8,kdebase-3.5.9-1.fc8,kdebindings-3.5.9-1.fc8,kdeedu-3.5.9-1.fc8,kdegames-3.5.9-1.fc8,kdegraphics-3.5.9-1.fc8,kde-i18n-3.5.9-4.fc8,kdemultimedia-3.5.9-1.fc8,kdenetwork-3.5.9-1.fc8,kdepim-3.5.9-3.fc8,kdesdk-3.5.9-1.fc8,kdetoys-3.5.9-1.fc8,kdeutils-3.5.9-1.fc8,kdewebdev-3.5.9-1.fc8 has been submitted as an update for Fedora 8

Comment 13 Fedora Update System 2008-02-17 00:14:39 UTC
kdevelop-3.5.1-1.fc7,arts-1.5.9-1.fc7,kdelibs-3.5.9-1.fc7,kdeaccessibility-3.5.9-1.fc7,kdeaddons-3.5.9-1.fc7,kdeadmin-3.5.9-1.fc7,kdeartwork-3.5.9-1.fc7,kdebase-3.5.9-1.fc7,kdebindings-3.5.9-1.fc7,kdeedu-3.5.9-1.fc7,kdegames-3.5.9-1.fc7,kdegraphics-3.5.9-1.fc7,kde-i18n-3.5.9-4.fc7,kdemultimedia-3.5.9-1.fc7,kdenetwork-3.5.9-1.fc7,kdepim-3.5.9-3.fc7,kdesdk-3.5.9-1.fc7,kdetoys-3.5.9-1.fc7,kdeutils-3.5.9-1.fc7,kdewebdev-3.5.9-1.fc7 has been submitted as an update for Fedora 7

Comment 14 Fedora Update System 2008-02-21 02:56:16 UTC
kdeadmin-3.5.9-1.fc8, kdegraphics-3.5.9-1.fc8, kdenetwork-3.5.9-1.fc8, arts-1.5.9-1.fc8, kdebase-3.5.9-1.fc8, kdemultimedia-3.5.9-1.fc8, kdepim-3.5.9-5.fc8, kdeaccessibility-3.5.9-1.fc8, kdeedu-3.5.9-1.fc8, kdesdk-3.5.9-1.fc8, kdeutils-3.5.9-1.fc8, kdelibs-3.5.9-1.fc8, kdebindings-3.5.9-1.fc8, kdetoys-3.5.9-1.fc8, kdeaddons-3.5.9-1.fc8, kdegames-3.5.9-1.fc8, kdewebdev-3.5.9-1.fc8, kdevelop-3.5.1-1.fc8, kdeartwork-3.5.9-1.fc8, kde-i18n-3.5.9-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kdeadmin kdegraphics kdenetwork arts kdebase kdemultimedia kdepim kdeaccessibility kdeedu kdesdk kdeutils kdelibs kdebindings kdetoys kdeaddons kdegames kdewebdev kdevelop kdeartwork kde-i18n'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-1889

Comment 15 Fedora Update System 2008-03-03 18:21:21 UTC
kdevelop-3.5.1-3.fc7, arts-1.5.9-1.fc7, kdelibs-3.5.9-3.fc7, kdeaccessibility-3.5.9-1.fc7, kdeaddons-3.5.9-1.fc7, kdeadmin-3.5.9-1.fc7, kdeartwork-3.5.9-1.fc7, kdebase-3.5.9-3.fc7, kdebindings-3.5.9-1.fc7, kdeedu-3.5.9-1.fc7, kdegames-3.5.9-1.fc7, kdegraphics-3.5.9-1.fc7, kdemultimedia-3.5.9-1.fc7, kdepim-3.5.9-6.fc7, kdetoys-3.5.9-1.fc7, kdewebdev-3.5.9-1.fc7, kde-i18n-3.5.9-4.fc7, kdenetwork-3.5.9-2.fc7, kdesdk-3.5.9-1.fc7, kdeutils-3.5.9-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2008-03-03 18:25:48 UTC
kdevelop-3.5.1-3.fc8, arts-1.5.9-1.fc8, kdelibs-3.5.9-3.fc8, kdeaccessibility-3.5.9-1.fc8, kdeaddons-3.5.9-1.fc8, kdeadmin-3.5.9-1.fc8, kdeartwork-3.5.9-1.fc8, kdebase-3.5.9-3.fc8, kdebindings-3.5.9-1.fc8, kdeedu-3.5.9-1.fc8, kdegames-3.5.9-1.fc8, kdegraphics-3.5.9-1.fc8, kde-i18n-3.5.9-4.fc8, kdemultimedia-3.5.9-1.fc8, kdenetwork-3.5.9-2.fc8, kdepim-3.5.9-6.fc8, kdesdk-3.5.9-1.fc8, kdetoys-3.5.9-1.fc8, kdeutils-3.5.9-1.fc8, kdewebdev-3.5.9-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.