/*
- * $Id: afp_config.c,v 1.22.6.9.2.1 2005-01-03 15:24:05 didg Exp $
+ * $Id: afp_config.c,v 1.22.6.9.2.2 2005-01-31 17:00:38 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
FILE *fp;
char buf[LINESIZE + 1], *p, have_option = 0;
struct afp_options options;
- AFPConfig *config, *first = NULL;
+ AFPConfig *config, *first = NULL; /* uninitialized, OK 310105 */
status_reset();
/* if config file doesn't exist, load defaults */
/*
- * $Id: auth.c,v 1.44.2.3.2.15.2.1 2005-01-11 20:58:42 didg Exp $
+ * $Id: auth.c,v 1.44.2.3.2.15.2.2 2005-01-31 17:00:41 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_int32_t tklen, tp;
- char *token;
+ char *token;
char *p;
*rbuflen = 0;
tklen = obj->sinfo.sessiontoken_len;
token = obj->sinfo.sessiontoken;
}
- type = 0;
break;
case 8: /* Panther Kerberos Token */
tklen = obj->sinfo.cryptedkey_len;
/*
- * $Id: directory.c,v 1.71.2.4.2.15.2.3 2004-12-07 03:23:48 didg Exp $
+ * $Id: directory.c,v 1.71.2.4.2.15.2.4 2005-01-31 17:00:43 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
u_int16_t bitmap = d_bitmap;
u_char finder_buf[32];
u_int32_t upriv;
- mode_t mpriv;
+ mode_t mpriv; /* uninitialized, OK 310105 */
u_int16_t upriv_bit = 0;
bit = 0;
/*
- * $Id: file.c,v 1.92.2.2.2.31.2.7 2005-01-30 20:56:20 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31.2.8 2005-01-31 17:00:55 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct extmap *em;
int bit, isad = 1, err = AFP_OK;
char *upath;
- u_char achar, *fdType, xyy[4];
+ u_char achar, *fdType, xyy[4]; /* uninitialized, OK 310105 */
u_int16_t ashort, bshort;
u_int32_t aint;
u_int32_t upriv;
/*
- * $Id: nfsquota.c,v 1.10.8.3 2004-05-12 21:21:48 didg Exp $
+ * $Id: nfsquota.c,v 1.10.8.3.2.1 2005-01-31 17:00:59 didg Exp $
*
* parts of this are lifted from the bsd quota program and are
* therefore under the following copyright:
#define GQR_RQUOTA getquota_rslt_u.gqr_rquota
#endif /* USE_OLD_RQUOTA */
-int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
+int getnfsquota(struct vol *vol, const int uid, const u_int32_t bsize,
struct dqblk *dqp)
{
/*
- * $Id: quota.c,v 1.22.8.11 2004-06-28 22:46:28 didg Exp $
+ * $Id: quota.c,v 1.22.8.11.2.1 2005-01-31 17:01:00 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#endif
int uquota_getvolspace( vol, bfree, btotal, bsize)
-const struct vol *vol;
+struct vol *vol;
VolSpace *bfree, *btotal;
const u_int32_t bsize;
{
/*
- * $Id: unix.h,v 1.12.2.1.2.6 2004-05-10 18:40:33 didg Exp $
+ * $Id: unix.h,v 1.12.2.1.2.6.2.1 2005-01-31 17:01:00 didg Exp $
*/
#ifndef AFPD_UNIX_H
#endif /* linux */
-extern int getnfsquota __P((const struct vol *, const int, const u_int32_t,
+extern int getnfsquota __P((struct vol *, const int, const u_int32_t,
struct dqblk *));
-extern int uquota_getvolspace __P((const struct vol *, VolSpace *, VolSpace *,
+extern int uquota_getvolspace __P((struct vol *, VolSpace *, VolSpace *,
const u_int32_t));
#endif /* NO_QUOTA_SUPPORT */
/*
- * $Id: config.c,v 1.13.6.5 2004-06-09 01:10:07 bfernhomberg Exp $
+ * $Id: config.c,v 1.13.6.5.2.1 2005-01-31 17:01:01 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
int router(), dontroute(), seed(), phase(), net(), addr(), zone(), noallmulti();
-static struct param {
+static const struct param {
char *p_name;
int (*p_func)();
} params[] = {
/*
- * $Id: main.c,v 1.17.8.6 2004-05-12 21:21:48 didg Exp $
+ * $Id: main.c,v 1.17.8.6.2.1 2005-01-31 17:01:04 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
struct sockaddr_at sat;
struct sigaction sv;
struct itimerval it;
+ sigset_t signal_set, old_set;
+
struct interface *iface;
int status;
struct atport *ap;
fd_set readfds;
- int i, mask, c;
+ int i, c;
SOCKLEN_T fromlen;
char *prog;
-;
while (( c = getopt( ac, av, "12qsdtf:P:v" )) != EOF ) {
switch ( c ) {
atalkd_exit( 1 );
}
+ sigemptyset( &signal_set );
+ sigaddset(&signal_set, SIGALRM);
+#if 0
+ /* don't block SIGTERM */
+ sigaddset(&signal_set, SIGTERM);
+#endif
+ sigaddset(&signal_set, SIGUSR1);
+
for (;;) {
readfds = fds;
if ( select( nfds, &readfds, NULL, NULL, NULL) < 0 ) {
iface->i_flags, ap->ap_port, ap->ap_fd );
bprint( Packet, c );
}
-#endif /* DEBUG */
-#ifdef __svr4__
- if ( sighold( SIGALRM ) || sighold( SIGUSR1 )) {
- LOG(log_error, logtype_atalkd, "sighold: %s", strerror(errno) );
+#endif
+ if (sigprocmask(SIG_BLOCK, &signal_set, &old_set) < 0) {
+ LOG(log_error, logtype_atalkd, "sigprocmask: %s", strerror(errno) );
atalkd_exit( 1 );
}
-#else /* __svr4__ */
- mask = sigsetmask( sigmask( SIGALRM ) |
- sigmask( SIGUSR1 ));
-#endif /* __svr4__ */
+
if (( *ap->ap_packet )( ap, &sat, Packet, c ) < 0) {
LOG(log_error, logtype_atalkd, "ap->ap_packet: %s", strerror(errno));
atalkd_exit(1);
#ifdef DEBUG
consistency();
-#endif /* DEBUG */
-#ifdef __svr4__
- if ( sigrelse( SIGUSR1 ) || sigrelse( SIGALRM )) {
- LOG(log_error, logtype_atalkd, "sigrelse: %s", strerror(errno) );
+#endif
+ if (sigprocmask(SIG_SETMASK, &old_set, NULL) < 0) {
+ LOG(log_error, logtype_atalkd, "sigprocmask old set: %s", strerror(errno) );
atalkd_exit( 1 );
}
-#else /* __svr4__ */
- sigsetmask( mask );
-#endif /* __svr4__ */
+
}
}
}
/*
- * $Id: main.c,v 1.1.4.10.2.2 2004-12-21 13:36:12 didg Exp $
+ * $Id: main.c,v 1.1.4.10.2.3 2005-01-31 17:01:05 didg Exp $
*
* Copyright (C) Joerg Lenneis 2003
* All Rights Reserved. See COPYING.
break;
default:
LOG(log_error, logtype_cnid, "loop: unknow op %d", rqst.op);
+ ret = -1;
break;
}
/*
- * $Id: ppd.c,v 1.9.8.1 2004-06-09 01:25:54 bfernhomberg Exp $
+ * $Id: ppd.c,v 1.9.8.1.2.1 2005-01-31 17:01:07 didg Exp $
*
* Copyright (c) 1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
size_t bufsize;
FILE *stream;
{
- char p;
+ char p; /* uninitialized, OK 310105 */
size_t count = 0;
while (count < bufsize && EOF != (p=fgetc(stream))) {
/*
- * $Id: session.c,v 1.14.8.1 2004-02-07 19:46:08 didg Exp $
+ * $Id: session.c,v 1.14.8.1.2.1 2005-01-31 17:01:07 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
char cbuf[ 578 ];
int i, cc, timeout = 0, readpending = 0;
u_int16_t seq = 0, rseq = 1, netseq;
- u_char readport;
+ u_char readport; /* uninitialized, OK 310105 */
infile.pf_state = PF_BOT;
infile.pf_bufsize = 0;
/*
- * $Id: atp_sresp.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: atp_sresp.c,v 1.4.16.1 2005-01-31 17:01:14 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
int i;
u_int8_t ctrlinfo;
struct atpbuf *resp_buf;
- struct atpbuf *save_buf;
+ struct atpbuf *save_buf; /* uninitialized, OK 310105 */
#ifdef EBUG
atp_print_bufuse( ah, "atp_sresp" );
/*
- * $Id: cnid.c,v 1.1.4.11.2.1 2005-01-30 20:56:22 didg Exp $
+ * $Id: cnid.c,v 1.1.4.11.2.2 2005-01-31 17:01:16 didg Exp $
*
* Copyright (c) 2003 the Netatalk Team
* Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
struct _cnid_db *db;
cnid_module *mod = NULL;
struct list_head *ptr;
- uid_t uid;
+ uid_t uid; /* uninitialized, OK 310105 */
gid_t gid;
list_for_each(ptr, &modules) {
/*
- * $Id: cnid_tdb_add.c,v 1.1.2.1.2.1 2005-01-30 20:56:23 didg Exp $
+ * $Id: cnid_tdb_add.c,v 1.1.2.1.2.2 2005-01-31 17:01:16 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
static int add_cnid (struct _cnid_tdb_private *db, TDB_DATA *key, TDB_DATA *data) {
TDB_DATA altkey, altdata;
- int rc;
memset(&altkey, 0, sizeof(altkey));
memset(&altdata, 0, sizeof(altdata));
return 0;
abort:
- return rc;
+ return -1;
}
/* ----------------------- */