This patch will upgrade CU Sudo version 1.5.4 to version 1.5.4 patchlevel 1. To apply, run: cd sudo.v1.5.4 patch -p1 < cu-sudo.v1.5.4p1.patch diff -uN sudo.v1.5.4/CHANGES sudo.v1.5.4p1/CHANGES --- sudo.v1.5.4/CHANGES Tue Jan 13 08:19:19 1998 +++ sudo.v1.5.4p1/CHANGES Sat Jun 27 14:11:06 1998 @@ -863,3 +863,8 @@ Noted by Alex Parchkov . Sudo 1.5.4 released. + +283) Sudo should prompt for a password before telling the user that + a command could not be found. Noted by rhodie@NAC.NET. + +Sudo 1.5.4p1 released. diff -uN sudo.v1.5.4/Makefile.in sudo.v1.5.4p1/Makefile.in --- sudo.v1.5.4/Makefile.in Mon Jan 12 22:05:46 1998 +++ sudo.v1.5.4p1/Makefile.in Sat Jun 27 14:08:06 1998 @@ -112,7 +112,7 @@ HDRS = sudo.h pathnames.h options.h compat.h version.h insults.h \ ins_2001.h ins_classic.h ins_goons.h ins_csops.h -VERSION = 1.5.4 +VERSION = 1.5.4p1 DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES COPYING HISTORY INSTALL OPTIONS TODO \ PORTING README RUNSON FAQ TROUBLESHOOTING Makefile.in acsite.m4 \ Common subdirectories: sudo.v1.5.4/emul and sudo.v1.5.4p1/emul diff -uN sudo.v1.5.4/sudo.c sudo.v1.5.4p1/sudo.c --- sudo.v1.5.4/sudo.c Mon Jan 12 21:48:51 1998 +++ sudo.v1.5.4p1/sudo.c Sat Jun 27 14:07:15 1998 @@ -126,7 +126,7 @@ static void usage __P((int)); static void load_globals __P((int)); static int check_sudoers __P((void)); -static void load_cmnd __P((int)); +static int load_cmnd __P((int)); static void add_env __P((int)); static void clean_env __P((char **, struct env_table *)); extern int user_is_exempt __P((void)); @@ -188,7 +188,7 @@ int argc; char **argv; { - int rtn; + int rtn, found_cmnd; int sudo_mode = MODE_RUN; extern char ** environ; @@ -302,7 +302,7 @@ #endif /* SECURE_PATH */ if ((sudo_mode & MODE_RUN)) { - load_cmnd(sudo_mode); /* load the cmnd global variable */ + found_cmnd = load_cmnd(sudo_mode); /* load the cmnd global variable */ } else if (sudo_mode == MODE_KILL) { remove_timestamp(); /* remove the timestamp ticket file */ exit(0); @@ -319,6 +319,14 @@ case VALIDATE_OK_NOPASS: if (rtn != VALIDATE_OK_NOPASS) check_user(); + + /* finally tell the user if the command did not exist */ + if ((sudo_mode & MODE_RUN) && !found_cmnd) { + (void) fprintf(stderr, "%s: %s: command not found\n", Argv[0], + cmnd); + exit(1); + } + log_error(ALL_SYSTEMS_GO); if (sudo_mode == MODE_VALIDATE) exit(0); @@ -748,9 +756,10 @@ * load_cmnd() * * This function sets the cmnd global variable + * Returns 1 on success, 0 on failure. */ -static void load_cmnd(sudo_mode) +static int load_cmnd(sudo_mode) int sudo_mode; { if (strlen(NewArgv[0]) > MAXPATHLEN) { @@ -764,10 +773,10 @@ * Resolve the path */ if ((cmnd = find_path(NewArgv[0])) == NULL) { - (void) fprintf(stderr, "%s: %s: command not found\n", Argv[0], - NewArgv[0]); - exit(1); - } + cmnd = NewArgv[0]; + return(0); + } else + return(1); } diff -uN sudo.v1.5.4/version.h sudo.v1.5.4p1/version.h --- sudo.v1.5.4/version.h Mon Jan 12 21:48:57 1998 +++ sudo.v1.5.4p1/version.h Sat Jun 27 14:07:48 1998 @@ -23,6 +23,6 @@ #ifndef _SUDO_VERSION_H #define _SUDO_VERSION_H -static char version[] = "1.5.4"; +static char version[] = "1.5.4p1"; #endif /* _SUDO_VERSION_H */