<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/580: mutt stores PGP passphrase insecurely



On Fri, Sep 22, 2006 at 11:44:28PM +0100, Paul Walker wrote:
> On Fri, Sep 22, 2006 at 03:24:05PM +0200, Moritz Barsnick wrote:
> 
> > While you're at it, you might want to evaluate the return code of
> > mlock()/munlock(). My manpage (old Linux 2.4.20 system) has the return
> > values ENOMEM, EPERM, EINVAL.
> 
> That's nice. The manpages I have say:
> 
> RETURN VALUE
>    On  success  these system calls return 0.  On error, -1 is returned,
>    errno is set appropriately, and no changes are made to any locks in the
>    address space of the process.
> 
> This is basically incompatible with what you're describing. If we can't even
> do it simply between major versions of Linux, I would suggest the feature's
> going to be more hassle than it's worth by the time we get done with all the
> operating systems.

I'm afraid I don't follow why these two statements are incompatible.
mlock is just like any libc function: it returns 0 for success, and -1
for failure.  It sets errno.

David