opensmtpd-6.0.2p1-uid_0_certificate.patch (1185B)
- diff --git a/smtpd/ssl.c.old b/smtpd/ssl.c
- index 7dcd2ce..4e9d708 100644
- --- a/smtpd/ssl.c.old
- +++ b/smtpd/ssl.c
- @@ -113,11 +113,11 @@ ssl_load_file(const char *name, off_t *len, mode_t perm)
- return (NULL);
- if (fstat(fd, &st) != 0)
- goto fail;
- - if (st.st_uid != 0) {
- - log_warnx("warn: %s: not owned by uid 0", name);
- - errno = EACCES;
- - goto fail;
- - }
- + //if (st.st_uid != 0) {
- + // log_warnx("warn: %s: not owned by uid 0", name);
- + // errno = EACCES;
- + // goto fail;
- + //}
- if (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO) & ~perm) {
- strmode(perm, mode);
- log_warnx("warn: %s: insecure permissions: must be at most %s",
- @@ -201,11 +201,11 @@ ssl_load_key(const char *name, off_t *len, char *pass, mode_t perm, const char *
- if (fstat(fileno(fp), &st) != 0)
- goto fail;
- - if (st.st_uid != 0) {
- - log_warnx("warn: %s: not owned by uid 0", name);
- - errno = EACCES;
- - goto fail;
- - }
- + //if (st.st_uid != 0) {
- + // log_warnx("warn: %s: not owned by uid 0", name);
- + // errno = EACCES;
- + // goto fail;
- + //}
- if (st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO) & ~perm) {
- strmode(perm, mode);
- log_warnx("warn: %s: insecure permissions: must be at most %s",