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='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=18(system) gid=544(Administrators) groups=544(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 > owner("SYSTEM"); > group("root"); > perm(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 = 0; if (*user) return FALSE; pw = getpwnam(user); if (pw) { *uid = pw->pw_uid; } else { gchar *endptr; *uid = 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/