-/* $OpenBSD: afs_ops.c,v 1.19 2014/10/26 03:28:41 guenther Exp $ */
+/* $OpenBSD: afs_ops.c,v 1.20 2021/10/21 10:55:56 deraadt Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
unsigned short port;
int flags;
nfs_fh *fhp;
- char fs_hostname[MAXHOSTNAMELEN+MAXPATHLEN+1];
+ char fs_hostname[HOST_NAME_MAX+1 + PATH_MAX+1];
const char *type = MOUNT_NFS;
char **ivec, **xivec; /* Split version of info */
char *auto_opts; /* Automount options */
int error = 0; /* Error so far */
- char path_name[MAXPATHLEN]; /* General path name buffer */
+ char path_name[PATH_MAX]; /* General path name buffer */
char *pfname; /* Path for database lookup */
struct continuation *cp; /* Continuation structure if we need to mount */
int in_progress = 0; /* # of (un)mount in progress */
* SUCH DAMAGE.
*
* from: @(#)amd.c 8.1 (Berkeley) 6/6/93
- * $Id: amd.c,v 1.23 2019/06/28 13:32:46 deraadt Exp $
+ * $Id: amd.c,v 1.24 2021/10/21 10:55:56 deraadt Exp $
*/
/*
#error "unknown endian"
#endif
-char pid_fsname[16 + MAXHOSTNAMELEN]; /* "kiska.southseas.nz:(pid%d)" */
+char pid_fsname[16 + HOST_NAME_MAX+1]; /* "kiska.southseas.nz:(pid%d)" */
#ifdef HAS_HOST
#ifdef HOST_EXEC
char *host_helper;
#endif /* HAS_HOST */
char *auto_dir = "/tmp_mnt";
char *hostdomain = "unknown.domain";
-char hostname[MAXHOSTNAMELEN] = "localhost"; /* Hostname */
-char hostd[2*MAXHOSTNAMELEN]; /* Host+domain */
+char hostname[HOST_NAME_MAX+1] = "localhost"; /* Hostname */
+char hostd[2*(HOST_NAME_MAX+1)]; /* Host+domain */
char *op_sys = "bsd44"; /* Name of current op_sys */
char *arch = ARCH_REP; /* Name of current architecture */
char *endian = ARCH_ENDIAN; /* Big or Little endian */
* SUCH DAMAGE.
*
* from: @(#)get_args.c 8.1 (Berkeley) 6/6/93
- * $Id: get_args.c,v 1.14 2014/10/20 02:33:42 guenther Exp $
+ * $Id: get_args.c,v 1.15 2021/10/21 10:55:56 deraadt Exp $
*/
/*
hostdomain = sub_domain;
if (*hostdomain == '.')
hostdomain++;
- strlcat(hostd, ".", 2 * MAXHOSTNAMELEN);
- strlcat(hostd, hostdomain, 2 * MAXHOSTNAMELEN);
+ strlcat(hostd, ".", 2 * (HOST_NAME_MAX+1));
+ strlcat(hostd, hostdomain, 2 * (HOST_NAME_MAX+1));
#ifdef DEBUG
{ if (debug_flags & D_MTAB) {
-/* $OpenBSD: host_ops.c,v 1.19 2015/12/05 21:15:01 mmcc Exp $ */
+/* $OpenBSD: host_ops.c,v 1.20 2021/10/21 10:55:56 deraadt Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
int sock = RPC_ANYSOCK;
int ok = FALSE;
mntlist *mlist;
- char fs_name[MAXPATHLEN], *rfs_dir;
- char mntpt[MAXPATHLEN];
+ char fs_name[PATH_MAX], *rfs_dir;
+ char mntpt[PATH_MAX];
struct timeval tv;
tv.tv_sec = 10; tv.tv_usec = 0;
* SUCH DAMAGE.
*
* from: @(#)info_passwd.c 8.1 (Berkeley) 6/6/93
- * $Id: info_passwd.c,v 1.10 2015/12/05 21:15:01 mmcc Exp $
+ * $Id: info_passwd.c,v 1.11 2021/10/21 10:55:56 deraadt Exp $
*/
/*
* This allows cross-domain entries in your passwd file.
* ... but forget about security!
*/
- char val[MAXPATHLEN], rhost[MAXHOSTNAMELEN];
+ char val[PATH_MAX], rhost[HOST_NAME_MAX+1];
char *user, *p, *q;
dir = strdup(pw->pw_dir);
-/* $OpenBSD: mapc.c,v 1.23 2015/12/05 21:15:01 mmcc Exp $ */
+/* $OpenBSD: mapc.c,v 1.24 2021/10/21 10:55:56 deraadt Exp $ */
/*-
* Copyright (c) 1989 Jan-Simon Pendry
#endif
if (MAPC_ISRE(m)) {
- char keyb[MAXPATHLEN];
+ char keyb[PATH_MAX];
regex_t *re;
int err;
*/
if (error > 0) {
if (recurse == MREC_FULL && !MAPC_ISRE(m)) {
- char wildname[MAXPATHLEN];
+ char wildname[PATH_MAX];
char *subp;
if (*key == '/')
return error;
void
root_newmap(char *dir, char *opts, char *map)
{
- char str[MAXPATHLEN];
+ char str[PATH_MAX];
/*
* First make sure we have a root map to talk about...
-/* $OpenBSD: nfs_ops.c,v 1.26 2014/10/26 03:28:41 guenther Exp $ */
+/* $OpenBSD: nfs_ops.c,v 1.27 2021/10/21 10:55:56 deraadt Exp $ */
/*-
* Copyright (c) 1990 Jan-Simon Pendry
int retry;
char *colon;
/*char *path;*/
- char host[MAXHOSTNAMELEN + MAXPATHLEN + 2];
+ char host[HOST_NAME_MAX+1 + PATH_MAX+2];
fserver *fs = mf->mf_server;
int flags;
char *xopts;
* give up completely. This is done to avoid crashing the
* automounter itself (which would be a bad thing to do).
*/
-#define BUFSPACE(ep, len) (((ep) + (len)) < expbuf+MAXPATHLEN)
+#define BUFSPACE(ep, len) (((ep) + (len)) < expbuf+PATH_MAX)
static char expand_error[] = "No space to expand \"%s\"";
- char expbuf[MAXPATHLEN+1];
+ char expbuf[PATH_MAX+1];
char nbuf[NLEN+1];
char *ep = expbuf;
char *cp = *p->opt;
-/* $OpenBSD: am.h,v 1.19 2015/09/11 19:03:31 millert Exp $ */
+/* $OpenBSD: am.h,v 1.20 2021/10/21 10:55:56 deraadt Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
/*
* Global declarations
*/
-#include <sys/param.h>
+#include <sys/signal.h>
#include <sys/socket.h>
#include <rpc/rpc.h>
#include <sys/mount.h>