mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Add check for 2-argument form of timespecsub (FreeBSD and BSD/OS) and
fix a typo in the gettimeofday check.
This commit is contained in:
@@ -294,7 +294,11 @@ int sudo_edit(argc, argv)
|
||||
* If mtime and size match but the user spent no measurable
|
||||
* time in the editor we can't tell if the file was changed.
|
||||
*/
|
||||
#ifdef HAVE_TIMESPECSUB2
|
||||
timespecsub(&ts1, &ts2);
|
||||
#else
|
||||
timespecsub(&ts1, &ts2, &ts2);
|
||||
#endif
|
||||
if (timespecisset(&ts2)) {
|
||||
warningx("%s unchanged", tf[i].ofile);
|
||||
unlink(tf[i].tfile);
|
||||
|
Reference in New Issue
Block a user