History log of /openbsd-current/libexec/ftpd/popen.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.31 17-Feb-2023 miod

Remove unused variables; ok millert@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.30 27-Dec-2020 florian

We know about optreset from unistd.h.
From Jan Stary, thanks.
OK martijn


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 15-Jan-2020 jan

Simplify globbing of ftpd(8)s list and nlst commands.
Also avoid command option injection for ls(1).

OK martijn@


Revision tags: OPENBSD_6_6_BASE
# 1.28 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


# 1.27 08-May-2019 tedu

rm dead code and simplify ftpd_popen. this code has only called
its statically linked ls_main for some time now.
from Jan Klemkow
ok deraadt


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.26 29-Feb-2016 jca

Kill unused variable.


Revision tags: OPENBSD_5_9_BASE
# 1.25 04-Oct-2015 tedu

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.24 08-Mar-2010 kettenis

Check that gl_pathc is bigger than zero before derefencing gl_pathv. While
this shouldn't happen since we specifiy GLOB_NOMAGIC, it doesn't hurt to be
paranoid, even if we fix the bug in glob(3) that causes gl_pathc to be zero
even if we specify GLOB_NOMAGIC.

ok deraadt@


# 1.23 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.22 30-Jun-2008 ragge

branches: 1.22.4; 1.22.8;
Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.21 02-Apr-2006 djm

malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaks
suggested by kjell@; ok otto@ pat@ millert@ jaredy@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.20 10-Dec-2003 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE
# 1.19 11-Jun-2003 deraadt

ansi cleanup; ok ian markus


# 1.18 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.17 02-Jul-2002 danh

* use lostconn() as the SIGALRM handler in receive_data() as originally
done by downsj@ in revision 1.54.

* some -Wall cleanup
- only declare check_host() if TCPWRAPPERS is defined.
- use socklen_t where appropriate instead of int (pointer signedness
warnings).
- {u_}char * pointer signedness warnings.

ok millert@


# 1.16 29-May-2002 mpech

More pid_t cleanup. Since 'pid' is pid_t we should:
o) in ftpd_popen() convert 'pids' from int to pid_t too;
o) in ftpd_pclose() return '-1', not pid_t, because it returns int;

millert@ ok


# 1.15 26-May-2002 deraadt

pid_t cleanup


Revision tags: OPENBSD_3_1_BASE
# 1.14 23-Jan-2002 mpech

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.13 18-Mar-2001 deraadt

use GLOB_LIMIT


# 1.12 24-Jan-2001 deraadt

proto ls_main()


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.11 08-Dec-1999 itojun

branches: 1.11.4;
IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.10 26-Feb-1999 art

implement internal ls


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE
# 1.9 29-Jun-1997 deraadt

partial Wall


Revision tags: OPENBSD_2_1_BASE
# 1.8 07-Dec-1996 bitblt

Checks to see that strdup() worked, dies with error message on failure.


# 1.7 25-Oct-1996 imp

Spacing nits


# 1.6 25-Oct-1996 imp

Better bounds checking on argv and gargv to eliminate a fencepost error
on argv and gargv variables.


# 1.5 15-Oct-1996 deraadt

nearly impossible oflow


Revision tags: OPENBSD_2_0_BASE
# 1.4 30-Jul-1996 downsj

*** empty log message ***


# 1.3 30-Jul-1996 downsj

closelog() before exec.


# 1.2 27-Jul-1996 joshd

bounds check on argv and gargv


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.30 27-Dec-2020 florian

We know about optreset from unistd.h.
From Jan Stary, thanks.
OK martijn


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 15-Jan-2020 jan

Simplify globbing of ftpd(8)s list and nlst commands.
Also avoid command option injection for ls(1).

OK martijn@


Revision tags: OPENBSD_6_6_BASE
# 1.28 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


# 1.27 08-May-2019 tedu

rm dead code and simplify ftpd_popen. this code has only called
its statically linked ls_main for some time now.
from Jan Klemkow
ok deraadt


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.26 29-Feb-2016 jca

Kill unused variable.


Revision tags: OPENBSD_5_9_BASE
# 1.25 04-Oct-2015 tedu

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.24 08-Mar-2010 kettenis

Check that gl_pathc is bigger than zero before derefencing gl_pathv. While
this shouldn't happen since we specifiy GLOB_NOMAGIC, it doesn't hurt to be
paranoid, even if we fix the bug in glob(3) that causes gl_pathc to be zero
even if we specify GLOB_NOMAGIC.

ok deraadt@


# 1.23 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.22 30-Jun-2008 ragge

branches: 1.22.4; 1.22.8;
Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.21 02-Apr-2006 djm

malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaks
suggested by kjell@; ok otto@ pat@ millert@ jaredy@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.20 10-Dec-2003 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE
# 1.19 11-Jun-2003 deraadt

ansi cleanup; ok ian markus


# 1.18 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.17 02-Jul-2002 danh

* use lostconn() as the SIGALRM handler in receive_data() as originally
done by downsj@ in revision 1.54.

* some -Wall cleanup
- only declare check_host() if TCPWRAPPERS is defined.
- use socklen_t where appropriate instead of int (pointer signedness
warnings).
- {u_}char * pointer signedness warnings.

ok millert@


# 1.16 29-May-2002 mpech

More pid_t cleanup. Since 'pid' is pid_t we should:
o) in ftpd_popen() convert 'pids' from int to pid_t too;
o) in ftpd_pclose() return '-1', not pid_t, because it returns int;

millert@ ok


# 1.15 26-May-2002 deraadt

pid_t cleanup


Revision tags: OPENBSD_3_1_BASE
# 1.14 23-Jan-2002 mpech

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.13 18-Mar-2001 deraadt

use GLOB_LIMIT


# 1.12 24-Jan-2001 deraadt

proto ls_main()


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.11 08-Dec-1999 itojun

branches: 1.11.4;
IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.10 26-Feb-1999 art

implement internal ls


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE
# 1.9 29-Jun-1997 deraadt

partial Wall


Revision tags: OPENBSD_2_1_BASE
# 1.8 07-Dec-1996 bitblt

Checks to see that strdup() worked, dies with error message on failure.


# 1.7 25-Oct-1996 imp

Spacing nits


# 1.6 25-Oct-1996 imp

Better bounds checking on argv and gargv to eliminate a fencepost error
on argv and gargv variables.


# 1.5 15-Oct-1996 deraadt

nearly impossible oflow


Revision tags: OPENBSD_2_0_BASE
# 1.4 30-Jul-1996 downsj

*** empty log message ***


# 1.3 30-Jul-1996 downsj

closelog() before exec.


# 1.2 27-Jul-1996 joshd

bounds check on argv and gargv


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.29 15-Jan-2020 jan

Simplify globbing of ftpd(8)s list and nlst commands.
Also avoid command option injection for ls(1).

OK martijn@


Revision tags: OPENBSD_6_6_BASE
# 1.28 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


# 1.27 08-May-2019 tedu

rm dead code and simplify ftpd_popen. this code has only called
its statically linked ls_main for some time now.
from Jan Klemkow
ok deraadt


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.26 29-Feb-2016 jca

Kill unused variable.


Revision tags: OPENBSD_5_9_BASE
# 1.25 04-Oct-2015 tedu

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.24 08-Mar-2010 kettenis

Check that gl_pathc is bigger than zero before derefencing gl_pathv. While
this shouldn't happen since we specifiy GLOB_NOMAGIC, it doesn't hurt to be
paranoid, even if we fix the bug in glob(3) that causes gl_pathc to be zero
even if we specify GLOB_NOMAGIC.

ok deraadt@


# 1.23 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.22 30-Jun-2008 ragge

branches: 1.22.4; 1.22.8;
Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.21 02-Apr-2006 djm

malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaks
suggested by kjell@; ok otto@ pat@ millert@ jaredy@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.20 10-Dec-2003 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE
# 1.19 11-Jun-2003 deraadt

ansi cleanup; ok ian markus


# 1.18 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.17 02-Jul-2002 danh

* use lostconn() as the SIGALRM handler in receive_data() as originally
done by downsj@ in revision 1.54.

* some -Wall cleanup
- only declare check_host() if TCPWRAPPERS is defined.
- use socklen_t where appropriate instead of int (pointer signedness
warnings).
- {u_}char * pointer signedness warnings.

ok millert@


# 1.16 29-May-2002 mpech

More pid_t cleanup. Since 'pid' is pid_t we should:
o) in ftpd_popen() convert 'pids' from int to pid_t too;
o) in ftpd_pclose() return '-1', not pid_t, because it returns int;

millert@ ok


# 1.15 26-May-2002 deraadt

pid_t cleanup


Revision tags: OPENBSD_3_1_BASE
# 1.14 23-Jan-2002 mpech

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.13 18-Mar-2001 deraadt

use GLOB_LIMIT


# 1.12 24-Jan-2001 deraadt

proto ls_main()


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.11 08-Dec-1999 itojun

branches: 1.11.4;
IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.10 26-Feb-1999 art

implement internal ls


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE
# 1.9 29-Jun-1997 deraadt

partial Wall


Revision tags: OPENBSD_2_1_BASE
# 1.8 07-Dec-1996 bitblt

Checks to see that strdup() worked, dies with error message on failure.


# 1.7 25-Oct-1996 imp

Spacing nits


