delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/05/15:00:34

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=faq5CvNBaFNzKhc4LU/sJl5aCupEi1CldeytFc/PINsNFE5da928P
1TJjwUW/viwAr9jmqPe+v0V/WJNr0FXaoj9V120BnzrBOcSmQQD8B7ek44W4k8V7
JzIBc05jlI7XWL/ylis0toDOLjdMM3Xc/p5At7Bq4etc77/oEmfqio=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=fkGlpw51uW5wznGNDgsvV5xZkyg=; b=D2L6exjZs5PrbgnlGEWLiHR3jxu5
xdJTivKmku8+Sxu3OnWAZK024m9Y0gSID8+Cx9hulY1X3KSGD6pR3B7FPfIEYeKf
Jo0RYuq57LcMdMhd+YMRu98IhKaEmmOUM56GHeVvFqYtuWUougx/N45kXS8U/84c
JoJBc6NC87/S98E=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Tue, 5 Aug 2014 21:00:14 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: syslog function: Bad file descriptor
Message-ID: <20140805190014.GD13601@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <53E10628 DOT 3C42FD6F AT boland DOT nl> <20140805164842 DOT GA13601 AT calimero DOT vinschen DOT de> <53E117B7 DOT 4C81186A AT boland DOT nl>
MIME-Version: 1.0
In-Reply-To: <53E117B7.4C81186A@boland.nl>
User-Agent: Mutt/1.5.23 (2014-03-12)

--eqp4TxRxnD4KrmFZ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug  5 19:43, D. Boland wrote:
> Corinna Vinschen wrote:
> > > Somehow the two are connected. The alias database (aliases.db) is bui=
lt from a plain
> > > text file (aliases). If I leave the aliases file writable to the send=
mail user, I
> > > find that the error message strings have been put right into the alia=
s text-file:
> > >
> > > $ cat /etc/mail/aliases
> > > <21>sendmail: PID 1848: alias database /etc/mail/aliases rebuilt by s=
mmspsenet: root
> > > news: root
> > > webmaster: root
> > > www: root
> > > ftp: root
> > > abuse: root
> > > noc: root
> > > security: root
> > > root: SYSTEM
> > > <22>sendmail: PID 1848: /etc/mail/aliases: 9 aliases, longest 6 bytes=
, 82 bytes
> > > total
> > >
> > > If I make the 'aliases' file read-only, then the file is not corrupte=
d, but the
> > > error occurs.
> >=20
> > I don't see that this has to do with syslog.  There's a writev to fd 3,
> > but you stripped the strace so we don't know what fd 3 is connected to.
> > Also, syslog writes the output to the Windows event log by default,
> > unless you have a syslog daemon running, connected to /dev/log.
> >=20
> > So I guess we first have to know what fd 3 is connected to, and then
> > how to reproduce the issue.
> >=20
>=20
> I have the syslogd (inetutils-server package) running as a Windows Servic=
e, using
> cygrunsrv.
>=20
> I attached the complete strace output. The 'syslog' function works fine w=
hile
> running as the cyg_server user, but after a setuid/setgid to the Sendmail=
 'smmsp'
> user, it fails.
>=20
> The output is quite large. I put in printf("syslog: %s\n") calls to mark =
the spots
> where it happens.

Can you produce another strace for the overwriting case (non-R/O aliases)
for comparison?  Also, can you do the same strace with no syslogd running?

It might be necessary to create a few test versions of Cygwin with more
debug output, but let's please see these straces first.


Thanks,
Corinna

--eqp4TxRxnD4KrmFZ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJT4Sm+AAoJEPU2Bp2uRE+geHUP/jTkDxHGpnlfpXQxhkOeaC/C
y5aDrnrNAq87pie6/lmLgu5R5VrSFjUVtnSE9cGS6hpvG04tJePoBjo/Y0WUIVhA
ZZaaRWvD7K8Q7hakcqn1o08+ElAq59KZSO+d7oaX7viJobY6RV98uqIdtaXVWFya
+jQ3pDhxhapJLI25W/D/KGxgOdd9+lIyEBp1nE6ZxYSneX9ncwCQXhT4nLGjiQhn
ftKGRWLD5B/qXsiUzpXKQ4cKiFgUVJqdWtfkV9dZFKVf2YnoBN4tPnJ9zCw2XfiZ
zZ9V+exK9qpw/XVInlG//J63s9rWH6LC5I+ZnIE2r12z1FHG77yqCPFGKK9iEjKs
mKWJfCyBJQWB61+DfJGP1N2Xp6J1O8d1Uat4+fiiHZJXh9MTzCAYhyV9MdJKr+LJ
8Y0aegy8TRBxtxH/RujebLNSF5AufnGvttTJzfAwcFxNNufwaTfK6bcjQoHHbF7m
8SLWEaoHo6RuR3STqnsx024aFQCs8Appe9xC9iObphGnC0OuOay1QWdqQzo0ByRs
VpQXpOGTnSfxKgc3Ey3CFB4t9WFXhdSfG3zCLNaA/ZlimyP2ZXOy0jUOCrA1sphs
hNo1Q38kpNNkzdtq+qsbuMPdmZZdPOJTVanP6vVPoWjPV8bnK0e1wzKYRPVxAmzG
NFn+XgLMBN8VWvCgd0ZH
=UAXU
-----END PGP SIGNATURE-----

--eqp4TxRxnD4KrmFZ--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019