/*
- * $Id: desktop.c,v 1.7.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: desktop.c,v 1.7.2.2 2002-01-02 17:27:50 srittau Exp $
*
* See COPYRIGHT.
*/
char *mtoupath(const struct vol *vol, char *mpath)
{
- static unsigned char upath[ MAXPATHLEN + 1];
- unsigned char *m, *u;
+ static char upath[ MAXPATHLEN + 1];
+ char *m, *u;
int i = 0;
- if ( mpath == NULL || *mpath == '\0' ) {
+ if ( *mpath == '\0' ) {
return( "." );
}
#if 1
if (vol->v_mtoupage && ((*m & 0x80) ||
vol->v_flags & AFPVOL_MAPASCII)) {
- *u = vol->v_mtoupage->map[*m].value;
+ *u = vol->v_mtoupage->map[(unsigned char) *m].value;
} else
#endif /* 1 */
#if AD_VERSION == AD_VERSION1
char *utompath(const struct vol *vol, char *upath)
{
- static unsigned char mpath[ MAXPATHLEN + 1];
- unsigned char *m, *u;
- int h;
+ static char mpath[ MAXPATHLEN + 1];
+ char *m, *u;
+ int h;
/* do the hex conversion */
u = upath;
while ( *u != '\0' ) {
/* we have a code page */
#if 1
- if (vol->v_utompage && ((*u > 0x7F) ||
+ if (vol->v_utompage && ((*u & 0x80) ||
(vol->v_flags & AFPVOL_MAPASCII))) {
- *m = vol->v_utompage->map[*u].value;
+ *m = vol->v_utompage->map[(unsigned char) *u].value;
} else
#endif /* 1 */
if ( *u == ':' && *(u+1) != '\0' && islxdigit( *(u+1)) &&
/*
- * $Id: enumerate.c,v 1.9.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: enumerate.c,v 1.9.2.2 2002-01-02 17:27:50 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include "volume.h"
#include "globals.h"
#include "file.h"
+#include "filedir.h"
/* check for mtab DID code */
#ifdef DID_MTAB
/*
- * $Id: icon.h,v 1.2.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: icon.h,v 1.2.2.2 2002-01-02 17:27:50 srittau Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
};
#if defined( ultrix )
-const u_char icon[] = { /* declogo */
+const unsigned char icon[] = { /* declogo */
0x0, 0x80, 0x0, 0x0, 0x1, 0xC0, 0x0, 0x0,
0x3, 0xE0, 0x0, 0x0, 0x7, 0xF0, 0x0, 0x0,
0xF, 0xB0, 0x0, 0x0, 0x13, 0x6C, 0x0, 0x0,
#else
#if defined( vax )
-const u_char icon[] = { /* daemon */
+const unsigned char icon[] = { /* daemon */
0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x2, 0x0,
0x1, 0x80, 0x3, 0x0, 0x2, 0x80, 0x2, 0x80,
0x2, 0x80, 0x2, 0x80, 0x4, 0x80, 0x2, 0x40,
#else
#if defined( sun )
-const u_char icon[] = { /* sunlogo */
+const unsigned char icon[] = { /* sunlogo */
0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x80, 0x0,
0x0, 0x2, 0x40, 0x0, 0x0, 0x2, 0x20, 0x0,
0x0, 0x9, 0x10, 0x0, 0x0, 0x4, 0x88, 0x0,
#else
#if defined( _IBMR2 )
-const u_char icon[] = { /* hagar */
+const unsigned char icon[] = { /* hagar */
0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x0, 0x18,
0x24, 0x0, 0x0, 0x24, 0x44, 0x3, 0xC0, 0x22,
0x44, 0xC, 0x30, 0x22, 0x42, 0x30, 0xC, 0x42,
};
#else
-const u_char icon[] = { /* globe */
+const unsigned char icon[] = { /* globe */
0x0, 0x0, 0x0, 0x0, 0x0, 0xF, 0xF0, 0x0,
0x0, 0x30, 0xC, 0x0, 0x0, 0xC0, 0x3, 0x0,
0x1, 0x80, 0x3, 0x80, 0x3, 0xE2, 0x1F, 0xC0,
/*
- * $Id: main.c,v 1.12.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: main.c,v 1.12.2.2 2002-01-02 17:27:50 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
unsigned char nologin = 0;
+#ifdef DID_MTAB
+/* global mount table; afpd_st_cnid uses this to lookup the right entry. */
+static struct afpd_mount_table *afpd_mount_table = NULL;
+#endif /* DID_MTAB */
+
struct afp_options default_options;
static AFPConfig *configs;
static server_child *server_children;
/*
- * $Id: messages.c,v 1.9.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: messages.c,v 1.9.2.2 2002-01-02 17:27:50 srittau Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
uid_t euid;
i=0;
- // Construct file name SERVERTEXT/message.[pid]
+ /* Construct file name SERVERTEXT/message.[pid] */
filename=malloc(sizeof(SERVERTEXT)+15);
sprintf(filename, "%s/message.%d", SERVERTEXT, getpid());
/*
- * $Id: parse_mtab.c,v 1.4.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: parse_mtab.c,v 1.4.2.2 2002-01-02 17:27:50 srittau Exp $
*
* afpd_mtab_parse & support. -- rgr, 9-Apr-01.
*/
(lval) = malloc(1+strlen(str)), strcpy((lval), (str))
#endif /* COPY_STRING */
+/* global mount table; afpd_st_cnid uses this to lookup the right entry. */
+static struct afpd_mount_table *afpd_mount_table;
+
static int
ceil_log_2 __P((int n))
/* Return the number of bits required to represent n. Only works for
/*
- * $Id: parse_mtab.h,v 1.3.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: parse_mtab.h,v 1.3.2.2 2002-01-02 17:27:50 srittau Exp $
*
* header for afpd_mtab_parse, afpd_st_cnid
*/
entries may be null */
};
-/* global mount table; afpd_st_cnid uses this to lookup the right entry. */
-static struct afpd_mount_table *afpd_mount_table = NULL;
-
extern
unsigned int
afpd_st_cnid __P((struct stat *st));
/*
- * $Id: quota.c,v 1.11.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: quota.c,v 1.11.2.2 2002-01-02 17:27:50 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
/* STDC check */
#if STDC_HEADERS
}
if (( vol->v_gvs = (char *)malloc( strlen( p ) + 1 )) == NULL ) {
- syslog( LOG_ERR, "getquota: malloc: %m" );
+ syslog( LOG_ERR, "getquota: malloc: %s", strerror(errno) );
return AFPERR_MISC;
}
strcpy( vol->v_gvs, p );
}
#else /* ultrix */
if ( gettimeofday( &tv, 0 ) < 0 ) {
- syslog( LOG_ERR, "overquota: gettimeofday: %m" );
+ syslog( LOG_ERR, "overquota: gettimeofday: %s", strerror(errno) );
return( AFPERR_PARAM );
}
if ( !dqblk->dqb_btimelimit || dqblk->dqb_btimelimit > tv.tv_sec ) {
/*
- * $Id: status.c,v 1.4.2.1 2001-12-03 05:01:04 jmarcus Exp $
+ * $Id: status.c,v 1.4.2.2 2002-01-02 17:27:50 srittau Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
/* returns actual offset to signature */
-static void status_icon(char *data, const char *icondata,
+static void status_icon(char *data, const unsigned char *icondata,
const int iconlen, const int sigoffset)
{
char *start = data;