mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Use utimes() and futimes() instead of utime() in touch(), emulating as needed.
Not all systems are able to support setting the times of an fd so touch() takes both an fd and a file name as arguments.
This commit is contained in:
@@ -157,7 +157,7 @@ int sudo_edit(argc, argv)
|
||||
#else
|
||||
chown(tf[i].tfile, user_uid, user_gid);
|
||||
#endif
|
||||
touch(tf[i].tfile, tf[i].omtime);
|
||||
touch(tf[i].tfd, tf[i].tfile, tf[i].omtime);
|
||||
}
|
||||
if (argc == 1)
|
||||
return(1); /* no files readable, you lose */
|
||||
|
Reference in New Issue
Block a user