diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-10 14:04:41 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-10 14:04:41 +0000 |
commit | fe36d839b2fd986064cbf1c91fbc2d1278f71901 (patch) | |
tree | c10214a793aaef7de657c8080a23b5b6cf0f76ff /usr.bin | |
parent | 88fcc0de4e8c6d827c047b415e9b0f580d8cdca5 (diff) |
use cvs_validate_directory() in cvs_get_repository_path() as well,
since we want to make sure we have valid CVS/Repository content
ok tobias@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/remote.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/util.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/cvs/remote.c b/usr.bin/cvs/remote.c index fa6ac200243..2623ab4c3df 100644 --- a/usr.bin/cvs/remote.c +++ b/usr.bin/cvs/remote.c @@ -1,4 +1,4 @@ -/* $OpenBSD: remote.c,v 1.18 2008/02/10 14:00:41 joris Exp $ */ +/* $OpenBSD: remote.c,v 1.19 2008/02/10 14:04:40 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -251,7 +251,7 @@ cvs_validate_directory(const char *path) { char *dir, *sp, *dp; - if (path[0] == '/') + if (cvs_server_active == 1 && path[0] == '/') fatal("No absolute directories allowed, go away."); dir = xstrdup(path); diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 18229448594..f906c7f31c1 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.138 2008/02/10 14:00:42 joris Exp $ */ +/* $OpenBSD: util.c,v 1.139 2008/02/10 14:04:40 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org> @@ -466,6 +466,7 @@ cvs_get_repository_path(const char *dir, char *dst, size_t len) cvs_get_repository_name(dir, buf, sizeof(buf)); (void)xsnprintf(dst, len, "%s/%s", current_cvsroot->cr_dir, buf); + cvs_validate_directory(dst); } void |