[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in pop3d/user.c
From: |
Sergey Poznyakoff |
Subject: |
bug in pop3d/user.c |
Date: |
Thu, 03 May 2001 16:49:44 +0300 |
The order of brackets in conditional on line 182 is wrong:
(status = mailbox_create_default (&mbox, arg) != 0)
actually yields either 0 or 1, i.e. ENOERROR or EPERM. Consequently
`if (errno == ENOENT)' on line 187 never works. The patch follows:
Index: pop3d/user.c
===================================================================
RCS file: /cvs/mailutils/pop3d/user.c,v
retrieving revision 1.13
diff -c -b -w -r1.13 user.c
*** pop3d/user.c 2001/05/02 04:45:12 1.13
--- pop3d/user.c 2001/05/03 13:38:31
***************
*** 176,183 ****
if (pw != NULL && pw->pw_uid > 1)
setuid (pw->pw_uid);
! if ((status = mailbox_create_default (&mbox, arg) != 0)
! || (status = mailbox_open (mbox, MU_STREAM_RDWR) != 0))
{
mailbox_destroy (&mbox);
/* For non existent mailbox, we fake. */
--- 179,186 ----
if (pw != NULL && pw->pw_uid > 1)
setuid (pw->pw_uid);
! if ((status = mailbox_create_default (&mbox, arg))!= 0
! || (status = mailbox_open (mbox, MU_STREAM_RDWR))!= 0 )
{
mailbox_destroy (&mbox);
/* For non existent mailbox, we fake. */
Cheers,
Sergey
- bug in pop3d/user.c,
Sergey Poznyakoff <=