2
0
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:
Todd C. Miller
2004-09-07 17:14:52 +00:00
parent 03b53b6911
commit 1c20ff1a6d
12 changed files with 271 additions and 157 deletions

View File

@@ -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 */