]> granicus.if.org Git - sudo/commitdiff
works
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Mar 1993 19:20:15 +0000 (19:20 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 13 Mar 1993 19:20:15 +0000 (19:20 +0000)
find_path.c

index af00a5f64e632de1d0712a5222f298a53ee3e757..a4a5e3510c2de01e2310b65397ac7152a4cfab0e 100644 (file)
@@ -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 );