Ping? On Mar 25 17:18, Corinna Vinschen wrote:
Hi,
a Cygwin user got a message in the syslog every time the syslog-ng service started up:
Error resolving user; user='system'
He also found why this message was generated. The function resolve_user() in misc.c appears to have a typo. If the incoming user argument points to a non-empty string, resolve_user() just returns NULL. So, the following getpwnam is only called for an empty user string. This looks like a typo.
One possible fix below. However, maybe the intention was actually to test for
if (!user)
instead of
if (!*user)
???
Corinna
--- src/misc.c.ORIG 2009-03-25 17:01:15.000000000 +0100 +++ src/misc.c 2009-03-25 17:01:29.000000000 +0100 @@ -274,7 +274,7 @@ resolve_user(const char *user, uid_t *ui struct passwd *pw;
*uid = 0; - if (*user) + if (!*user) return FALSE;
pw = getpwnam(user);