kwallet / access from commandline?

George Staikos staikos at kde.org
Thu Jun 30 15:45:27 BST 2005


On Thursday 30 June 2005 04:01, you wrote:
> >>Is it possible to access the kwallet from outside the kde environment,
> >>e.g. from command line?
> >
> >   You can do it via DCOP.  Try exploring with kdcop, or use "dcop kded
> > kwalletd" and see the function calls there.  KWallet runs through kded as
> > a daemon for purposes of synchronization and user security policy
> > management.
>
> I have a working KWalletBindings java class now, but I have some
> security concerns:
> As I have to call dcop via commandline with all parameters, anybody
> could can see passwords I store by just using a "ps -ax", as all
> parameters can be seen there.
> The best way would be IMO (btw that's how gpg does it) to pipe the
> parameters to the dcop cmdline tool, so that they can't be seen from the
> outside. This would also allow us to do multiple calls to dcop without
> having to re-start it for every call (if every line [except quoted
> newlines] is threated as a command). I know that that is possible for
> single method parameters, but not for method names.
>
> Maybe you could forward this to the dcop developers as I don't know them
> resp. their email addresses.
>
>
> Another problem is that I get the normal password entries, but maps
> aren't supported by the cmdline tool - the output is just a
> "<QByteArray>". Would it be possible to provide an additional function
> which returns a string with a special format, e.g. every key-value-pair
> on a single line, with a double colon as separator between the two?

   Actually the dcop calls should probably be done with a native DCOP library.  
There should be Java DCOP bindings in the kdebindings module of CVS.  The 
option of piping the arguments to the DCOP tool is also a good one, though, 
and wouldn't be too hard to add.  The problem for you is deployment - it 
won't be "shipped" for quite some time if it's inside KDE.  Are you 
comfortable with C++?  You might want to have a try at hacking the dcop tool 
and making an option for piping the commandline in.  The source is in 
kdelibs/dcop/

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/




More information about the kde-core-devel mailing list