summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/file.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2007-09-07 23:30:31 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2007-09-07 23:30:31 +0000
commit87dd5abad3eefefc93c8f8c66158a072d735125e (patch)
tree644fad1348d5d216da275aae1fa715589b19c631 /usr.bin/cvs/file.c
parentc7f0016390151b0e6c26e445ec857ba21f0a5d42 (diff)
Do not fatal if getpwuid() fails, instead ignore user configuration files.
OK joris@
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r--usr.bin/cvs/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 8bc2e82267c..ba15fcbea7e 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.194 2007/07/03 13:22:42 joris Exp $ */
+/* $OpenBSD: file.c,v 1.195 2007/09/07 23:30:30 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -88,6 +88,9 @@ cvs_file_init(void)
for (i = 0; i < (int)(sizeof(cvs_ign_std)/sizeof(char *)); i++)
cvs_file_ignore(cvs_ign_std[i], &cvs_ign_pats);
+ if (cvs_homedir == NULL)
+ return;
+
/* read the cvsignore file in the user's home directory, if any */
(void)xsnprintf(path, MAXPATHLEN, "%s/.cvsignore", cvs_homedir);