summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libexec/ftpd/ftpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 1b1f45c..8d44c7b 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1810,7 +1810,6 @@ getdatasock(char *mode)
if (data >= 0)
return (fdopen(data, mode));
- (void) seteuid((uid_t)0);
s = socket(data_dest.su_family, SOCK_STREAM, 0);
if (s < 0)
@@ -1820,6 +1819,7 @@ getdatasock(char *mode)
/* anchor socket to avoid multi-homing problems */
data_source = ctrl_addr;
data_source.su_port = htons(dataport);
+ (void) seteuid((uid_t)0);
for (tries = 1; ; tries++) {
if (bind(s, (struct sockaddr *)&data_source,
data_source.su_len) >= 0)
OpenPOWER on IntegriCloud