Add cmnd_base to struct sudo_user and set it in init_vars().

Add cmnd_stat to struct sudo_user and set it in sudo_goodpath().
No longer use gross statics in command_matches().
Also rename some variables for improved clarity.
This commit is contained in:
Todd C. Miller
2004-08-24 18:01:14 +00:00
parent badd06688f
commit f30ab72c44
7 changed files with 62 additions and 59 deletions

View File

@@ -47,8 +47,9 @@ static const char rcsid[] = "$Sudo$";
* Verify that path is a normal file and executable by root.
*/
char *
sudo_goodpath(path)
sudo_goodpath(path, sbp)
const char *path;
struct stat *sbp;
{
struct stat sb;
@@ -65,5 +66,7 @@ sudo_goodpath(path)
return(NULL);
}
if (sbp != NULL)
(void) memcpy(sbp, &sb, sizeof(struct stat));
return((char *)path);
}