From: Todd C. Miller Date: Sat, 13 Mar 1993 20:09:38 +0000 (+0000) Subject: now works if you do sudo bin/test X-Git-Tag: SUDO_1_3_0~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=065775e4a3b3055a547b1d80c855aeadf65b00d6;p=sudo now works if you do sudo bin/test --- diff --git a/find_path.c b/find_path.c index a4a5e3510..492dab451 100644 --- a/find_path.c +++ b/find_path.c @@ -183,7 +183,10 @@ struct stat s; register char type; -if ( *file == '.' && *(file+1) == '/' ) +if (index(file, '/') && *file != '/' && strncmp(file, "./", 2) + && strncmp(file, "../", 3)) + type=3; +else if ( *file == '.' && *(file+1) == '/' ) type=1; else if ( *file == '/' ) type=2;