diff options
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth.c,v 1.133 2018/09/12 01:19:12 djm Exp $ */ | 1 | /* $OpenBSD: auth.c,v 1.134 2018/11/16 03:26:01 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -437,7 +437,7 @@ expand_authorized_keys(const char *filename, struct passwd *pw) | |||
437 | * Ensure that filename starts anchored. If not, be backward | 437 | * Ensure that filename starts anchored. If not, be backward |
438 | * compatible and prepend the '%h/' | 438 | * compatible and prepend the '%h/' |
439 | */ | 439 | */ |
440 | if (*file == '/') | 440 | if (path_absolute(file)) |
441 | return (file); | 441 | return (file); |
442 | 442 | ||
443 | i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file); | 443 | i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file); |
@@ -893,7 +893,7 @@ subprocess(const char *tag, struct passwd *pw, const char *command, | |||
893 | * If executing an explicit binary, then verify the it exists | 893 | * If executing an explicit binary, then verify the it exists |
894 | * and appears safe-ish to execute | 894 | * and appears safe-ish to execute |
895 | */ | 895 | */ |
896 | if (*av[0] != '/') { | 896 | if (!path_absolute(av[0])) { |
897 | error("%s path is not absolute", tag); | 897 | error("%s path is not absolute", tag); |
898 | return 0; | 898 | return 0; |
899 | } | 899 | } |