mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Fix sudoedit of a non-existent file. From Tilo Stritzky.
This commit is contained in:
@@ -130,7 +130,7 @@ int sudo_edit(argc, argv, envp)
|
||||
}
|
||||
}
|
||||
set_perms(PERM_ROOT);
|
||||
if (error || !S_ISREG(sb.st_mode)) {
|
||||
if (error || (ofd != -1 && !S_ISREG(sb.st_mode))) {
|
||||
if (error)
|
||||
warning("%s", *ap);
|
||||
else
|
||||
|
Reference in New Issue
Block a user