]> arthur.barton.de Git - netatalk.git/commitdiff
dropkludge fixen
authorrufustfirefly <rufustfirefly>
Wed, 6 Jun 2001 19:04:24 +0000 (19:04 +0000)
committerrufustfirefly <rufustfirefly>
Wed, 6 Jun 2001 19:04:24 +0000 (19:04 +0000)
ChangeLog
etc/afpd/filedir.c
etc/afpd/unix.c

index 9206524bbc269e1a0bc74432d85350ac6f5d90b6..4821600ac7c1f8df88b3d532d90b642e926bf376 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-($Id: ChangeLog,v 1.42 2001-06-06 13:36:36 rufustfirefly Exp $)
+($Id: ChangeLog,v 1.43 2001-06-06 19:04:24 rufustfirefly Exp $)
+
+2001-06-06  jeff b  <jeff@univrel.pr.uconn.edu>
+       * etc/afpd/filedir.c, etc/afpd/unix.c: fixed dropkludge code
+       so that it properly compiles again, along with minor warning
+       fixen
 
 2001-06-05 Dan L. (pooba53)
        * Modified configure.in so references made to $ac_prefix_default
index 6f9877719e6f45ccd3e8c683ef0b09ddc280a9a6..4c000fcfc76838e75c73bd5a14c7d6a8a2b9e92d 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: filedir.c,v 1.9 2001-06-06 19:04:25 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <errno.h>
 #include <sys/syslog.h>
@@ -49,7 +51,7 @@ int matchfile2dirperms(upath, vol, did)
 
 #ifdef DEBUG
     syslog (LOG_INFO, "begin matchfile2dirperms:");
-#endif DEBUG
+#endif /* DEBUG */
 
     if (stat(upath, &st ) < 0)
       syslog(LOG_ERR, "Could not stat %s: %m", upath);
@@ -86,7 +88,7 @@ int matchfile2dirperms(upath, vol, did)
           else 
            syslog (LOG_INFO, 
              "matchfile2dirperms:  Added S_IRGRP and S_IROTH: %m");
-#endif DEBUG
+#endif /* DEBUG */
           if (lchown(adpath, sb.st_uid, sb.st_gid) < 0)
           {
            syslog (LOG_ERR, 
@@ -104,18 +106,18 @@ int matchfile2dirperms(upath, vol, did)
           else 
            syslog (LOG_INFO, 
              "matchfile2dirperms:  Added S_IRGRP and S_IROTH to AD: %m");
-#endif DEBUG
+#endif /* DEBUG */
        }
 #ifdef DEBUG
         else
          syslog (LOG_INFO, 
            "matchfile2dirperms: No ownership change necessary.");
-#endif DEBUG
+#endif /* DEBUG */
     } /* end else if stat success */
     seteuid(uid); /* Restore process ownership to normal */
 #ifdef DEBUG
     syslog (LOG_INFO, "end matchfile2dirperms:");
-#endif DEBUG
+#endif /* DEBUG */
 
     return (AFP_OK);
 
@@ -137,7 +139,7 @@ int afp_getfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "begin afp_getfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
 
     *rbuflen = 0;
     ibuf += 2;
@@ -197,7 +199,7 @@ int afp_getfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "end afp_getfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
 
     return( AFP_OK );
 }
@@ -216,7 +218,7 @@ int afp_setfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "begin afp_setfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
 
     *rbuflen = 0;
     ibuf += 2;
@@ -267,7 +269,7 @@ int afp_setfildirparams(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "end afp_setfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
 
     return( rc );
 }
@@ -292,7 +294,7 @@ int afp_rename(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "begin afp_rename:");
-#endif DEBUG
+#endif /* DEBUG */
 
     *rbuflen = 0;
     ibuf += 2;
@@ -338,7 +340,7 @@ int afp_rename(obj, ibuf, ibuflen, rbuf, rbuflen )
     if ( strcasecmp( path, ibuf ) == 0 ) {
        return( AFP_OK );
     }
-#endif notdef
+#endif /* notdef */
 
     /* if a curdir/newname ofork exists, return busy */
     if (of_findname(vol, curdir, ibuf))
@@ -446,7 +448,7 @@ out:
 
 #ifdef DEBUG
     syslog(LOG_INFO, "end afp_rename:");
-#endif DEBUG
+#endif /* DEBUG */
 
     return( AFP_OK );
 }
@@ -465,7 +467,7 @@ int afp_delete(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "begin afp_delete:");
-#endif DEBUG
+#endif /* DEBUG */ 
 
     *rbuflen = 0;
     ibuf += 2;
@@ -505,7 +507,7 @@ int afp_delete(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "end afp_delete:");
-#endif DEBUG
+#endif /* DEBUG */
 
     return( rc );
 }
@@ -558,10 +560,13 @@ int afp_moveandrename(obj, ibuf, ibuflen, rbuf, rbuflen )
 #if AD_VERSION > AD_VERSION1
     cnid_t      id;
 #endif
+#ifdef DROPKLUDGE
+    int                retvalue;
+#endif /* DROPKLUDGE */
 
 #ifdef DEBUG
     syslog(LOG_INFO, "begin afp_moveandrename:");
-#endif DEBUG
+#endif /* DEBUG */
 
     *rbuflen = 0;
     ibuf += 2;
@@ -679,7 +684,7 @@ int afp_moveandrename(obj, ibuf, ibuflen, rbuf, rbuflen )
            return retvalue;
         }
     }
-#endif DROPKLUDGE
+#endif /* DROPKLUDGE */
 
     if ( rc == AFP_OK ) {
 #if AD_VERSION > AD_VERSION1
@@ -695,7 +700,7 @@ int afp_moveandrename(obj, ibuf, ibuflen, rbuf, rbuflen )
 
 #ifdef DEBUG
     syslog(LOG_INFO, "end afp_moveandrename:");
-#endif DEBUG
+#endif /* DEBUG */
 
     return( rc );
 }
index ae1c7235f582842aba95747a0acf15e4e86aec89..acb6e23bce3c6aeb9d4dcb4e0d9c9b9697efdbf3 100644 (file)
@@ -1,11 +1,13 @@
 /*
+ * $Id: unix.c,v 1.18 2001-06-06 19:04:25 rufustfirefly Exp $
+ *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -212,7 +214,10 @@ inline int stickydirmode(name, mode, dropbox)
     const int dropbox;
 {
   int retval;
-
+#ifdef DROPKLUDGE
+  int uid;
+#endif /* DROPKLUDGE */
+  
 /* Turn on the sticky bit if this is a drop box, also turn off the setgid bit */
    retval=0;
 #ifdef DROPKLUDGE
@@ -230,12 +235,12 @@ inline int stickydirmode(name, mode, dropbox)
         } else {
 #ifdef DEBUG
            syslog( LOG_INFO, "stickydirmode: (debug) chmod \"%s\": %m", name );
-#endif
+#endif /* DEBUG */
            seteuid(uid);
         } /* end getting retval */
       } /* end if not & S_IROTH */
    } else { /* end if S_IWOTH and not S_IROTH */
-#endif DROPKLUDGE
+#endif /* DROPKLUDGE */
        if ( (retval=chmod( name, DIRBITS | mode )) < 0 )  {
           syslog( LOG_ERR, "stickydirmode: chmod \"%s\": %m", name );
        }