[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Locating executables in root's PATH (in KAuth helper)
From: David Jarvie <djarvie () kde ! org>
Date: 2011-05-10 21:26:35
Message-ID: 201105102226.45178.djarvie () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Monday 09 May 2011 00:07:27 johnmS2 wrote:
> On 05/08/2011 11:35 AM, David Jarvie wrote:
> > On Sunday 08 May 2011 18:46:46 Enda Cronnolly wrote:
> >> On Sunday 08 May 2011 18:35:42 David Jarvie wrote:
> >>> Is there any KDE or Qt way to locate an executable using the root PATH.
> >>> Specifically, I want to run something which on my system is in /usr/sbin/,
> >>> calling it from a KAuth helper module running as root.
> >>> KStandarDirs::findExe() doesn't produce any result (the PATH variable
> >>> doesn't seem to be set up). I could hard code the /usr/sbin/ path, but
> >>> that doesn't seem desirable in case the executable is elsewhere on some
> >>> systems.
> >>
> >> http://unixhelp.ed.ac.uk/CGI/man-cgi?whereis
> >
> > This does the job on the command line, but it's not particularly easy to call it from C++ code.
> >
> >
>
> Run whereis using popen() is easy enough, but I believe it is only on
> POSIX systems if that matters.
That works fine. Thanks.
--
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
["signature.asc" (application/pgp-signature)]
>> 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