From: morgana Date: Wed, 25 Apr 2001 16:06:08 +0000 (+0000) Subject: Changed some LOG_ERR's to LOG_DEBUG's in setdirowner function. When the chown fails... X-Git-Tag: netatalk-1-5-rc1~452 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=12bf2845b3899c8e6d3dd990ca910e3a425a7810 Changed some LOG_ERR's to LOG_DEBUG's in setdirowner function. When the chown fails, it is a "soft error" which does not need to be reported at the syslog LOG_ERR level. We were scaring off some users with these errors. --- diff --git a/etc/afpd/unix.c b/etc/afpd/unix.c index d8378f63..33b1a1c5 100644 --- a/etc/afpd/unix.c +++ b/etc/afpd/unix.c @@ -488,7 +488,7 @@ int setdirowner( uid, gid, noadouble ) } if (( st.st_mode & S_IFMT ) == S_IFREG ) { if ( chown( dirp->d_name, uid, gid ) < 0 ) { - syslog( LOG_ERR, "setdirowner: chown %s: %m", dirp->d_name ); + syslog( LOG_DEBUG, "setdirowner: chown %s: %m", dirp->d_name ); /* return ( -1 ); Sometimes this is okay */ } } @@ -510,7 +510,7 @@ int setdirowner( uid, gid, noadouble ) *m = '\0'; strcat( buf, dirp->d_name ); if ( chown( buf, uid, gid ) < 0 ) { - syslog( LOG_ERR, "setdirowner: chown %d/%d %s: %m", + syslog( LOG_DEBUG, "setdirowner: chown %d/%d %s: %m", uid, gid, buf ); /* return ( -1 ); Sometimes this is okay */ } @@ -525,7 +525,7 @@ int setdirowner( uid, gid, noadouble ) return( -1 ); } if ( gid && gid != st.st_gid && chown( ".AppleDouble", uid, gid ) < 0 ) { - syslog( LOG_ERR, "setdirowner: chown %d/%d .AppleDouble: %m", + syslog( LOG_DEBUG, "setdirowner: chown %d/%d .AppleDouble: %m", uid, gid); /* return ( -1 ); Sometimes this is okay */ } @@ -535,7 +535,7 @@ setdirowner_noadouble: return( -1 ); } if ( gid && gid != st.st_gid && chown( ".", uid, gid ) < 0 ) { - syslog( LOG_ERR, "setdirowner: chown %d/%d .: %m", + syslog( LOG_DEBUG, "setdirowner: chown %d/%d .: %m", uid, gid); }