Re: [gmime-devel] issue with g_mime_multipart_encrypted_decrypt / fsync



On 2012-08-05 21:11, Jeffrey Stedfast wrote:

 > On 7/22/2012 11:04 AM, Dirk-Jan C. Binnema wrote:
 > > Hi all,
 > >
 > > I'm trying to use g_mime_multipart_encrypted_decrypt in my app[1], but
 > > it keeps returning NULL without 'err' being set. I'm using GMime 2.6.x
 > >
 > > I've debugged this to the function stream_flush in gmime-stream-pipe.c,
 > > where `fsync' returns -1, with errno set to EINVAL. This is called from
 > > gmime-gpg-context.c, around line 1194:
 > >        if (g_mime_stream_flush (passwd) == -1)
 > >
 > > Maybe fsync on a pipe is not allowed?

 > I don't have a Linux machine handy, but presumably it's the same as on
 > Mac OS X. The man page says that EINVAL can occur if/when you try to
 > fsync() on a pipe or socket which seems to match what you are seeing.

 > I've removed the fsync() call in gmime-stream-pipe.c. I suspect the
 > reason I've not seen the error you ran into was because I had a gpg
 > agent installed which makes the code bypass sending a password to gpg
 > over a pipe.

I am actually using gpg-agent as well, and the error only occurred when
gpg-agent did not yet know about the password; i.e., when my password
function was being called.

Anyhow, thanks for fixing this!

Best wishes,
Dirk.

--
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb djcbsoftware nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]