2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Fix typo (fd2 vs. fd) caught by coverity, CID 168359.

This commit is contained in:
Todd C. Miller
2017-05-04 10:30:59 -06:00
parent 32ebb4a383
commit 237eddd95e

View File

@@ -400,7 +400,7 @@ io_nextid(char *iolog_dir, char *iolog_dir_fallback, char sessid[7])
if (len > 0 && (size_t)len < sizeof(fallback)) {
int fd2;
fd2 = open(fallback, O_RDWR|O_CREAT, iolog_filemode);
if (fd == -1 && errno == EACCES) {
if (fd2 == -1 && errno == EACCES) {
/* Try again as the I/O log owner (for NFS). */
set_perms(PERM_IOLOG);
fd2 = open(fallback, O_RDWR|O_CREAT, iolog_filemode);