RE: [vchkpw] Error when vpopmail is autocreating a user

2004-01-11 Thread Shane Chrisp
Thanks Michael,

 I have applied the patch and its all fixed.

Shane 

>-Original Message-
>From: Michael Bowe [mailto:[EMAIL PROTECTED] 
>Sent: Sunday, 11 January 2004 11:57 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [vchkpw] Error when vpopmail is autocreating a user
>
>Fixed in CVS
>
>In 5.4.29, there was an extra line added towards the end of
>make_user_dir() :
>
>  free (mypw->pw_dir);
>
>This had a knockon effect to vdelivermail, because
>vdelivermail wasnt re-reading the pw_dir field after the userdir
>was autocreated.
>
>Also added the same fix to vchkpw.
>
>If you want to try the patch, grab it from
><http://sourceforge.net/tracker/?func=detail&aid=873007&group_i
d=85937&atid=
>577798>
>
>Michael.
>
>
>- Original Message - 
>From: "Michael Bowe" <[EMAIL PROTECTED]>
>
>> Righto,
>>
>> I have successfully duplicated this fault now.
>>
>> Will investigate and should have a patch soon.  :-)
>>
>> Michael.
>
>



Re: [vchkpw] Error when vpopmail is autocreating a user

2004-01-10 Thread Michael Bowe
Fixed in CVS

In 5.4.29, there was an extra line added towards the end of
make_user_dir() :

  free (mypw->pw_dir);

This had a knockon effect to vdelivermail, because
vdelivermail wasnt re-reading the pw_dir field after the userdir
was autocreated.

Also added the same fix to vchkpw.

If you want to try the patch, grab it from


Michael.


- Original Message - 
From: "Michael Bowe" <[EMAIL PROTECTED]>

> Righto,
>
> I have successfully duplicated this fault now.
>
> Will investigate and should have a patch soon.  :-)
>
> Michael.



Re: [vchkpw] Error when vpopmail is autocreating a user

2004-01-10 Thread X-Istence
Michael Bowe wrote:

Righto,

I have successfully duplicated this fault now.  

Will investigate and should have a patch soon.  :-)

Michael.

- Original Message - 
From: "Shane Chrisp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 09, 2004 1:12 AM
Subject: RE: [vchkpw] Error when vpopmail is autocreating a user

 

I have found that the bug begins as of 5.3.29 and is present in all
versions up to the latest 5.4.0-rc1.
Shane

   

Hi Michael,

I had actually thought of doing the same thing so I got as far as
downloading 
the different versions and I will go through them tonight and 
let you know
which
version the error shows up in.

cheers
Shane
 

Shane, perhaps you could step through the versions between
5.3.27 and 5.4.0-rc1 one at a time, until you find the version
that causes the problem? This is assist us in tracking down the bug.
Michael.

   

 

   



 

Wish i had seen this thread earlier, i duplicated it as well on a test 
box, and was about to go investigate what it causing it.

But you got first dibs

X


Re: [vchkpw] Error when vpopmail is autocreating a user

2004-01-10 Thread Michael Bowe
Righto,

I have successfully duplicated this fault now.  

Will investigate and should have a patch soon.  :-)

Michael.

- Original Message - 
From: "Shane Chrisp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 09, 2004 1:12 AM
Subject: RE: [vchkpw] Error when vpopmail is autocreating a user


> I have found that the bug begins as of 5.3.29 and is present in all
> versions up to the latest 5.4.0-rc1.
> 
> Shane
> 
> >Hi Michael,
> >
> > I had actually thought of doing the same thing so I got as far as
> >downloading 
> >the different versions and I will go through them tonight and 
> >let you know
> >which
> >version the error shows up in.
> >
> >cheers
> >Shane
> >
> >>Shane, perhaps you could step through the versions between
> >>5.3.27 and 5.4.0-rc1 one at a time, until you find the version
> >>that causes the problem? This is assist us in tracking down the bug.
> >>
> >>Michael.
> >>
> >>
> >
> >
> 
> 


Re: [vchkpw] Error when vpopmail is autocreating a user

2004-01-08 Thread Tom Collins
On Jan 8, 2004, at 7:12 AM, Shane Chrisp wrote:
I have found that the bug begins as of 5.3.29 and is present in all
versions up to the latest 5.4.0-rc1.
We've got a tracker for this going on SourceForge,  


Here's my latest entry:

--
If you suspect:
r_chown(".", uid, gid);

try replacing it with:

chdir("..");
r_chown(username, uid, gid);
But I doubt that's it -- the error indicates that r_chown() is being  
called with "¨ßB¨ßBopmail/domains/cwispy.com/test" as the path.

I'm thinking that there's buffer overflow, or some other issue that is  
causing the directory name to be overwritten with random data.  Perhaps  
a function buffer that should be static, but isn't.

