diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
commit | 315054f4737a39489e0a14f3a92bff61f1592832 (patch) | |
tree | 62bf010653374ce09b6beb4dfa0414a91457233b /usr.sbin/ypserv/ypxfr/ypxfr.c | |
parent | 79e3d817585ca08a91e30ad14abe43e2ab70295f (diff) |
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'usr.sbin/ypserv/ypxfr/ypxfr.c')
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c index 6e2dc635679..61f208ed759 100644 --- a/usr.sbin/ypserv/ypxfr/ypxfr.c +++ b/usr.sbin/ypserv/ypxfr/ypxfr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypxfr.c,v 1.37 2009/10/27 23:59:58 deraadt Exp $ */ +/* $OpenBSD: ypxfr.c,v 1.38 2015/01/16 06:40:23 deraadt Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -77,7 +77,7 @@ ypxfr_foreach(u_long status, char *keystr, int keylen, char *valstr, int vallen, static int get_local_ordernum(char *domain, char *map, u_int32_t *lordernum) { - char map_path[MAXPATHLEN], order[MAX_LAST_LEN+1]; + char map_path[PATH_MAX], order[MAX_LAST_LEN+1]; char order_key[] = YP_LAST_KEY; struct stat finfo; datum k, v; @@ -173,7 +173,7 @@ create_db(char *domain, char *map, char *temp_map) static int install_db(char *domain, char *map, char *temp_map) { - char db_name[MAXPATHLEN]; + char db_name[PATH_MAX]; snprintf(db_name, sizeof db_name, "%s/%s/%s%s", YP_DB_PATH, domain, map, YPDB_SUFFIX); @@ -454,7 +454,7 @@ main(int argc, char *argv[]) } if (status == YPPUSH_SUCC) { - char tmpmapname[MAXPATHLEN]; + char tmpmapname[PATH_MAX]; int fd; /* Create temporary db */ |