Re: Netatalk 1.4b2 on Solaris 2.5.1


Subject: Re: Netatalk 1.4b2 on Solaris 2.5.1
From: wesley.craig@umich.edu
Date: Mon Jun 16 1997 - 10:28:37 EDT


> From: Marc Lavallée <marc@mtl-ciconf.nfb.onf.ca>
> To: netatalk-admins@umich.edu

> I tried so I know it won't help. Just get back to 1.3.3 if you're on Linux or
> mess with CAP if you're on Solaris. If you have money and no time to loose a
> better solution would be to get KAShare.

Presuming it's a group permission problem, 1.3.3 handles them worse
than 1.4b2. The final release of 1.4 will not pass on any error that
chown() generates. As a matter of fact, you can verify that this is
your problem, by editing etc/afpd/unix.c and removing the return(-1)s
that follow the few chowns in setdirown(). Once you've done that, the
only way a chown() (or other group ownership problem) will give you
errors, is when the Mac specifically checks.

:wes

Actually, since the diff is small, find it below...

*** etc/afpd/unix.c- Tue Oct 1 15:26:52 1996
--- etc/afpd/unix.c Fri Mar 14 14:52:16 1997
***************
*** 633,639 ****
      closedir( dir );
  
      /*
! * We cheat: we know that chown doesn't do anything.
       */
      if ( stat( ".AppleDouble", &st ) < 0 ) {
          syslog( LOG_ERR, "setdirowner: stat .AppleDouble: %m" );
--- 633,641 ----
      closedir( dir );
  
      /*
! * We cheat when we know that chown doesn't do anything.
! * Ignore these errors, there are cases where the Mac tries to
! * set the group and it's just not possible.
       */
      if ( stat( ".AppleDouble", &st ) < 0 ) {
          syslog( LOG_ERR, "setdirowner: stat .AppleDouble: %m" );
***************
*** 640,646 ****
          return( -1 );
      }
      if ( gid && gid != st.st_gid && chown( ".AppleDouble", uid, gid ) < 0 ) {
! return( -1 );
      }
  
      if ( stat( ".", &st ) < 0 ) {
--- 642,649 ----
          return( -1 );
      }
      if ( gid && gid != st.st_gid && chown( ".AppleDouble", uid, gid ) < 0 ) {
! syslog( LOG_DEBUG, "setdirowner: chown %d/%d %s: %m",
! uid, gid, ".AppleDouble" );
      }
  
      if ( stat( ".", &st ) < 0 ) {
***************
*** 647,653 ****
          return( -1 );
      }
      if ( gid && gid != st.st_gid && chown( ".", uid, gid ) < 0 ) {
! return( -1 );
      }
  
      return( 0 );
--- 650,657 ----
          return( -1 );
      }
      if ( gid && gid != st.st_gid && chown( ".", uid, gid ) < 0 ) {
! syslog( LOG_DEBUG, "setdirowner: chown %d/%d %s: %m",
! uid, gid, "." );
      }
  
      return( 0 );



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:24:58 EST