| 506 | | case AUTH_BACKEND_PLAIN: |
| 507 | | if (s->auth_plain_userfile->used) { |
| 508 | | int fd; |
| 509 | | /* try to read */ |
| 510 | | if (-1 == (fd = open(s->auth_plain_userfile->ptr, O_RDONLY))) { |
| 511 | | log_error_write(srv, __FILE__, __LINE__, "sbss", |
| 512 | | "opening auth.backend.plain.userfile:", s->auth_plain_userfile, |
| 513 | | "failed:", strerror(errno)); |
| 514 | | return HANDLER_ERROR; |
| 515 | | } |
| 516 | | close(fd); |
| 517 | | } |
| 518 | | break; |
| 519 | | case AUTH_BACKEND_HTPASSWD: |
| 520 | | if (s->auth_htpasswd_userfile->used) { |
| 521 | | int fd; |
| 522 | | /* try to read */ |
| 523 | | if (-1 == (fd = open(s->auth_htpasswd_userfile->ptr, O_RDONLY))) { |
| 524 | | log_error_write(srv, __FILE__, __LINE__, "sbss", |
| 525 | | "opening auth.backend.htpasswd.userfile:", s->auth_htpasswd_userfile, |
| 526 | | "failed:", strerror(errno)); |
| 527 | | return HANDLER_ERROR; |
| 528 | | } |
| 529 | | close(fd); |
| 530 | | } |
| 531 | | break; |
| 532 | | case AUTH_BACKEND_HTDIGEST: |
| 533 | | if (s->auth_htdigest_userfile->used) { |
| 534 | | int fd; |
| 535 | | /* try to read */ |
| 536 | | if (-1 == (fd = open(s->auth_htdigest_userfile->ptr, O_RDONLY))) { |
| 537 | | log_error_write(srv, __FILE__, __LINE__, "sbss", |
| 538 | | "opening auth.backend.htdigest.userfile:", s->auth_htdigest_userfile, |
| 539 | | "failed:", strerror(errno)); |
| 540 | | return HANDLER_ERROR; |
| 541 | | } |
| 542 | | close(fd); |
| 543 | | } |
| 544 | | break; |