summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/auth.c b/auth.c
index 7bc6f4021..f5e2d3d2e 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.98 2012/12/02 20:34:09 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.99 2012/12/14 05:26:43 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -494,13 +494,12 @@ static int
494secure_filename(FILE *f, const char *file, struct passwd *pw, 494secure_filename(FILE *f, const char *file, struct passwd *pw,
495 char *err, size_t errlen) 495 char *err, size_t errlen)
496{ 496{
497 char buf[MAXPATHLEN];
498 struct stat st; 497 struct stat st;
499 498
500 /* check the open file to avoid races */ 499 /* check the open file to avoid races */
501 if (fstat(fileno(f), &st) < 0) { 500 if (fstat(fileno(f), &st) < 0) {
502 snprintf(err, errlen, "cannot stat file %s: %s", 501 snprintf(err, errlen, "cannot stat file %s: %s",
503 buf, strerror(errno)); 502 file, strerror(errno));
504 return -1; 503 return -1;
505 } 504 }
506 return auth_secure_path(file, &st, pw->pw_dir, pw->pw_uid, err, errlen); 505 return auth_secure_path(file, &st, pw->pw_dir, pw->pw_uid, err, errlen);