From: Todd C. Miller Date: Sat, 13 Mar 1993 19:20:15 +0000 (+0000) Subject: works X-Git-Tag: SUDO_1_3_0~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff04cc5e1c4845baa8c53618495141ca6ae0c262;p=sudo works --- diff --git a/find_path.c b/find_path.c index af00a5f64..a4a5e3510 100644 --- a/find_path.c +++ b/find_path.c @@ -230,7 +230,9 @@ bzero ( buf, MAXPATHLEN+1 ); if ( path ) strcat ( buf, path ); if ( *file != '/' && path [strlen(path)-1] != '/' ) strcat ( buf, "/" ); strcat ( buf, file ); -if ( ! stat ( buf, &s ) && (s.st_mode & 0000111) >= 0000001 ) + +/* make sure file exists and is executable */ +if ( ! stat ( buf, &s ) && (s.st_mode & 0000111) ) return ( check_link ( buf ) ); else return ( NULL );