# 1.6 25-Oct-1996 imp

Better bounds checking on argv and gargv to eliminate a fencepost error
on argv and gargv variables.


# 1.5 15-Oct-1996 deraadt

nearly impossible oflow


Revision tags: OPENBSD_2_0_BASE
# 1.4 30-Jul-1996 downsj

*** empty log message ***


# 1.3 30-Jul-1996 downsj

closelog() before exec.


# 1.2 27-Jul-1996 joshd

bounds check on argv and gargv


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.28 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


# 1.27 08-May-2019 tedu

rm dead code and simplify ftpd_popen. this code has only called
its statically linked ls_main for some time now.
from Jan Klemkow
ok deraadt


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.26 29-Feb-2016 jca

Kill unused variable.


Revision tags: OPENBSD_5_9_BASE
# 1.25 04-Oct-2015 tedu

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.24 08-Mar-2010 kettenis

Check that gl_pathc is bigger than zero before derefencing gl_pathv. While
this shouldn't happen since we specifiy GLOB_NOMAGIC, it doesn't hurt to be
paranoid, even if we fix the bug in glob(3) that causes gl_pathc to be zero
even if we specify GLOB_NOMAGIC.

ok deraadt@


# 1.23 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.22 30-Jun-2008 ragge

branches: 1.22.4; 1.22.8;
Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.21 02-Apr-2006 djm

malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaks
suggested by kjell@; ok otto@ pat@ millert@ jaredy@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.20 10-Dec-2003 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE
# 1.19 11-Jun-2003 deraadt

ansi cleanup; ok ian markus


# 1.18 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.17 02-Jul-2002 danh

* use lostconn() as the SIGALRM handler in receive_data() as originally
done by downsj@ in revision 1.54.

* some -Wall cleanup
- only declare check_host() if TCPWRAPPERS is defined.
- use socklen_t where appropriate instead of int (pointer signedness
warnings).
- {u_}char * pointer signedness warnings.

ok millert@


# 1.16 29-May-2002 mpech

More pid_t cleanup. Since 'pid' is pid_t we should:
o) in ftpd_popen() convert 'pids' from int to pid_t too;
o) in ftpd_pclose() return '-1', not pid_t, because it returns int;

millert@ ok


# 1.15 26-May-2002 deraadt

pid_t cleanup


Revision tags: OPENBSD_3_1_BASE
# 1.14 23-Jan-2002 mpech

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.13 18-Mar-2001 deraadt

use GLOB_LIMIT


# 1.12 24-Jan-2001 deraadt

proto ls_main()


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.11 08-Dec-1999 itojun

branches: 1.11.4;
IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.10 26-Feb-1999 art

implement internal ls


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE
# 1.9 29-Jun-1997 deraadt

partial Wall


Revision tags: OPENBSD_2_1_BASE
# 1.8 07-Dec-1996 bitblt

Checks to see that strdup() worked, dies with error message on failure.


# 1.7 25-Oct-1996 imp

Spacing nits


# 1.6 25-Oct-1996 imp

Better bounds checking on argv and gargv to eliminate a fencepost error
on argv and gargv variables.


# 1.5 15-Oct-1996 deraadt

nearly impossible oflow


Revision tags: OPENBSD_2_0_BASE
# 1.4 30-Jul-1996 downsj

*** empty log message ***


# 1.3 30-Jul-1996 downsj

closelog() before exec.


# 1.2 27-Jul-1996 joshd

bounds check on argv and gargv


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.27 08-May-2019 tedu

rm dead code and simplify ftpd_popen. this code has only called
its statically linked ls_main for some time now.
from Jan Klemkow
ok deraadt


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.26 29-Feb-2016 jca

Kill unused variable.


Revision tags: OPENBSD_5_9_BASE
# 1.25 04-Oct-2015 tedu

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.24 08-Mar-2010 kettenis

Check that gl_pathc is bigger than zero before derefencing gl_pathv. While
this shouldn't happen since we specifiy GLOB_NOMAGIC, it doesn't hurt to be
paranoid, even if we fix the bug in glob(3) that causes gl_pathc to be zero
even if we specify GLOB_NOMAGIC.

ok deraadt@


# 1.23 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.22 30-Jun-2008 ragge

branches: 1.22.4; 1.22.8;
Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.21 02-Apr-2006 djm

malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaks
suggested by kjell@; ok otto@ pat@ millert@ jaredy@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.20 10-Dec-2003 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE
# 1.19 11-Jun-2003 deraadt

ansi cleanup; ok ian markus


# 1.18 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.17 02-Jul-2002 danh

* use lostconn() as the SIGALRM handler in receive_data() as originally
done by downsj@ in revision 1.54.

