Bug 142806 - startkde should check lnusertemp return values
Summary: startkde should check lnusertemp return values
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-10 23:59 UTC by Moritz Muehlenhoff
Modified: 2007-03-12 19:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to check return values of lnusertemp in startkde (1.44 KB, patch)
2007-03-11 00:01 UTC, Moritz Muehlenhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Muehlenhoff 2007-03-10 23:59:34 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Unspecified Other
OS:                Linux

The following was filed as Debian bug #292078, it still applies to 3.5.6, please consider the provided patch: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=292078

The default startkde script provided with KDE does not seem to check any 
exit values for lnusertemp:

    165 # Link "tmp" resource to directory in /tmp
    166 # Creates a directory /tmp/kde-$USER and links $KDEHOME/tmp-$HOSTNAME to    166  it.
    167 lnusertemp tmp >/dev/null
    168
    169 # Link "socket" resource to directory in /tmp
    170 # Creates a directory /tmp/ksocket-$USER and links $KDEHOME/socket-$HOST    170 NAME to it.
    171 lnusertemp socket >/dev/null
    172
    173 # Link "cache" resource to directory in /var/tmp
    174 # Creates a directory /var/tmp/kdecache-$USER and links $KDEHOME/cache-$    174 HOSTNAME to it.
    175 lnusertemp cache >/dev/null

There are several reasons this is not correct, the most important being 
that if /tmp (or /var/tmp) are full and lnusertemp cannot do it's job 
(create a directory there), the startkde will happily keep on working even 
though the needed symlinks are not going to be there. 

IMHO the exit status of all of these actions should be tested, how about 
the attached patch to improve over the existing script? (it also includes a useful comment on how to prevent user files from ending up in /tmp or 
/var/tmp since KDE does not honor $TMPDIR)
Comment 1 Moritz Muehlenhoff 2007-03-11 00:01:08 UTC
Created attachment 19933 [details]
Patch to check return values of lnusertemp in startkde
Comment 2 Lubos Lunak 2007-03-12 19:05:00 UTC
I don't see the point of checking for lnusertemp, since it's run after other KDE executables, and the removed call to dcopserver_shutdown is probably an oversight, but the check for lnusertemp value is added now.