=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/find_path.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/sudo/Attic/find_path.c 2007/07/26 16:10:16 1.9 --- src/usr.bin/sudo/Attic/find_path.c 2008/11/14 11:58:08 1.10 *************** *** 42,57 **** #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ - #ifdef HAVE_ERR_H - # include - #else - # include "emul/err.h" - #endif /* HAVE_ERR_H */ #include "sudo.h" #ifndef lint ! __unused static const char rcsid[] = "$Sudo: find_path.c,v 1.108.2.4 2007/06/12 01:43:01 millert Exp $"; #endif /* lint */ /* --- 42,52 ---- #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include "sudo.h" #ifndef lint ! __unused static const char rcsid[] = "$Sudo: find_path.c,v 1.115 2005/03/29 14:29:46 millert Exp $"; #endif /* lint */ /* *************** *** 76,82 **** int len; /* length parameter */ if (strlen(infile) >= PATH_MAX) ! errx(1, "%s: File name too long", infile); /* * If we were given a fully qualified or relative path --- 71,77 ---- int len; /* length parameter */ if (strlen(infile) >= PATH_MAX) ! errorx(1, "%s: File name too long", infile); /* * If we were given a fully qualified or relative path *************** *** 92,102 **** } /* Use PATH passed in unless SECURE_PATH is in effect. */ ! #ifdef SECURE_PATH ! if (!user_is_exempt()) ! path = SECURE_PATH; ! #endif /* SECURE_PATH */ ! if (path == NULL) return(NOT_FOUND); path = estrdup(path); origpath = path; --- 87,95 ---- } /* Use PATH passed in unless SECURE_PATH is in effect. */ ! if (def_secure_path && !user_is_exempt()) ! path = def_secure_path; ! else if (path == NULL) return(NOT_FOUND); path = estrdup(path); origpath = path; *************** *** 120,126 **** */ len = snprintf(command, sizeof(command), "%s/%s", path, infile); if (len <= 0 || len >= sizeof(command)) ! errx(1, "%s: File name too long", infile); if ((result = sudo_goodpath(command, sbp))) break; --- 113,119 ---- */ len = snprintf(command, sizeof(command), "%s/%s", path, infile); if (len <= 0 || len >= sizeof(command)) ! errorx(1, "%s: File name too long", infile); if ((result = sudo_goodpath(command, sbp))) break;