From bddb3008a552114ea38bea45d9525eb11b2b234b Mon Sep 17 00:00:00 2001 From: Lemon Lam Date: Wed, 25 Mar 2026 12:37:27 +0800 Subject: [PATCH 1/2] opensmtpd: patch another usage of PATH_LIBEXEC --- pkgs/by-name/op/opensmtpd/proc_path.diff | 37 +++++++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/op/opensmtpd/proc_path.diff b/pkgs/by-name/op/opensmtpd/proc_path.diff index a60bb603aacf..b1e948b8ba4d 100644 --- a/pkgs/by-name/op/opensmtpd/proc_path.diff +++ b/pkgs/by-name/op/opensmtpd/proc_path.diff @@ -1,8 +1,8 @@ diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c -index e049f07c..a1bd03a0 100644 +index 2365b1ee..b1b6bcec 100644 --- a/usr.sbin/smtpd/smtpd.c +++ b/usr.sbin/smtpd/smtpd.c -@@ -1157,6 +1157,7 @@ fork_proc_backend(const char *key, const char *conf, const char *procname) +@@ -1224,6 +1224,7 @@ fork_proc_backend(const char *key, const char *conf, const char *procname, char path[PATH_MAX]; char name[PATH_MAX]; char *arg; @@ -10,7 +10,7 @@ index e049f07c..a1bd03a0 100644 if (strlcpy(name, conf, sizeof(name)) >= sizeof(name)) { log_warnx("warn: %s-proc: conf too long", key); -@@ -1167,7 +1168,12 @@ fork_proc_backend(const char *key, const char *conf, const char *procname) +@@ -1234,7 +1235,12 @@ fork_proc_backend(const char *key, const char *conf, const char *procname, if (arg) *arg++ = '\0'; @@ -24,20 +24,41 @@ index e049f07c..a1bd03a0 100644 (ssize_t)sizeof(path)) { log_warn("warn: %s-proc: exec path too long", key); return (-1); +@@ -1387,6 +1393,7 @@ fork_filter_process(const char *name, const char *command, const char *user, con + int sp[2], errfd[2]; + struct passwd *pw; + struct group *gr; ++ char *proc_path; + char exec[_POSIX_ARG_MAX]; + int execr; + +@@ -1455,8 +1462,12 @@ fork_filter_process(const char *name, const char *command, const char *user, con + if (command[0] == '/') + execr = snprintf(exec, sizeof(exec), "exec %s", command); + else ++ proc_path = getenv("OPENSMTPD_PROC_PATH"); ++ if (proc_path == NULL) { ++ proc_path = PATH_LIBEXEC; ++ } + execr = snprintf(exec, sizeof(exec), "exec %s/%s", +- PATH_LIBEXEC, command); ++ proc_path, command); + if (execr >= (int) sizeof(exec)) + fatalx("%s: exec path too long", name); + diff --git a/usr.sbin/smtpd/table.c b/usr.sbin/smtpd/table.c -index 9cfdfb99..24dfcca4 100644 +index e62b47af..2ee186bf 100644 --- a/usr.sbin/smtpd/table.c +++ b/usr.sbin/smtpd/table.c -@@ -201,6 +201,7 @@ table_create(const char *backend, const char *name, const char *tag, +@@ -229,17 +229,23 @@ table_create(struct smtpd *conf, const char *backend, const char *name, + struct table *t; struct table_backend *tb; - char buf[LINE_MAX]; char path[LINE_MAX]; + const char *proc_path; size_t n; struct stat sb; -@@ -215,11 +216,16 @@ table_create(const char *backend, const char *name, const char *tag, - if (name && table_find(name, NULL)) + if (name && table_find(conf, name)) fatalx("table_create: table \"%s\" already defined", name); + proc_path = getenv("OPENSMTPD_PROC_PATH"); From acf8f668ed0a4068e27c6b4340e08cb59cb40878 Mon Sep 17 00:00:00 2001 From: Lemon Lam Date: Wed, 25 Mar 2026 13:00:59 +0800 Subject: [PATCH 2/2] doc: backward incompatibility of `opensmtpd-filter-dkimsign` --- doc/release-notes/rl-2605.section.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index a66e6abcd87a..85fb2cac10eb 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -216,6 +216,8 @@ - `light` has been removed because it was unmaintained. `brightnessctl` and `acpilight` provide similar functionality. +- `opensmtpd-filter-dkimsign` is now installed into `libexec/smtpd` instead of `libexec/opensmtpd` so that now it is properly linked into the environment built by `services.opensmtpd.procPackages`. If you hardcoded path to `filter-dkimsign` please consider using this option. + - `services.openssh.settings.AcceptEnv` now explicitly defined as an option that takes a list of strings, to facilitate option merging. Setting it to a string value is no longer supported. - All Xfce packages have been moved to top level (e.g. if you previously added `pkgs.xfce.xfce4-whiskermenu-plugin` to `environment.systemPackages`, you will need to change it to `pkgs.xfce4-whiskermenu-plugin`). The `xfce` scope will be removed in NixOS 26.11.