Your message dated Wed, 21 Jun 2006 18:10:42 +0200
with message-id <[EMAIL PROTECTED]>
has caused the Debian Bug report #374705,
regarding adduser: creates incorrect mail spool files during new installation
to be marked as having been forwarded to the upstream software
author(s) Tomasz Kłoczko <[EMAIL PROTECTED]>.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Tomasz, you probably already saw this contribution by Stephen Gran
about http://bugs.debian.org/374705 (see the whole story there: as
this bug was reassigned to shadow we didn't have the originating bug
report in our mailing list).

Just sending this directly to you to properly record the "forwarded"
status in our BTS...and also to get attention..:-)

The bug seems related to the following change which appeared in 4.0.16
for you, but which we applied in 4.0.15-10 in Debian:

  * Upstream bugs or fixes fixed in upstream releases or CVS:
    - Fix for CERT VU#312962
      + check the return value of fchown before fchmod when the mailbox is
        created by useradd


----- Forwarded message from Stephen Gran <[EMAIL PROTECTED]> -----

Date: Wed, 21 Jun 2006 10:55:36 +0100
From: Stephen Gran <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [Pkg-shadow-devel] Bug#374705: tentative patch
Reply-To: Stephen Gran <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
X-CRM114-Status: SPAM  ( pR: -7.2743 )

Hey all,

I think I might have found the problem.  The mail spool is open()ed, and
then the fd is checked to see if there is an error (as is proper).  The
problem is, the fchown/fchmod calls happen in the same logic path as
error handling, not in an else block.  The attached patch should fix it.

I have to note in passing, though, that I had to change the line

if (strcasecmp (create_mail_spool, "yes") == 0) {

to 

if (strcasecmp (def_create_mail_spool, "yes") == 0) {

to even enter this block in the first place - is there an incomplete
variable name transition, or am I doing something wrong?

--- src/useradd.c~      2006-06-21 10:51:01.000000000 +0100
+++ src/useradd.c       2006-06-21 10:51:17.000000000 +0100
@@ -1599,6 +1599,7 @@
                if (fd < 0) {
                        perror (_("Creating mailbox file"));
                        return;
+               } else {

                        gr = getgrnam ("mail");
                        if (!gr) {

Take care,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------



_______________________________________________
Pkg-shadow-devel mailing list
[EMAIL PROTECTED]
http://lists.alioth.debian.org/mailman/listinfo/pkg-shadow-devel


----- End forwarded message -----


--- End Message ---

Reply via email to