dovecot-1.2: eaccess_error_get(): If UID/GID doesn't have name, ...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 16 22:36:48 EEST 2010


details:   http://hg.dovecot.org/dovecot-1.2/rev/be169f7464de
changeset: 9599:be169f7464de
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 16 20:36:44 2010 +0100
description:
eaccess_error_get(): If UID/GID doesn't have name, show it as <unknown>

diffstat:

 src/lib/eacces-error.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 2281223b9cb9 -r be169f7464de src/lib/eacces-error.c
--- a/src/lib/eacces-error.c	Tue Aug 10 15:19:04 2010 +0100
+++ b/src/lib/eacces-error.c	Mon Aug 16 20:36:44 2010 +0100
@@ -105,11 +105,15 @@
 	pw = getpwuid(geteuid());
 	if (pw != NULL)
 		str_printfa(errmsg, "(%s)", pw->pw_name);
+	else
+		str_append(errmsg, "(<unknown>)");
 
 	str_printfa(errmsg, " egid=%s", dec2str(getegid()));
 	group = getgrgid(getegid());
 	if (group != NULL)
 		str_printfa(errmsg, "(%s)", group->gr_name);
+	else
+		str_append(errmsg, "(<unknown>)");
 
 	dir = "/";
 	while ((p = strrchr(prev_path, '/')) != NULL) {


More information about the dovecot-cvs mailing list