summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2015-01-20 23:14:00 +0000
committerDamien Miller <djm@mindrot.org>2015-01-26 23:58:53 +1100
commit087266ec33c76fc8d54ac5a19efacf2f4a4ca076 (patch)
tree71f57bb41b61561ebaa13026d8dc5d04d9829b00 /auth.c
parent57e783c8ba2c0797f93977e83b2a8644a03065d8 (diff)
upstream commit
Reduce use of <sys/param.h> and transition to <limits.h> throughout. ok djm markus
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/auth.c b/auth.c
index b259c6ef1..facc962b2 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.108 2014/12/21 22:27:56 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.109 2015/01/20 23:14:00 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -27,7 +27,6 @@
27 27
28#include <sys/types.h> 28#include <sys/types.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30#include <sys/param.h>
31 30
32#include <netinet/in.h> 31#include <netinet/in.h>
33 32
@@ -50,6 +49,7 @@
50#include <stdio.h> 49#include <stdio.h>
51#include <string.h> 50#include <string.h>
52#include <unistd.h> 51#include <unistd.h>
52#include <limits.h>
53 53
54#include "xmalloc.h" 54#include "xmalloc.h"
55#include "match.h" 55#include "match.h"
@@ -376,7 +376,7 @@ auth_root_allowed(const char *method)
376char * 376char *
377expand_authorized_keys(const char *filename, struct passwd *pw) 377expand_authorized_keys(const char *filename, struct passwd *pw)
378{ 378{
379 char *file, ret[MAXPATHLEN]; 379 char *file, ret[PATH_MAX];
380 int i; 380 int i;
381 381
382 file = percent_expand(filename, "h", pw->pw_dir, 382 file = percent_expand(filename, "h", pw->pw_dir,
@@ -468,7 +468,7 @@ int
468auth_secure_path(const char *name, struct stat *stp, const char *pw_dir, 468auth_secure_path(const char *name, struct stat *stp, const char *pw_dir,
469 uid_t uid, char *err, size_t errlen) 469 uid_t uid, char *err, size_t errlen)
470{ 470{
471 char buf[MAXPATHLEN], homedir[MAXPATHLEN]; 471 char buf[PATH_MAX], homedir[PATH_MAX];
472 char *cp; 472 char *cp;
473 int comparehome = 0; 473 int comparehome = 0;
474 struct stat st; 474 struct stat st;