History log of /openbsd-current/usr.bin/ssh/sftp-glob.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.33 10-Sep-2023 djm

rename remote_glob() -> sftp_glob() to match other API


# 1.32 08-Sep-2023 djm

the sftp code was one of my first contributions to OpenSSH and it
shows - the function names are terrible.

Rename do_blah() to sftp_blah() to make them less so.

Completely mechanical except for sftp_stat() and sftp_lstat() which
change from returning a pointer to a static variable (error-prone) to
taking a pointer to a caller-provided receiver.


Revision tags: OPENBSD_7_3_BASE
# 1.31 24-Oct-2022 djm

when scp(1) is using the SFTP protocol for transport (the default),
better match scp/rcp's handling of globs that don't match the globbed
characters but do match literally (e.g. trying to transfer "foo.[1]").

Previously scp(1) in SFTP mode would not match these pathnames but
legacy scp/rcp mode would.

Reported by Michael Yagliyan in bz3488; ok dtucker@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.30 25-Feb-2022 dtucker

Remove the char * casts from arguments to do_lstat, do_readdir and
do_stat paths since the underlying functions now take a const char *.
Patch from vapier at gentoo.org.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.29 13-Nov-2019 deraadt

stdarg.h required more broadly; ok djm


Revision tags: OPENBSD_6_6_BASE
# 1.28 02-Oct-2019 djm

remove some duplicate #includes


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE 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.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@


# 1.32 08-Sep-2023 djm

the sftp code was one of my first contributions to OpenSSH and it
shows - the function names are terrible.

Rename do_blah() to sftp_blah() to make them less so.

Completely mechanical except for sftp_stat() and sftp_lstat() which
change from returning a pointer to a static variable (error-prone) to
taking a pointer to a caller-provided receiver.


Revision tags: OPENBSD_7_3_BASE
# 1.31 24-Oct-2022 djm

when scp(1) is using the SFTP protocol for transport (the default),
better match scp/rcp's handling of globs that don't match the globbed
characters but do match literally (e.g. trying to transfer "foo.[1]").

Previously scp(1) in SFTP mode would not match these pathnames but
legacy scp/rcp mode would.

Reported by Michael Yagliyan in bz3488; ok dtucker@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.30 25-Feb-2022 dtucker

Remove the char * casts from arguments to do_lstat, do_readdir and
do_stat paths since the underlying functions now take a const char *.
Patch from vapier at gentoo.org.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.29 13-Nov-2019 deraadt

stdarg.h required more broadly; ok djm


Revision tags: OPENBSD_6_6_BASE
# 1.28 02-Oct-2019 djm

remove some duplicate #includes


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE 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.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@


# 1.31 24-Oct-2022 djm

when scp(1) is using the SFTP protocol for transport (the default),
better match scp/rcp's handling of globs that don't match the globbed
characters but do match literally (e.g. trying to transfer "foo.[1]").

Previously scp(1) in SFTP mode would not match these pathnames but
legacy scp/rcp mode would.

Reported by Michael Yagliyan in bz3488; ok dtucker@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.30 25-Feb-2022 dtucker

Remove the char * casts from arguments to do_lstat, do_readdir and
do_stat paths since the underlying functions now take a const char *.
Patch from vapier at gentoo.org.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.29 13-Nov-2019 deraadt

stdarg.h required more broadly; ok djm


Revision tags: OPENBSD_6_6_BASE
# 1.28 02-Oct-2019 djm

remove some duplicate #includes


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE 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.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@


# 1.30 25-Feb-2022 dtucker

Remove the char * casts from arguments to do_lstat, do_readdir and
do_stat paths since the underlying functions now take a const char *.
Patch from vapier at gentoo.org.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.29 13-Nov-2019 deraadt

stdarg.h required more broadly; ok djm


Revision tags: OPENBSD_6_6_BASE
# 1.28 02-Oct-2019 djm

remove some duplicate #includes


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE 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.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@


# 1.29 13-Nov-2019 deraadt

stdarg.h required more broadly; ok djm


Revision tags: OPENBSD_6_6_BASE
# 1.28 02-Oct-2019 djm

remove some duplicate #includes


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE 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.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@


# 1.28 02-Oct-2019 djm

remove some duplicate #includes


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE 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.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.27 14-Jan-2015 djm

update sftp client and server to new buffer API.
pretty much just mechanical changes; with & ok markus


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.26 08-Nov-2013 dtucker

Include stdlib.h for free() as per the man page.


# 1.25 08-Nov-2013 djm

use calloc for all structure allocations; from markus@


Revision tags: OPENBSD_5_4_BASE
# 1.24 17-May-2013 djm

branches: 1.24.2;
bye, bye xfree(); ok markus@


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.23 04-Oct-2011 djm

branches: 1.23.6;
silence error spam for "ls */foo" in directory with files; bz#1683


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.22 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.21 22-Jul-2006 stevesk

move #include <string.h> out of includes.h


# 1.20 10-Jul-2006 stevesk

buffer.h only needed in sftp-common.h and remove some unneeded
user includes; ok djm@


# 1.19 25-Mar-2006 djm

Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that
Theo nuked - our scripts to sync -portable need them in the files


# 1.18 19-Mar-2006 deraadt

RCSID() can die


Revision tags: OPENBSD_3_9_BASE
# 1.17 20-Feb-2006 stevesk

branches: 1.17.2;
move #include <sys/stat.h> out of includes.h; ok markus@


# 1.16 08-Feb-2006 stevesk

move #include <dirent.h> out of includes.h; ok markus@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE
# 1.15 17-Feb-2004 djm

branches: 1.15.8;
Remove useless headers; ok deraadt@


# 1.14 17-Feb-2004 djm

switch to license.template for code written by me (belated, I know...)


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 11-Sep-2002 djm

branches: 1.13.4; 1.13.6;
support for short/long listings and globbing in "ls"; ok markus@


# 1.12 04-Jul-2002 deraadt

patch memory leaks; grendel@zeitbombe.org


# 1.11 30-Jun-2002 deraadt

minor KNF


Revision tags: OPENBSD_3_1_BASE
# 1.10 13-Feb-2002 djm

branches: 1.10.2;
API cleanup and backwards compat for filexfer v.0 servers; ok markus@


# 1.9 19-Dec-2001 deraadt

basic KNF done while i was looking for something else


Revision tags: OPENBSD_3_0_BASE
# 1.8 14-Jul-2001 stevesk

branches: 1.8.2;
delete spurious #includes; ok deraadt@ markus@


# 1.7 05-Jul-2001 espie

Directly cast to the right type. Ok markus@


# 1.6 23-Jun-2001 itojun

more strict prototypes. raise warning level in Makefile.inc. markus ok'ed
TODO; cleanup headers


Revision tags: OPENBSD_2_9_BASE
# 1.5 15-Apr-2001 markus

branches: 1.5.2;
some unused variable and typos; from tomh@po.crl.go.jp


# 1.4 05-Apr-2001 markus

fix whitespace: unexpand + trailing spaces.


# 1.3 03-Apr-2001 stevesk

free() -> xfree()


# 1.2 16-Mar-2001 djm

branches: 1.2.2; 1.2.4;
Revise globbing for get/put to be more shell-like. In particular,
"get/put file* directory/" now works. ok markus@


# 1.1 13-Mar-2001 djm

sftp client filename globbing for get, put, ch{mod,grp,own}. ok markus@