/*
- * $Id: auth.c,v 1.44.2.3.2.2 2003-09-12 06:53:18 bfernhomberg Exp $
+ * $Id: auth.c,v 1.44.2.3.2.3 2003-09-25 12:23:53 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
u_int32_t idlen = 0;
u_int32_t boottime;
- u_int16_t tklen; /* FIXME: spec u_int32_t? */
+ u_int16_t tklen, tp; /* FIXME: spec u_int32_t? */
pid_t token;
char *p;
rbuf += sizeof(type);
*rbuflen += sizeof(tklen);
- tklen = htons(sizeof(pid_t));
- memcpy(rbuf, &tklen, sizeof(tklen));
+
+ /* use at least 8 bytes for token as OSX, don't know if it helps */
+ tklen = sizeof(pid_t);
+ if (tklen < 8)
+ tklen = 8;
+
+ tp = htons(tklen);
+ memcpy(rbuf, &tp, sizeof(tklen));
rbuf += sizeof(tklen);
-
- *rbuflen += sizeof(pid_t);
+
+ *rbuflen += tklen;
+ memset(rbuf, 0, tklen);
token = getpid();
memcpy(rbuf, &token, sizeof(pid_t));
return AFP_OK;
/*
- * $Id: volume.c,v 1.51.2.7.2.3 2003-09-21 09:25:17 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.4 2003-09-25 12:23:53 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#endif /* ! NO_LARGE_VOL_SUPPORT */
static struct vol *Volumes = NULL;
-static int lastvid = 0;
+static u_int16_t lastvid = 0;
static char *Trash = "\02\024Network Trash Folder";
static struct extmap *Extmap = NULL, *Defextmap = NULL;
#ifdef __svr4__
volume->v_qfd = -1;
#endif /* __svr4__ */
- volume->v_vid = lastvid++;
+ /* os X start at 1 and use network order ie. 1 2 3 */
+ volume->v_vid = ++lastvid;
+ volume->v_vid = htons(volume->v_vid);
/* handle options */
if (options) {