From: HAT Date: Thu, 10 Apr 2014 13:36:01 +0000 (+0900) Subject: add pwent->pw_dir to logmessage. X-Git-Url: https://arthur.barton.de/gitweb/?p=netatalk.git;a=commitdiff_plain;h=82bc6e2da0b5106ebe0532a54f93e749165bf765 add pwent->pw_dir to logmessage. inspired by Bug #557 --- diff --git a/libatalk/util/netatalk_conf.c b/libatalk/util/netatalk_conf.c index 4b4bcf6b..5e429a2d 100644 --- a/libatalk/util/netatalk_conf.c +++ b/libatalk/util/netatalk_conf.c @@ -1057,12 +1057,17 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent) || strcmp(obj->username, obj->options.guest) == 0) /* not an AFP session, but cnid daemon, dbd or ad util, or guest login */ continue; - if (pwent->pw_dir == NULL || STRCMP("", ==, pwent->pw_dir)) - /* no user home */ + if (pwent->pw_dir == NULL || STRCMP("", ==, pwent->pw_dir)) { + LOG(log_debug, logtype_afpd, "readvolfile: pwent->pw_dir: NULL or \"\" - no user home"); continue; + } + LOG(log_debug, logtype_afpd, "readvolfile: pwent->pw_dir: '%s'", pwent->pw_dir); - if ((realpath(pwent->pw_dir, tmp)) == NULL) + if ((realpath(pwent->pw_dir, tmp)) == NULL) { + LOG(log_debug, logtype_afpd, "readvolfile: Cannot get realpath '%s' (%s).", pwent->pw_dir, strerror(errno)); continue; + } + LOG(log_debug, logtype_afpd, "readvolfile: realpath pwent->pw_dir: '%s'", tmp); /* check if user home matches our "basedir regex" */ if ((basedir = atalk_iniparser_getstring(obj->iniconfig, INISEC_HOMES, "basedir regex", NULL)) == NULL) {