logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

opensmtpd-6.0.2p1-uid_0_certificate.patch (1185B)


  1. diff --git a/smtpd/ssl.c.old b/smtpd/ssl.c
  2. index 7dcd2ce..4e9d708 100644
  3. --- a/smtpd/ssl.c.old
  4. +++ b/smtpd/ssl.c
  5. @@ -113,11 +113,11 @@ ssl_load_file(const char *name, off_t *len, mode_t perm)
  6. return (NULL);
  7. if (fstat(fd, &st) != 0)
  8. goto fail;
  9. - if (st.st_uid != 0) {
  10. - log_warnx("warn: %s: not owned by uid 0", name);
  11. - errno = EACCES;
  12. - goto fail;
  13. - }
  14. + //if (st.st_uid != 0) {
  15. + // log_warnx("warn: %s: not owned by uid 0", name);
  16. + // errno = EACCES;
  17. + // goto fail;
  18. + //}
  19. if (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO) & ~perm) {
  20. strmode(perm, mode);
  21. log_warnx("warn: %s: insecure permissions: must be at most %s",
  22. @@ -201,11 +201,11 @@ ssl_load_key(const char *name, off_t *len, char *pass, mode_t perm, const char *
  23. if (fstat(fileno(fp), &st) != 0)
  24. goto fail;
  25. - if (st.st_uid != 0) {
  26. - log_warnx("warn: %s: not owned by uid 0", name);
  27. - errno = EACCES;
  28. - goto fail;
  29. - }
  30. + //if (st.st_uid != 0) {
  31. + // log_warnx("warn: %s: not owned by uid 0", name);
  32. + // errno = EACCES;
  33. + // goto fail;
  34. + //}
  35. if (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO) & ~perm) {
  36. strmode(perm, mode);
  37. log_warnx("warn: %s: insecure permissions: must be at most %s",