summaryrefslogtreecommitdiff
path: root/usr.sbin/authpf
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-15 23:59:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-15 23:59:29 +0000
commitad434b70c6145cfe53b3f79df4cc44244a6f8324 (patch)
tree93edfa941fffe5e2194ae3d379dd64c9cf82b96a /usr.sbin/authpf
parentc9dd0838e89722f7f683476efbe7818190bd6692 (diff)
switch to PATH_MAX
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r--usr.sbin/authpf/authpf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index 7b7fba83eed..93cc3e4c2b8 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.121 2014/10/08 02:11:54 deraadt Exp $ */
+/* $OpenBSD: authpf.c,v 1.122 2015/01/15 23:59:28 deraadt Exp $ */
/*
* Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org).
@@ -54,15 +54,15 @@ static void authpf_kill_states(void);
int dev; /* pf device */
char anchorname[PF_ANCHOR_NAME_SIZE] = "authpf";
-char rulesetname[MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 2];
+char rulesetname[PATH_MAX - PF_ANCHOR_NAME_SIZE - 2];
char tablename[PF_TABLE_NAME_SIZE] = "authpf_users";
int user_ip = 1; /* controls whether $user_ip is set */
FILE *pidfp;
int pidfd = -1;
-char luser[MAXLOGNAME]; /* username */
+char luser[LOGIN_NAME_MAX]; /* username */
char ipsrc[256]; /* ip as a string */
-char pidfile[MAXPATHLEN]; /* we save pid in this file. */
+char pidfile[PATH_MAX]; /* we save pid in this file. */
struct timeval Tstart, Tend; /* start and end times of session */
@@ -213,7 +213,7 @@ main(int argc, char *argv[])
do {
int save_errno, otherpid = -1;
- char otherluser[MAXLOGNAME];
+ char otherluser[LOGIN_NAME_MAX];
if ((pidfd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1 ||
(pidfp = fdopen(pidfd, "r+")) == NULL) {
@@ -491,8 +491,8 @@ allowed_luser(struct passwd *pw)
* "public" gateway, such as it is, so let
* everyone use it.
*/
- int gl_init = 0, ngroups = NGROUPS + 1;
- gid_t groups[NGROUPS + 1];
+ int gl_init = 0, ngroups = NGROUPS_MAX + 1;
+ gid_t groups[NGROUPS_MAX + 1];
lbuf = NULL;
matched = 0;
@@ -582,7 +582,7 @@ check_luser(char *luserdir, char *luser)
{
FILE *f;
int n;
- char tmp[MAXPATHLEN];
+ char tmp[PATH_MAX];
n = snprintf(tmp, sizeof(tmp), "%s/%s", luserdir, luser);
if (n < 0 || (u_int)n >= sizeof(tmp)) {