Commit Graph

22 Commits

Author SHA1 Message Date
Dennis Heimbigner
4db4393e69 Begin changing over to use strlcat instead of strncat because
strlcat provides better protection against buffer overflows.

Code is taken from the FreeBSD project source code. Specifically:
https://github.com/freebsd/freebsd/blob/master/lib/libc/string/strlcat.c
License appears to be acceptable, but needs to be checked by e.g. Debian.

Step 1:
1. Add to netcdf-c/include/ncconfigure.h to use our version
   if not already available as determined by HAVE_STRLCAT in config.h.
2. Add the strlcat code to libdispatch/dstring.c
3. Turns out that strlcat was already defined in several places.
   So remove it from:
	ncgen3/genlib.c
	ncdump/dumplib.c
3. Define strlcat extern definition in ncconfigure.h.
4. Modify following directories to use strlcat:
	libdap2 libdap4 ncdap_test dap4_test
   Will do others in subsequent steps.
2017-11-23 10:55:24 -07:00
Ed Hartnett
21053f5c49 clean up and removal of extra_tests 2017-11-17 15:35:14 -07:00
Ed Hartnett
bd556cd79f fix for make -j check in test_dap4 2017-11-17 12:35:07 -07:00
Ed Hartnett
66ddc9dfb4 getting make -j check working 2017-11-17 10:49:06 -07:00
Ward Fisher
16d6f94f30 Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
Ed Hartnett
74519d550b moved tests dependant on ncdump inside BUILD_UTILITIES block in Makefile.am files 2017-11-04 08:12:48 -06:00
Dennis Heimbigner
733da154c5 1. Keep up to date by merging master
2. Factored out the parameter string parsing for ncgen and nccopy
   int libdispatch/dfilter.c + include/ncfilter.h
3. Allow a parameter string to use constant types other than
   unsigned int. See docs/filters.md for details.
4. Moved the old content of  include/netcdf_filter.h into include/netcdf.h
   and removed include/netcdf_filter.h as no longer needed.
5. Force the test filter (bzip2) in nc_test4/filter_test to
   be built using BUILT_SOURCES.
2017-10-08 15:56:45 -06:00
Ward Fisher
ba4fb024aa Added CMakeLists.txt to release distribution files. 2017-09-27 13:05:57 -06:00
Dennis Heimbigner
e9888829f0 Suppress debug output 2017-08-29 15:10:55 -06:00
Ward Fisher
05d3d7e9f5 Merge remote-tracking branch 'origin/d4tempfile.dmh' into v4.5.0-release-branch 2017-08-07 10:12:36 -06:00
Dennis Heimbigner
4d8fbbf501 If DAP (2 or 4) is enabled, but diskless is disabled, then the
dap code will create a real temporary file in which to store the
converted metadata for the DAP .dds or .dmr.

It was assumed that the nc_close code would reclaim the
temporary file. For DAP2, reclamation occurs in the ncio
code. For DAP4, it was assumed that the libsrc4 code would do
the reclamation, but for whatever reason, this is not happening.
Thus, in this situation, a temporary file is left in the file
system. Aside from being irritating to users, this screws up
'make distcheck'.

So the DAP4 code is fixed to ensure that the temporary file is
properly reclaimed independent of the libsrc4 code.
2017-08-05 22:41:31 -06:00
Ward Fisher
e0a1b9aafe Merge branch 'master' into fieldmap.dmh 2017-06-07 14:14:33 -06:00
Ward Fisher
1a2716b230 Changed the shell for a test to bash to catch a missing utility in some environments. 2017-05-31 11:00:04 -06:00
Dennis Heimbigner
7070ad14a7 Missing CMakeLists.txt files 2017-05-17 19:33:03 -06:00
Dennis Heimbigner
3a74ee9a94 Decided that dap4 <Map>'s that refer to struct
or seq fields is not a well-defined concept. So
for now, I am disallowing them.  Required
updating a number of test files in
dap4_test. This is tagged by the line
#undef ALLOWFIELDMAPS
in ./libdap4/ncd4types.h.  This should
affect only dap4 and nothing else.
2017-05-17 17:53:59 -06:00
Dennis Heimbigner
132ac21c46 ckp 2017-05-17 12:30:24 -06:00
Ward Fisher
076596ee7e Corrected an issue with missing CMakeLists files, missing directories in the build directory structure. 2017-04-13 15:54:32 -06:00
Dennis Heimbigner
a2090ccc0d Add debug output for libdap4/d4read.c 2017-04-10 12:04:20 -06:00
DennisHeimbigner
7fb4edd6d9 Update test_raw.sh
Quick fix for test_raw under msys
2017-04-07 15:43:01 -06:00
Dennis Heimbigner
6d8809100f Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh)
1. When running under windows (as opposed to cygwin)
   we need to make sure to not user /cygdrive/ file paths.
   This was ocurring in libdap4/d4read.c, but may occur
   elsewhere.
2. Shell scripts in the git repo are not being checked-out
   with the executable mode set. Had core.filemode set to false.
   Was a major hassle to fix.
2017-04-03 21:39:44 -06:00
Dennis Heimbigner
3432d4f950 Enable dap4 by default; disable dap4 remote tests 2017-03-30 15:25:20 -06:00
Dennis Heimbigner
3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00