diff options
author | Damien Miller <djm@mindrot.org> | 2013-01-09 15:54:48 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-01-09 15:54:48 +1100 |
commit | 4e14a58f3f01842ba6a50f84d0ddaa12d6bed62b (patch) | |
tree | 7b33d659923d21446d6ef49c9e444acfb578a92a | |
parent | 0fc77297e6825ae83618c5137e190aa9f9dac9da (diff) |
- dtucker@cvs.openbsd.org 2012/12/14 05:26:43
[auth.c]
use correct string in error message; from rustybsd at gmx.fr
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | auth.c | 5 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,9 @@ | |||
1 | 20130109 | ||
2 | - (djm) OpenBSD CVS Sync | ||
3 | - dtucker@cvs.openbsd.org 2012/12/14 05:26:43 | ||
4 | [auth.c] | ||
5 | use correct string in error message; from rustybsd at gmx.fr | ||
6 | |||
1 | 20121217 | 7 | 20121217 |
2 | - (dtucker) [Makefile.in] Add some scaffolding so that the new regress | 8 | - (dtucker) [Makefile.in] Add some scaffolding so that the new regress |
3 | tests will work with VPATH directories. | 9 | tests will work with VPATH directories. |
@@ -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 | |||
494 | secure_filename(FILE *f, const char *file, struct passwd *pw, | 494 | secure_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); |