]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
mlmmj-process: pass the owner via file descriptor to mlmmj-send
authorBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 8 Mar 2023 10:07:26 +0000 (11:07 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Wed, 8 Mar 2023 10:07:26 +0000 (11:07 +0100)
src/mlmmj-process.c

index 638752a9ff7162ba087770fa0112473860c04555..ab6f93a4745b067ec6d2f62090a765454c491eaa 100644 (file)
@@ -640,7 +640,8 @@ int main(int argc, char **argv)
        if (!subject) subject = xstrdup("");
 
        if(recipextra) {
-               xasprintf(&owner, "%s/control/owner", ml.dir);
+               int ownfd = openat(ml.ctrlfd, "owner", O_RDONLY);
+               xasprintf(&owner, "%d", ownfd);
                if(owner && strcmp(recipextra, "owner") == 0) {
                        /* Why is this here, and not in listcontrol() ?
                         * -- mortenp 20060409 */