Maybe vmake_maildir(), or code just before it, since it calls r_chown()  
with a fully qualified path?  Or it could be a problem with the code  
that reads in the pathname?

What is the auth backend, and what does the user's entry look like?  We  
might be barking up the wrong tree here -- if it's munged in the auth,  
then we need to back up even further.
--

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


RE: [vchkpw] Error when vpopmail is autocreating a user

2004-01-08 Thread Shane Chrisp
 I have found that the bug begins as of 5.3.29 and is present in all
versions up to the latest 5.4.0-rc1.

Shane

>Hi Michael,
>
> I had actually thought of doing the same thing so I got as far as
>downloading 
>the different versions and I will go through them tonight and 
>let you know
>which
>version the error shows up in.
>
>cheers
>Shane
>
>>Shane, perhaps you could step through the versions between
>>5.3.27 and 5.4.0-rc1 one at a time, until you find the version
>>that causes the problem? This is assist us in tracking down the bug.
>>
>>Michael.
>>
>>
>
>



RE: [vchkpw] Error when vpopmail is autocreating a user

2004-01-08 Thread Shane Chrisp
-- whoops, sorry Michael, forgot to change the reply addy to the list --

Hi Michael,

 I had actually thought of doing the same thing so I got as far as
downloading 
the different versions and I will go through them tonight and let you know
which
version the error shows up in.

cheers
Shane

>Shane, perhaps you could step through the versions between
>5.3.27 and 5.4.0-rc1 one at a time, until you find the version
>that causes the problem? This is assist us in tracking down the bug.
>
>Michael.
>
>



Re: [vchkpw] Error when vpopmail is autocreating a user

2004-01-08 Thread Michael Bowe
- Original Message - 
From: "Shane Chrisp" <[EMAIL PROTECTED]>
>

> <[EMAIL PROTECTED]>:
> r_chown() : Failed to cd to directory
> ¨ßB¨ßBopmail/domains/cwispy.com/testMessage rejected. Not enough storage
> space in user's mailbox to accept message.
> can not open new email file errno=2
>
file=èàBèàBopmail/domains/cwispy.com/test/Maildir/tmp/1073475995.7781.garf
> ield.2000cn.com.au,S=556

I took a look at this. There are only a couple of places where that
"r_chown() : Failed to cd to directory" error could come from.

One of them is the make_user_dir() function, which sounds like
a likely cantidate. This function is called by vdelivermail() when
a message arrives for a user that doesnt yet have a dir allocated.

Doing a diff of 5.3.27 (which reportedly works ok) against
the current 5.4.0-pre1, I can see that this make_user_dir() function has
had some changes. So I guess a bug has snuck in there somewhere...
Changelog shows the work was done for the 5.3.29 release.

I think it is something to do with the line :

r_chown(".", uid, gid);

All other references to this r_chown() function use a full path,
this is the the only spot where a "." is used as a path. I wonder
if that makes a difference at all?

Probably the r_chown() call above should test for a return code,
and then print error / return on failure.

Also inside r_chown(), the very first line is
chown(path,owner,group);
which should also probably check for a return code, and
then print error / return on failure.

Even after doing this digging though, I still can't really explain where
that corrupted data is coming from. I was looking around for an
uninitialised buffer or somesuch, but couldn't really spot the source.

Shane, perhaps you could step through the versions between
5.3.27 and 5.4.0-rc1 one at a time, until you find the version
that causes the problem? This is assist us in tracking down the bug.

Michael.



RE: [vchkpw] Error when vpopmail is autocreating a user - FOllowup

2004-01-07 Thread Shane Chrisp
>What were your configure options?  

./configure --enable-rebuild-tcpserver-file=n --enable-roaming-users=y
--enable-defaultquota=20971520S --enable-auth-module=mysql
--enable-file-sync=n --enable-mysql-logging=y --enable-learn-passwords=y
--enable-clear-passwd=y --enable-valias=y --enable-mysql-limits=y
--enable-logging=p --enable-relay-clear-minutes=15

>What does your config.h file look like?  This is very odd, and something
that I haven't seen before.

/* config.h.  Generated automatically by configure.  */
/* config.h.in.  Generated automatically from configure.in by autoheader.
*/

/* Define if the closedir function returns void instead of int.  */
/* #undef CLOSEDIR_VOID */

/* Define to empty if the keyword does not work.  */
/* #undef const */

/* Define to `int' if  doesn't define.  */
/* #undef gid_t */

/* Define if you have  that is POSIX.1 compatible.  */
#define HAVE_SYS_WAIT_H 1

/* Define if utime(file, NULL) sets file's timestamp to the present.  */
#define HAVE_UTIME_NULL 1

