summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2004-07-30 16:57:42 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2004-07-30 16:57:42 +0000
commit6c124a8422a416066fc7de11c36df4988b802efa (patch)
tree2c3f2c4554f849cd375e61273595b07244bf4111 /libexec
parentbc35f5dc9ec68eeff5cd5861c275b52ed483095f (diff)
Notes
Diffstat (limited to 'libexec')
-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 1b1f45cba8b3..8d44c7b8f457 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)