diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.307 2018/10/04 00:10:11 djm Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.308 2018/11/16 03:26:01 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -1334,7 +1334,7 @@ safely_chroot(const char *path, uid_t uid) | |||
1334 | char component[PATH_MAX]; | 1334 | char component[PATH_MAX]; |
1335 | struct stat st; | 1335 | struct stat st; |
1336 | 1336 | ||
1337 | if (*path != '/') | 1337 | if (!path_absolute(path)) |
1338 | fatal("chroot path does not begin at root"); | 1338 | fatal("chroot path does not begin at root"); |
1339 | if (strlen(path) >= sizeof(component)) | 1339 | if (strlen(path) >= sizeof(component)) |
1340 | fatal("chroot path too long"); | 1340 | fatal("chroot path too long"); |