Re-integrate most changes done to amd in its old location (mostly
FORMAT_AUDIT related, and nits). (Thanks for the reminder, Jason!)
This commit is contained in:
parent
2f1e131332
commit
fb6c42da67
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: amd.c,v 1.1.1.2 2000/11/19 23:43:33 wiz Exp $ */
|
||||
/* $NetBSD: amd.c,v 1.2 2000/11/20 03:19:33 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -478,7 +478,7 @@ main(int argc, char *argv[])
|
|||
verstr = strtok(get_version_string(), "\n");
|
||||
plog(XLOG_INFO, "AM-UTILS VERSION INFORMATION:");
|
||||
while (verstr) {
|
||||
plog(XLOG_INFO, verstr);
|
||||
plog(XLOG_INFO, "%s", verstr);
|
||||
verstr = strtok(NULL, "\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: opts.c,v 1.1.1.2 2000/11/19 23:43:41 wiz Exp $ */
|
||||
/* $NetBSD: opts.c,v 1.2 2000/11/20 03:19:34 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -872,7 +872,7 @@ normalize_slash(char *p)
|
|||
static void
|
||||
expand_op(opt_apply *p, int sel_p)
|
||||
{
|
||||
static char expand_error[] = "No space to expand \"%s\"";
|
||||
static const char expand_error[] = "No space to expand \"%s\"";
|
||||
char expbuf[MAXPATHLEN + 1];
|
||||
char nbuf[NLEN + 1];
|
||||
char *ep = expbuf;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sched.c,v 1.1.1.2 2000/11/19 23:43:42 wiz Exp $ */
|
||||
/* $NetBSD: sched.c,v 1.2 2000/11/20 03:19:34 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -221,7 +221,7 @@ do_task_notify(void)
|
|||
/*
|
||||
* Keep taking the first item off the list and processing it.
|
||||
*
|
||||
* Done this way because the the callback can, quite reasonably,
|
||||
* Done this way because the callback can, quite reasonably,
|
||||
* queue a new task, so no local reference into the list can be
|
||||
* held here.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
\input texinfo @c -*-texinfo-*-
|
||||
@c $NetBSD: am-utils.texi,v 1.1.1.2 2000/11/19 23:44:05 wiz Exp $
|
||||
@c $NetBSD: am-utils.texi,v 1.2 2000/11/20 03:19:34 wiz Exp $
|
||||
@c
|
||||
@c Copyright (c) 1997-2000 Erez Zadok
|
||||
@c Copyright (c) 1989 Jan-Simon Pendry
|
||||
|
@ -1298,7 +1298,7 @@ using the @dfn{Hesiod} name server. The string following the dot is
|
|||
used as a name qualifier and is prepended with the key being located.
|
||||
The entire string is then resolved in the @code{automount} context, or
|
||||
the @i{amd.conf} parameter @samp{hesiod_base} (@pxref{hesiod_base
|
||||
Parameter}). For example, if the the key is @samp{jsp} and map name is
|
||||
Parameter}). For example, if the key is @samp{jsp} and map name is
|
||||
@samp{hesiod.homes} then @dfn{Hesiod} is asked to resolve
|
||||
@samp{jsp.homes.automount}.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: fixmount.8,v 1.1.1.2 2000/11/19 23:44:29 wiz Exp $
|
||||
.\" $NetBSD: fixmount.8,v 1.2 2000/11/20 03:19:35 wiz Exp $
|
||||
.\"
|
||||
.\"
|
||||
.\" Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -42,7 +42,7 @@
|
|||
.\"
|
||||
.\" Id: fixmount.8,v 1.3 2000/02/11 02:09:48 ezk Exp
|
||||
.\"
|
||||
.TH FIXMOUNT 8L "26 Feb 1993"
|
||||
.TH FIXMOUNT 8 "26 Feb 1993"
|
||||
.SH NAME
|
||||
fixmount \- fix remote mount entries
|
||||
.SH SYNOPSIS
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hlfsd.c,v 1.1.1.2 2000/11/19 23:43:50 wiz Exp $ */
|
||||
/* $NetBSD: hlfsd.c,v 1.2 2000/11/20 03:19:35 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -949,7 +949,7 @@ fatal(char *mess)
|
|||
am_get_progname(), lessmess, errno);
|
||||
}
|
||||
}
|
||||
plog(XLOG_FATAL, mess);
|
||||
plog(XLOG_FATAL, "%s", mess);
|
||||
|
||||
hlfsd_going_down(1);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: am_utils.h,v 1.1.1.2 2000/11/19 23:42:59 wiz Exp $ */
|
||||
/* $NetBSD: am_utils.h,v 1.2 2000/11/20 03:19:35 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -646,7 +646,7 @@ extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp);
|
|||
extern void normalize_slash(char *);
|
||||
extern void ops_showamfstypes(char *buf);
|
||||
extern void ops_showfstypes(char *outbuf);
|
||||
extern void plog(int, char *,...)
|
||||
extern void plog(int, const char *,...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
extern void rem_que(qelem *);
|
||||
extern void reschedule_timeout_mp(void);
|
||||
|
@ -971,7 +971,7 @@ extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
|
|||
extern int debug_flags; /* Debug options */
|
||||
extern int debug_option (char *opt);
|
||||
extern struct opt_tab dbg_opt[];
|
||||
extern void dplog(char *fmt, ...)
|
||||
extern void dplog(const char *fmt, ...)
|
||||
__attribute__ ((__format__ (__printf__, 1, 2)));
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mount_fs.c,v 1.1.1.2 2000/11/19 23:43:21 wiz Exp $ */
|
||||
/* $NetBSD: mount_fs.c,v 1.2 2000/11/20 03:19:35 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -179,14 +179,10 @@ mount_fs(mntent_t *mnt, int flags, caddr_t mnt_data, int retry, MTYPE_TYPE type,
|
|||
char optsbuf[48];
|
||||
# endif /* defined(MNTTAB_OPT_DEV) || (defined(HAVE_FS_NFS3) && defined(MNTTAB_OPT_VERS)) || defined(MNTTAB_OPT_PROTO) */
|
||||
#endif /* MOUNT_TABLE_ON_FILE */
|
||||
#ifdef DEBUG
|
||||
char buf[80]; /* buffer for sprintf */
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifdef DEBUG
|
||||
sprintf(buf, "%s%s%s",
|
||||
"%s fstype ", MTYPE_PRINTF_TYPE, " (%s) flags %#x (%s)");
|
||||
dlog(buf, mnt->mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts);
|
||||
dlog("%s fstype " MTYPE_PRINTF_TYPE " (%s) flags %#x (%s)",
|
||||
mnt->mnt_dir, type, mnt->mnt_type, flags, mnt->mnt_opts);
|
||||
#endif /* DEBUG */
|
||||
|
||||
again:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xutil.c,v 1.1.1.2 2000/11/19 23:43:24 wiz Exp $ */
|
||||
/* $NetBSD: xutil.c,v 1.2 2000/11/20 03:19:36 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -82,7 +82,8 @@ static int orig_mem_bytes;
|
|||
#endif /* DEBUG_MEM */
|
||||
|
||||
/* forward definitions */
|
||||
static void real_plog(int lvl, char *fmt, va_list vargs);
|
||||
static void real_plog(int lvl, const char *fmt, va_list vargs)
|
||||
__attribute__((__format__(__printf__, 2, 0)));
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
|
@ -288,10 +289,13 @@ checkup_mem(void)
|
|||
* 'e' never gets longer than maxlen characters.
|
||||
*/
|
||||
static void
|
||||
expand_error(char *f, char *e, int maxlen)
|
||||
expand_error(const char *f, char *e, int maxlen)
|
||||
{
|
||||
#ifndef HAVE_STRERROR
|
||||
extern int sys_nerr;
|
||||
char *p, *q;
|
||||
#endif
|
||||
const char *p;
|
||||
char *q;
|
||||
int error = errno;
|
||||
int len = 0;
|
||||
|
||||
|
@ -404,7 +408,7 @@ debug_option(char *opt)
|
|||
|
||||
|
||||
void
|
||||
dplog(char *fmt, ...)
|
||||
dplog(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
@ -419,7 +423,7 @@ dplog(char *fmt, ...)
|
|||
|
||||
|
||||
void
|
||||
plog(int lvl, char *fmt, ...)
|
||||
plog(int lvl, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
@ -433,7 +437,7 @@ plog(int lvl, char *fmt, ...)
|
|||
|
||||
|
||||
static void
|
||||
real_plog(int lvl, char *fmt, va_list vargs)
|
||||
real_plog(int lvl, const char *fmt, va_list vargs)
|
||||
{
|
||||
char msg[1024];
|
||||
char efmt[1024];
|
||||
|
@ -454,12 +458,13 @@ real_plog(int lvl, char *fmt, va_list vargs)
|
|||
vsnprintf(ptr, 1024, efmt, vargs);
|
||||
#else /* not HAVE_VSNPRINTF */
|
||||
/*
|
||||
* XXX: ptr is 1024 bytes long. It is possible to write into it
|
||||
* more than 1024 bytes, if efmt is already large, and vargs expand
|
||||
* as well. This is not as safe as using vsnprintf().
|
||||
* XXX: ptr is 1024 bytes long, but we may write to ptr[strlen(ptr) + 2]
|
||||
* (to add an '\n', see code below) so we have to limit the string copy
|
||||
* to 1023 (including the '\0').
|
||||
*/
|
||||
vsprintf(ptr, efmt, vargs);
|
||||
msg[1023] = '\0'; /* null terminate, to be sure */
|
||||
fmt = efmt;
|
||||
vsnprintf(ptr, 1023, fmt, vargs);
|
||||
msg[1022] = '\0'; /* null terminate, to be sure */
|
||||
#endif /* not HAVE_VSNPRINTF */
|
||||
|
||||
ptr += strlen(ptr);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: wire-test.8,v 1.1.1.2 2000/11/19 23:44:33 wiz Exp $
|
||||
.\" $NetBSD: wire-test.8,v 1.2 2000/11/20 03:19:36 wiz Exp $
|
||||
.\"
|
||||
.\"
|
||||
.\" Copyright (c) 1997-2000 Erez Zadok
|
||||
|
@ -42,7 +42,7 @@
|
|||
.\"
|
||||
.\" Id: wire-test.8,v 1.3 2000/02/11 02:09:58 ezk Exp
|
||||
.\"
|
||||
.TH WIRE-TEST 8L "26 Feb 1993"
|
||||
.TH WIRE-TEST 8 "26 Feb 1993"
|
||||
.SH NAME
|
||||
wire-test \- test your network interfaces and local IP address
|
||||
.SH SYNOPSIS
|
||||
|
|
Loading…
Reference in New Issue