/* Define as __inline if that's what the C compiler calls it.  */
/* #undef inline */

/* Define to `int' if  doesn't define.  */
/* #undef mode_t */

/* Define to `long' if  doesn't define.  */
/* #undef off_t */

/* Define to `int' if  doesn't define.  */
/* #undef pid_t */

/* Define as the return type of signal handlers (int or void).  */
#define RETSIGTYPE void

/* Define to `unsigned' if  doesn't define.  */
/* #undef size_t */

/* Define if you have the ANSI C header files.  */
#define STDC_HEADERS 1

/* Define if your  declares struct tm.  */
/* #undef TM_IN_SYS_TIME */

/* Define to `int' if  doesn't define.  */
/* #undef uid_t */

/* Define if you have the bzero function.  */
#define HAVE_BZERO 1

/* Define if you have the dup2 function.  */
#define HAVE_DUP2 1

/* Define if you have the fdatasync function.  */
#define HAVE_FDATASYNC 1

/* Define if you have the getcwd function.  */
#define HAVE_GETCWD 1

/* Define if you have the gethostname function.  */
#define HAVE_GETHOSTNAME 1

/* Define if you have the getpass function.  */
#define HAVE_GETPASS 1

/* Define if you have the getspnam function.  */
#define HAVE_GETSPNAM 1

/* Define if you have the memset function.  */
#define HAVE_MEMSET 1

/* Define if you have the mkdir function.  */
#define HAVE_MKDIR 1

/* Define if you have the putenv function.  */
#define HAVE_PUTENV 1

/* Define if you have the rmdir function.  */
#define HAVE_RMDIR 1

/* Define if you have the socket function.  */
#define HAVE_SOCKET 1

/* Define if you have the strchr function.  */
#define HAVE_STRCHR 1

/* Define if you have the strdup function.  */
#define HAVE_STRDUP 1

/* Define if you have the strerror function.  */
#define HAVE_STRERROR 1

/* Define if you have the strncasecmp function.  */
#define HAVE_STRNCASECMP 1

/* Define if you have the strrchr function.  */
#define HAVE_STRRCHR 1

/* Define if you have the strspn function.  */
#define HAVE_STRSPN 1

/* Define if you have the strstr function.  */
#define HAVE_STRSTR 1

/* Define if you have the utime function.  */
#define HAVE_UTIME 1

/* Define if you have the  header file.  */
#define HAVE_ARPA_INET_H 1

/* Define if you have the  header file.  */
#define HAVE_DIRENT_H 1

/* Define if you have the  header file.  */
#define HAVE_FCNTL_H 1

/* Define if you have the  header file.  */
#define HAVE_MEMORY_H 1

/* Define if you have the  header file.  */
/* #undef HAVE_NDIR_H */

/* Define if you have the  header file.  */
#define HAVE_NETINET_IN_H 1

/* Define if you have the  header file.  */
#define HAVE_SHADOW_H 1

/* Define if you have the  header file.  */
#define HAVE_STDLIB_H 1

/* Define if you have the  header file.  */
#define HAVE_STRING_H 1

/* Define if you have the  header file.  */
/* #undef HAVE_SYS_DIR_H */

/* Define if you have the  header file.  */
#define HAVE_SYS_FILE_H 1

/* Define if you have the  header file.  */
/* #undef HAVE_SYS_NDIR_H */

/* Define if you have the  header file.  */
#define HAVE_SYS_PARAM_H 1

/* Define if you have the  header file.  */
#define HAVE_SYS_SOCKET_H 1

/* Define if you have the  header file.  */
#define HAVE_SYS_TIME_H 1

/* Define if you have the  header file.  */
#define HAVE_SYSLOG_H 1

/* Define if you have the  header file.  */
#define HAVE_UNISTD_H 1

/* Define if you have the  header file.  */
#define HAVE_UTIME_H 1

/* Define if you have the crypt library (-lcrypt).  */
#define HAVE_LIBCRYPT 1

/* Name of package */
#define PACKAGE "vpopmail"

/* Version number of package */
#define VERSION "5.4.0-rc1"

/*  */
#define PS_COMMAND "ps axww"

/*  */
#define QMAILDIR "/var/qmail"

/*  */
#define QMAILNEWU "/var/qmail/bin/qmail-newu"

/*  */
#define QMAILINJECT "/var/qmail/bin/qmail-inject"

/*  */
#define QMAILNEWMRH "/var/qmail/bin/qmail-newmrh"

/*  */
#define VPOPUSER "vpopmail"

/*  */
#define VPOPGROUP "vchkpw"

/*  */
#define VPOPMAILDIR "/home/vpopmail"

/*  */
#define VPOPMAILUID 89

/*  */
#define VPOPMAILGID 89

