[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    kdesu overrides user's PATH with hardcoded path
From:       Romain GUINOT <romainguinot () gmail ! com>
Date:       2008-08-12 17:24:21
Message-ID: 200808121924.21562.romain.guinot () atosorigin ! com
[Download RAW message or body]

Hi, 

I have found a small bug in kdesu's stub.cpp source file. 
It overrides the user's own $PATH by adding "/sbin:/bin:/usr/sbin:/usr/bin:"  in \
front of it .  This does not interfere for most users, but is a problem when you \
sometimes have a few local binaries sitting in non default  directories. When this is \
the case, kdesu picks up the "wrong" standard one. 

The fix is extremely simple, just add the hardcoded path after the user's $PATH \
instead of before.  The patch is attached. 

I am not sure if describing/fixing it here is the best way to go ? should i create a \
bug report and reference it here in place of  describing it here ? 

Thanks,
Romain. 


["kdesu_path_patch.diff" (text/x-patch)]

--- kdesu/stub.orig	2008-08-12 19:00:02.000000000 +0200
+++ kdesu/stub.cpp	2008-08-12 19:01:41.000000000 +0200
@@ -133,7 +133,7 @@ int StubProcess::ConverseStub(int check)
                 path = path.mid(1);
 	    if (m_User == "root") {
 		if (!path.isEmpty())
-		    path = "/sbin:/bin:/usr/sbin:/usr/bin:" + path;
+		    path = path + "/sbin:/bin:/usr/sbin:/usr/bin:" ;
 		else
 		    path = "/sbin:/bin:/usr/sbin:/usr/bin";
             }


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic