always use getcwd

This commit is contained in:
Todd C. Miller
1994-06-04 19:29:49 +00:00
parent d658bd71ae
commit a5c4f697d2

4
sudo.c
View File

@@ -225,11 +225,7 @@ static void load_globals()
/*
* so we know where we are... (do as user)
*/
#ifdef HAVE_GETCWD
if (!getcwd(cwd, (size_t) (MAXPATHLEN + 1))) {
#else
if (!getwd(cwd)) {
#endif /* HAVE_GETCWD */
(void) fprintf(stderr, "%s: Can't get working directory!\n", Argv[0]);
exit(1);
}