diff options
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index d11468d3f31..dba6c538ba3 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.149 2003/11/20 12:32:34 jmc Exp $ */ +/* $OpenBSD: ftpd.c,v 1.150 2003/12/09 07:22:10 beck Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -70,7 +70,7 @@ static const char copyright[] = static const char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94"; #else static const char rcsid[] = - "$OpenBSD: ftpd.c,v 1.149 2003/11/20 12:32:34 jmc Exp $"; + "$OpenBSD: ftpd.c,v 1.150 2003/12/09 07:22:10 beck Exp $"; #endif #endif /* not lint */ @@ -1290,7 +1290,9 @@ getdatasock(char *mode) if (data >= 0) return (fdopen(data, mode)); sigprocmask (SIG_BLOCK, &allsigs, NULL); + (void) seteuid(0); s = socket(ctrl_addr.su_family, SOCK_STREAM, 0); + (void) seteuid((uid_t)pw->pw_uid); if (s < 0) goto bad; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, |