X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_64,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: <20090319182945 DOT GA9322 AT calimero DOT vinschen DOT de> Date: Fri, 20 Mar 2009 14:39:01 +0000 Message-ID: Subject: Re: syslog-ng: some packaging glitches From: Julio Emanuel To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Thu, Mar 19, 2009 at 23:49, Julio Emanuel wrote: > On Thu, Mar 19, 2009 at 18:29, Corinna Vinschen wrote: >> >>> Now, for the part I didn't manage to solve yet: the syslog-ng service >>> also spits this warning (error?) when starting: "Error resolving user; >>> user=3D'system'", but I have the 'vanilla' system entry in /etc/passwd: >>> ~ $ grep system /etc/passwd >>> system:*:18:544:,S-1-5-18:: >>> and indeed all does seem well: >>> ~ $ id system >>> uid=3D18(system) gid=3D544(Administrators) groups=3D544(Administrators) >>> >>> Is it any misleading message, maybe? >> >> Is the /etc/syslog-ng.conf file owned by the system user? >> > > ~ $ ls -l /etc/syslog-ng.conf > -rw-r--r--+ 1 security Domain Users 1171 Mar 19 16:07 /etc/syslog-ng.conf > > No it isn't. it is owned by an admin user named 'security' . Should be > owned by system? > Note that the default config contains the lines > =C2=A0owner("SYSTEM"); > =C2=A0group("root"); > =C2=A0perm(0660); > that defines the default ownership and mode of created files. > But this IS working: > ~ $ ls -l /var/log/*messages > -rw-rw---- 1 system root 1854 Mar 19 23:28 /var/log/20090319_messages > > And so this error message (from /var/log/syslog-ng.log) seems to be > misleading... > Is there anything I can do to help hunting down the root cause (if > there is a need to do so)? > Answering to myself: after some source code analysis, I've arrived to this tiny function in misc.c: gboolean resolve_user(const char *user, uid_t *uid) { struct passwd *pw; *uid =3D 0; if (*user) return FALSE; pw =3D getpwnam(user); if (pw) { *uid =3D pw->pw_uid; } else { gchar *endptr; *uid =3D strtol(user, &endptr, 0); if (*endptr) return FALSE; } return TRUE; } Now, it's been some time that I coded something in C, but I could bet that first if should be "if (!*user)" - notice the NOT... Because that's precisely the trigger (this function returning FALSE) needed to generate the error message I've been seeing. Now the mistery part is: how come this is even working, at least in cygwin?= :) Can anybody confirm my findings, please? _________ Julio Costa -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/