Re: [vchkpw] Segmentation fault with 5.5

2010-05-14 Thread Martin Spuetz
Hello Matt,

thank you for your answer.

On 11.05.2010 23:52, Matt Brookings wrote:
 int main()
 {
 if (valias_select(info, rumtun.de) != NULL) {
 
 valias_select calls vget_assign, which in turn modifies the domain
 field for its purposes.  Because you're providing a pointer to a
 read-only portion of memory, that's one reason why you might be
 segfaulting.
 
 If you're going to write code that calls vpopmail API, be aware that
 much of vpopmail's API will clobber data you pass to it.

my first fault was to think that 5.5.0 is a stable release. I tried
5.4.30 and it's working again. My 2-lines c-code and the chkuser patch.

Greetings
Martin

!DSPAM:4bedb79832717422568130!



Re: [vchkpw] Segmentation fault with 5.5

2010-05-11 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 05/11/2010 04:45 PM, Martin Spuetz wrote:
 my qmail-smtpd creates segfaults. I think it has something to do with
 the shared library.
 
 I created a few lines c code to reproduce the problem (to show what i
 have in qmail-smtpd).
 
 test.c:
 #include stdio.h
 
 #include /home/vpopmail/include/vpopmail/vpopmail.h
 #include /home/vpopmail/include/vpopmail/vauth.h
 #include /home/vpopmail/include/vpopmail/vpopmail_config.h
 
 int main()
 {
 if (valias_select(info, rumtun.de) != NULL) {

valias_select calls vget_assign, which in turn modifies the domain
field for its purposes.  Because you're providing a pointer to a
read-only portion of memory, that's one reason why you might be
segfaulting.

If you're going to write code that calls vpopmail API, be aware that
much of vpopmail's API will clobber data you pass to it.
- -- 
/*
Matt Brookings m...@inter7.com   GnuPG Key FAE0672C
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvp0aUACgkQIwet2/rgZyyYvACfawOVLfc8ydr1J4UTw2C+kSiU
kuYAoIwReBR3Qs1Q48Pv2po+uVxhGQ+e
=yBSP
-END PGP SIGNATURE-