* some -Wall cleanup
- only declare check_host() if TCPWRAPPERS is defined.
- use socklen_t where appropriate instead of int (pointer signedness
warnings).
- {u_}char * pointer signedness warnings.

ok millert@


# 1.16 29-May-2002 mpech

More pid_t cleanup. Since 'pid' is pid_t we should:
o) in ftpd_popen() convert 'pids' from int to pid_t too;
o) in ftpd_pclose() return '-1', not pid_t, because it returns int;

millert@ ok


# 1.15 26-May-2002 deraadt

pid_t cleanup


Revision tags: OPENBSD_3_1_BASE
# 1.14 23-Jan-2002 mpech

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.13 18-Mar-2001 deraadt

use GLOB_LIMIT


# 1.12 24-Jan-2001 deraadt

proto ls_main()


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.11 08-Dec-1999 itojun

branches: 1.11.4;
IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.10 26-Feb-1999 art

implement internal ls


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE
# 1.9 29-Jun-1997 deraadt

partial Wall


Revision tags: OPENBSD_2_1_BASE
# 1.8 07-Dec-1996 bitblt

Checks to see that strdup() worked, dies with error message on failure.


# 1.7 25-Oct-1996 imp

Spacing nits


# 1.6 25-Oct-1996 imp

Better bounds checking on argv and gargv to eliminate a fencepost error
on argv and gargv variables.


# 1.5 15-Oct-1996 deraadt

nearly impossible oflow


Revision tags: OPENBSD_2_0_BASE
# 1.4 30-Jul-1996 downsj

*** empty log message ***


# 1.3 30-Jul-1996 downsj

closelog() before exec.


# 1.2 27-Jul-1996 joshd

bounds check on argv and gargv


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.26 29-Feb-2016 jca

Kill unused variable.


Revision tags: OPENBSD_5_9_BASE
# 1.25 04-Oct-2015 tedu

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.24 08-Mar-2010 kettenis

Check that gl_pathc is bigger than zero before derefencing gl_pathv. While
this shouldn't happen since we specifiy GLOB_NOMAGIC, it doesn't hurt to be
paranoid, even if we fix the bug in glob(3) that causes gl_pathc to be zero
even if we specify GLOB_NOMAGIC.

ok deraadt@


# 1.23 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.22 30-Jun-2008 ragge

branches: 1.22.4; 1.22.8;
Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.21 02-Apr-2006 djm

malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaks
suggested by kjell@; ok otto@ pat@ millert@ jaredy@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.20 10-Dec-2003 deraadt

spacing


Revision tags: OPENBSD_3_4_BASE
# 1.19 11-Jun-2003 deraadt

ansi cleanup; ok ian markus


# 1.18 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.17 02-Jul-2002 danh

* use lostconn() as the SIGALRM handler in receive_data() as originally
done by downsj@ in revision 1.54.

* some -Wall cleanup
- only declare check_host() if TCPWRAPPERS is defined.
- use socklen_t where appropriate instead of int (pointer signedness
warnings).
- {u_}char * pointer signedness warnings.

ok millert@


# 1.16 29-May-2002 mpech

More pid_t cleanup. Since 'pid' is pid_t we should:
o) in ftpd_popen() convert 'pids' from int to pid_t too;
o) in ftpd_pclose() return '-1', not pid_t, because it returns int;

millert@ ok


# 1.15 26-May-2002 deraadt

pid_t cleanup


Revision tags: OPENBSD_3_1_BASE
# 1.14 23-Jan-2002 mpech

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.13 18-Mar-2001 deraadt

use GLOB_LIMIT


# 1.12 24-Jan-2001 deraadt

proto ls_main()


Revision tags: OPENBSD_2_7_BASE OPENBSD_2_8_BASE
# 1.11 08-Dec-1999 itojun

branches: 1.11.4;
IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking


Revision tags: OPENBSD_2_5_BASE OPENBSD_2_6_BASE
# 1.10 26-Feb-1999 art

implement internal ls


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE
# 1.9 29-Jun-1997 deraadt

partial Wall


Revision tags: OPENBSD_2_1_BASE
# 1.8 07-Dec-1996 bitblt

Checks to see that strdup() worked, dies with error message on failure.


# 1.7 25-Oct-1996 imp

Spacing nits


# 1.6 25-Oct-1996 imp

Better bounds checking on argv and gargv to eliminate a fencepost error
on argv and gargv variables.


# 1.5 15-Oct-1996 deraadt

nearly impossible oflow


Revision tags: OPENBSD_2_0_BASE
# 1.4 30-Jul-1996 downsj

*** empty log message ***


# 1.3 30-Jul-1996 downsj

closelog() before exec.


# 1.2 27-Jul-1996 joshd

bounds check on argv and gargv


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision