]> arthur.barton.de Git - netatalk.git/commitdiff
merged patch #416371 from Heath Kehoe (hkehoe@users.sourceforge.net),
authorrufustfirefly <rufustfirefly>
Mon, 16 Apr 2001 17:49:49 +0000 (17:49 +0000)
committerrufustfirefly <rufustfirefly>
Mon, 16 Apr 2001 17:49:49 +0000 (17:49 +0000)
fixing OSX problems, byteorder issue in etc/afpd/directory.c, and the
superfluous error messages in etc/uams/uams_dhx_pam.c

ChangeLog
etc/afpd/directory.c
etc/afpd/messages.c
etc/uams/uams_dhx_pam.c

index 275907c7212be45ddc7046a4dbd201d5fb5104d9..1491e83aa682140d4de02ee186a4e4320287a84f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
 
+2001-04-16  jeff b  <jeff@univrel.pr.uconn.edu>  
+
+       * etc/afpd/directory.c, etc/afpd/messages.c, etc/uams/uams_dhx_pam.c:
+       merged patch from Heath Kehoe <hkehoe@users.sourceforge.net> #416371,
+       fixing an OSX issue, byteorder problems with uid/gid in directory.c,
+       and fixing the syslog()'s in uams_dhx_pam.c to not produce useless
+       errors
+
 2001-04-12  jeff b  <jeff@univrel.pr.uconn.edu>  
 
        Released 1.5pre6
index 92c4f549bafcb8c69a59347481bf329f0a91c18b..0d774acc49a98edc31f375ae2f597e9adb24a598 100644 (file)
@@ -943,13 +943,13 @@ int getdirparams(vol, bitmap, upath, dir, st, buf, buflen )
            break;
 
        case DIRPBIT_UID :
-           aint = st->st_uid;
+           aint = htonl(st->st_uid);
            memcpy( data, &aint, sizeof( aint ));
            data += sizeof( aint );
            break;
 
        case DIRPBIT_GID :
-           aint = st->st_gid;
+           aint = htonl(st->st_gid);
            memcpy( data, &aint, sizeof( aint ));
            data += sizeof( aint );
            break;
@@ -1188,7 +1188,7 @@ int setdirparams(vol, path, bitmap, buf )
            memcpy( &aint, buf, sizeof(aint));
            buf += sizeof( aint );
            if ( (curdir->d_did == DIRDID_ROOT) &&
-                (setdeskowner( aint, -1 ) < 0)) {
+                (setdeskowner( ntohl(aint), -1 ) < 0)) {
                switch ( errno ) {
                case EPERM :
                case EACCES :
@@ -1208,7 +1208,7 @@ int setdirparams(vol, path, bitmap, buf )
                    break;
                }
            }
-           if ( setdirowner( aint, -1, vol_noadouble(vol) ) < 0 ) {
+           if ( setdirowner( ntohl(aint), -1, vol_noadouble(vol) ) < 0 ) {
                switch ( errno ) {
                case EPERM :
                case EACCES :
@@ -1225,12 +1225,11 @@ int setdirparams(vol, path, bitmap, buf )
                }
            }
            break;
-
        case DIRPBIT_GID :
            memcpy( &aint, buf, sizeof( aint ));
            buf += sizeof( aint );
            if (curdir->d_did == DIRDID_ROOT)
-             setdeskowner( -1, aint );
+             setdeskowner( -1, ntohl(aint) );
 
 #if 0       /* don't error if we can't set the desktop owner. */
                switch ( errno ) {
@@ -1253,7 +1252,7 @@ int setdirparams(vol, path, bitmap, buf )
                }
 #endif
 
-           if ( setdirowner( -1, aint, vol_noadouble(vol) ) < 0 ) {
+           if ( setdirowner( -1, ntohl(aint), vol_noadouble(vol) ) < 0 ) {
                switch ( errno ) {
                case EPERM :
                case EACCES :
index aa04ecb2dc80541da48e70f839d18cee0e6a0fe7..837c3b5e72dfd0ddf7eb72a9872fe308c25848c9 100644 (file)
@@ -115,9 +115,6 @@ int afp_getsrvrmesg(obj, ibuf, ibuflen, rbuf, rbuflen)
     return AFPERR_BITMAP;
   }
 
-  if(strlen(message)==0)
-    return AFP_OK;
-
   /* output format:
    * message type:   2 bytes
    * bitmap:         2 bytes
index 62969d66b357277684e80f00843f39dc427a504b..084f4e271ce219af204a5ab05c619b0a3a5d55f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_dhx_pam.c,v 1.13 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_dhx_pam.c,v 1.14 2001-04-16 17:49:49 rufustfirefly Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -19,6 +19,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
+#include <errno.h>
 
 #include <security/pam_appl.h>
 
@@ -78,6 +79,8 @@ static int PAM_conv (int num_msg,
   
 #define COPY_STRING(s) (s) ? strdup(s) : NULL
   
+  errno = 0;
+
   if (num_msg < 1) {
     /* Log Entry */
            syslog(LOG_INFO, "uams_dhx_pam.c :PAM DHX Conversation Err -- %m");
@@ -454,7 +457,7 @@ static int pam_logincont(void *obj, struct passwd **uam_pwd,
     memset(rbuf, 0, PASSWDLEN); /* zero out the password */
     *uam_pwd = dhxpwd;
     /* Log Entry */
-           syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM Auth OK!: %s -- %m", AFP_OK);
+           syslog(LOG_INFO, "uams_dhx_pam.c :PAM: PAM Auth OK!");
     /* Log Entry */
     return AFP_OK;