Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ftpd clarify the fd used for blacklisting.



details:   https://anonhg.NetBSD.org/src/rev/20f30c04cf4d
branches:  trunk
changeset: 448308:20f30c04cf4d
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Jan 29 23:19:30 2019 +0000

description:
clarify the fd used for blacklisting.

Use STDIN_FILENO instead of 0 as the fd to blacklist_r(),
since we use the former in ftpd.c

diffstat:

 libexec/ftpd/pfilter.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r f2d7bcbfba88 -r 20f30c04cf4d libexec/ftpd/pfilter.c
--- a/libexec/ftpd/pfilter.c    Tue Jan 29 22:59:03 2019 +0000
+++ b/libexec/ftpd/pfilter.c    Tue Jan 29 23:19:30 2019 +0000
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <unistd.h>
 #include <blacklist.h>
 
 #include "pfilter.h"
@@ -20,5 +21,5 @@
        if (blstate == NULL)
                return;
 
-       blacklist_r(blstate, what, 0, msg);
+       blacklist_r(blstate, what, STDIN_FILENO, msg);
 }



Home | Main Index | Thread Index | Old Index