-($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
/*
+ * $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>
#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);
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,
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);
#ifdef DEBUG
syslog(LOG_INFO, "begin afp_getfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
*rbuflen = 0;
ibuf += 2;
#ifdef DEBUG
syslog(LOG_INFO, "end afp_getfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
return( AFP_OK );
}
#ifdef DEBUG
syslog(LOG_INFO, "begin afp_setfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
*rbuflen = 0;
ibuf += 2;
#ifdef DEBUG
syslog(LOG_INFO, "end afp_setfildirparams:");
-#endif DEBUG
+#endif /* DEBUG */
return( rc );
}
#ifdef DEBUG
syslog(LOG_INFO, "begin afp_rename:");
-#endif DEBUG
+#endif /* DEBUG */
*rbuflen = 0;
ibuf += 2;
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))
#ifdef DEBUG
syslog(LOG_INFO, "end afp_rename:");
-#endif DEBUG
+#endif /* DEBUG */
return( AFP_OK );
}
#ifdef DEBUG
syslog(LOG_INFO, "begin afp_delete:");
-#endif DEBUG
+#endif /* DEBUG */
*rbuflen = 0;
ibuf += 2;
#ifdef DEBUG
syslog(LOG_INFO, "end afp_delete:");
-#endif DEBUG
+#endif /* DEBUG */
return( rc );
}
#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;
return retvalue;
}
}
-#endif DROPKLUDGE
+#endif /* DROPKLUDGE */
if ( rc == AFP_OK ) {
#if AD_VERSION > AD_VERSION1
#ifdef DEBUG
syslog(LOG_INFO, "end afp_moveandrename:");
-#endif DEBUG
+#endif /* DEBUG */
return( rc );
}
/*
+ * $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>
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
} 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 );
}