/*  */
#define POP_AUTH_OPEN_REL

Re: [vchkpw] Error when vpopmail is autocreating a user - FOllowup

2004-01-07 Thread Tom Collins
On Jan 7, 2004, at 5:14 AM, Shane Chrisp wrote:
Ok, I have just tried going up to version 5.4.0-rc1 and it does the 
same
thing, so I rolled back to 5.3.27 + patches (5.3.28 basically) and all
works again properly.

This is what happens.

The system is creating a new dir called ¨ßB¨ßBopmail/ in the
/home/vpopmail/domains directory and then it creates the domains/
dir and the domain.com/ dir inside that and eventually the users
dir that needs to be created. So you end up with
/home/vpopmail/domains
/home/vpopmail/domains/user/
/home/vpopmail/domains/¨ßB¨ßBopmail/
/home/vpopmail/domains/¨ßB¨ßBopmail/domain.com/
/home/vpopmail/domains/¨ßB¨ßBopmail/domain.com/user
What were your configure options?  What does your config.h file look 
like?  This is very odd, and something that I haven't seen before.

What does /var/qmail/users/assign look like?  Do the directory names 
match the ones you just listed?

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/


[vchkpw] Error when vpopmail is autocreating a user - FOllowup

2004-01-07 Thread Shane Chrisp
Ok, I have just tried going up to version 5.4.0-rc1 and it does the same
thing, so I rolled back to 5.3.27 + patches (5.3.28 basically) and all
works again properly.

This is what happens.

The system is creating a new dir called ¨ßB¨ßBopmail/ in the 
/home/vpopmail/domains directory and then it creates the domains/
dir and the domain.com/ dir inside that and eventually the users
dir that needs to be created. So you end up with

/home/vpopmail/domains
/home/vpopmail/domains/user/
/home/vpopmail/domains/¨ßB¨ßBopmail/
/home/vpopmail/domains/¨ßB¨ßBopmail/domain.com/
/home/vpopmail/domains/¨ßB¨ßBopmail/domain.com/user

cheers
Shane

>-Original Message-
>From: Shane Chrisp [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, 7 January 2004 7:57 PM
>To: [EMAIL PROTECTED]
>Subject: [vchkpw] Error when vpopmail is autocreating a user
>
><[EMAIL PROTECTED]>:
>r_chown() : Failed to cd to directory
>¨ßB¨ßBopmail/domains/cwispy.com/testMessage rejected. Not 
>enough storage
>space in user's mailbox to accept message.
>can not open new email file errno=2
>file=èàBèàBopmail/domains/cwispy.com/test/Maildir/tmp/1073475
>995.7781.garf
>ield.2000cn.com.au,S=556
>
>
>The above error is being created when I send an email to the server to
>create the account. Notice the
>¨ßB¨ßBopmail/ part, this is being created where the users 
>normally are.
>
>Im just in the process of upgrading to rc1 and will report 
>what happens when
>ive got it installed.
>
>Shane 
>
>



Re: [vchkpw] Error when vpopmail is autocreating a user

2004-01-07 Thread Michael Bowe
Yes, Please let us know the result !

I tried that on my server (vpopmail-5.4-RC1) and it appeared to work OK

If there is a bug, I would be keen to fix it before 5.4 is marked stable.

Michael.

- Original Message - 
From: "Shane Chrisp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 07, 2004 10:57 PM
Subject: [vchkpw] Error when vpopmail is autocreating a user


<[EMAIL PROTECTED]>:
r_chown() : Failed to cd to directory
¨ßB¨ßBopmail/domains/cwispy.com/testMessage rejected. Not enough storage
space in user's mailbox to accept message.
can not open new email file errno=2
file=èàBèàBopmail/domains/cwispy.com/test/Maildir/tmp/1073475995.7781.garf
ield.2000cn.com.au,S=556


The above error is being created when I send an email to the server to
create the account. Notice the
¨ßB¨ßBopmail/ part, this is being created where the users normally are.

Im just in the process of upgrading to rc1 and will report what happens when
ive got it installed.

Shane




[vchkpw] Error when vpopmail is autocreating a user

2004-01-07 Thread Shane Chrisp
<[EMAIL PROTECTED]>:
r_chown() : Failed to cd to directory
¨ßB¨ßBopmail/domains/cwispy.com/testMessage rejected. Not enough storage
space in user's mailbox to accept message.
can not open new email file errno=2
file=èàBèàBopmail/domains/cwispy.com/test/Maildir/tmp/1073475995.7781.garf
ield.2000cn.com.au,S=556


The above error is being created when I send an email to the server to
create the account. Notice the
¨ßB¨ßBopmail/ part, this is being created where the users normally are.

Im just in the process of upgrading to rc1 and will report what happens when
ive got it installed.

Shane