Commit Graph

3974 Commits

Author SHA1 Message Date
Dennis Heimbigner
2633def32c Add Hack to handle winsock2 problem for cygwin 2017-09-03 16:01:18 -06:00
Dennis Heimbigner
ad32350355 Oops. Forgot to convert over libdap4 use of NC_mktmp
and NC_readfile and NC_combinehostport.
2017-09-03 15:09:10 -06:00
Dennis Heimbigner
a2e0f069ec This pr should probably be delayed until after Version 4.5.
Primary change is to cleanup code and remove duplicated code.

1. Unify the rc file reading into libdispatch/drc.c. Eventually extend
   if we need rc file for netcdf itself as opposed to the dap code.
2. Unify the extraction from the rc file of DAP authorization info.
3. Misc. other small unifications: make temp file, read file.
4. Avoid use of libcurl when reading file:// because
   there is some kind of problem with the Visual Studio version.
   Might be related to the winpath problem.
   In any case, do direct read instead.
5. Add new error code NC_ERCFILE for errors in reading RC file.
6. Complete documentation cleanup as indicated in this comment
   https://github.com/Unidata/netcdf-c/pull/472#issuecomment-325926426
7. Convert some occurrences of #ifdef _WIN32 to #ifdef _MSC_VER
2017-09-02 18:09:36 -06:00
Dennis Heimbigner
3a99220789 Make branch compile under cmake 2017-08-31 15:32:41 -06:00
Dennis Heimbigner
a17fa2ed2a add dutil.c 2017-08-31 14:36:54 -06:00
Dennis Heimbigner
35b97e0454 add dauth.c 2017-08-31 14:36:04 -06:00
Dennis Heimbigner
8e2abdeed8 Initial version 2017-08-31 14:19:56 -06:00
Dennis Heimbigner
dd8bb4f5b0 Merge branch 'master' into newrc.dmh 2017-08-30 19:32:25 -06:00
Dennis Heimbigner
7c592cfb2a 1. Unify the rc file reading into libdispatch/drc.c. Eventually extend
if we need rc file for netcdf itself as opposed to the dap code.
2017-08-30 17:44:57 -06:00
Dennis Heimbigner
15db0f15ea Clarify rc documentation 2017-08-30 12:05:04 -06:00
Dennis Heimbigner
80dbc7fb6c Undo DECODE_IDENTIFIER change 2017-08-29 18:01:26 -06:00
Dennis Heimbigner
bc9e41ae2b 1. Fix bug in ocrc.c#combinecredentials where a null user+pwd
generates garbage. This in turn interferes with using .netrc
because the garbage user+pwd can will override the
.netrc. Note that this may work ok sometimes
if the garbage happens to start with a nul character.

2. It turns out that the user:pwd combination needs to support
character escaping. One reason is the user may contain an '@' character.
The other is that modern password rules make it not unlikely that
the password will contain characters that interfere with url parsing.
So, the rule I have implemented is that all occurrences of the user:pwd
format must escape any dodgy characters. The escape format is URL escaping
of the form %XX. This applies both to user:pwd
embedded in a URL as well as the use of HTTP.CREDENTIALS.USERPASSWORD
in a .dodsrc/.daprc file. The user and password in .netrc must not
be escaped. This is now documented in docs/auth.md

The fix for #2 actually obviated #1. Now, internally, the user and pwd
are stored separately and not in the user:pwd format. They are combined
(and escaped) only when needed.
2017-08-29 14:11:15 -06:00
Dennis Heimbigner
e226cc731e Add note about .daprc vs .dodsrc 2017-08-28 15:50:33 -06:00
Dennis Heimbigner
442f4d9bc9 Fix bug in ocrc.c#combinecredentials
where a null user+pwd generates
garbage. This in turn interferes
with using .netrc because the garbage
user+pwd can (sometimes) override
the .netrc.
Not entirely sure what is going on
because it works as is under e.g. cygwin.
In any case it needs fixing.
2017-08-25 14:42:22 -06:00
Ward Fisher
f186b0800b Merge branch 'v4.5.0-release-branch' 2017-08-23 16:39:33 -06:00
Ward Fisher
ceb3b4bc1c Merge branch 'master' of https://github.com/edhartnett/netcdf-c into v4.5.0-release-branch 2017-08-21 15:16:25 -06:00
Ward Fisher
751dde9066 Merge branch 'wkliao-ghpull464' into v4.5.0-release-branch 2017-08-21 10:42:43 -06:00
Ward Fisher
b532eff1ba Merge branch 'v4.5.0-release-branch' 2017-08-21 10:13:05 -06:00
Ward Fisher
55397c345c Merge remote-tracking branch 'origin/authdoc.dmh' into v4.5.0-release-branch 2017-08-21 10:02:43 -06:00
Ward Fisher
784ed7449c Merge branch 'erange_fill_fix' of https://github.com/wkliao/netcdf-c into wkliao-ghpull464 2017-08-21 09:42:13 -06:00
Dennis Heimbigner
37834917e9 Fix up documentation to replace old auth documentation
with a revised auth.md document.
2017-08-20 18:27:48 -06:00
Dennis Heimbigner
b0cf032ddd Merge branch 'master' into authtesting.dmh 2017-08-20 15:01:19 -06:00
Wei-keng Liao
8b6d131cbe Because ncx.c and putget.c are to be released with the package in case users do not have m4, the generation of the two C files cannot depend on the configure option of --enable-erange-fill. This commit fixes this problem by replacing m4 conditional define with C conditional preprocess. 2017-08-20 14:32:57 -05:00
edhartnett
6ef8dc32fe fixed some refs 2017-08-20 04:40:27 -06:00
Wei-keng Liao
2a68d58433 avoid calling NC3_inq_var_fill when ERANGE_FILL is enabled 2017-08-20 02:04:29 -05:00
Ward Fisher
028e1b1831 Merge branch 'static-analysis' into v4.5.0-release-branch 2017-08-15 14:23:31 -06:00
edhartnett
40e53580b6 fixed some refs 2017-08-15 14:01:17 -06:00
edhartnett
6b407dd38b fixed a subsection header 2017-08-15 13:33:03 -06:00
edhartnett
50566bad6b fixed some refs 2017-08-15 13:30:55 -06:00
Ward Fisher
04f88f5d83 Corrected some potential buffer overruns flagged by clang via static analysis. 2017-08-15 12:19:05 -06:00
Ward Fisher
cfb6549606 Corrected an issue reported by clang. 2017-08-15 12:03:15 -06:00
Ward Fisher
80318f6413 Merge branch 'v4.5.0-release-branch' 2017-08-14 13:52:13 -06:00
Ward Fisher
e006ea5e07 Fixed a simple mistake in test organization. 2017-08-11 18:36:44 -06:00
Ward Fisher
85e9aaf368 Wiring in a large test to check against a regression for the issue described in https://github.com/Unidata/netcdf-c/pull/457 2017-08-11 18:18:11 -06:00
Ward Fisher
22d4754306 Merge branch 'free_mpi_obj' of https://github.com/wkliao/netcdf-c into two-pulls 2017-08-10 14:30:59 -06:00
Ward Fisher
8fcf0e53cc Merge branch 'master' of https://github.com/edhartnett/netcdf-c into two-pulls 2017-08-10 14:30:05 -06:00
Ed Hartnett
eb98d238d0 Merge branch 'master' into master 2017-08-10 12:47:17 -06:00
edhartnett
96c8e190e7 fixed table and link in Large File section 2017-08-10 12:44:57 -06:00
Ward Fisher
8251784ec2 Merge branch 'tmp' into v4.5.0-release-branch 2017-08-09 14:13:42 -06:00
Ward Fisher
290ca69a70 Merge branch '17_64BIT_DATA_bug' of https://github.com/pastewka/netcdf-c into tmp 2017-08-09 14:13:30 -06:00
Ward Fisher
5f0e76b281 Updated release notes. 2017-08-09 14:12:24 -06:00
Lars Pastewka
bd33076424 Fixed computation of recsize for NC_64BIT_DATA files. 2017-08-09 21:47:08 +02:00
Ward Fisher
b50508479a Added a new product to the static software html page. 2017-08-08 16:11:13 -06:00
Wei-keng Liao
7992242a39 Call nc_close, which calls MPI_File_close, to avoid MPI wraning messages on MPI objects are still allocated. 2017-08-08 16:54:38 -05:00
Ward Fisher
24ca95645c Applied fix for a stack buffer overflow into 4.5.0 release branch. 2017-08-08 13:18:53 -06:00
Ward Fisher
ac503dd565 Updated release notes in support of https://github.com/Unidata/netcdf-c/pull/450 2017-08-08 13:17:51 -06:00
Ward Fisher
a6e3f577f2 Merge pull request #450 from rouault/fix_nc4_check_name_buffer_overflow
Fix stack buffer overflow in nc4_check_name()
2017-08-08 13:15:42 -06:00
Ward Fisher
f6ac978f25 Merge branch 'master' into fix_nc4_check_name_buffer_overflow 2017-08-08 11:22:06 -06:00
Ward Fisher
99625c0c9f Merge branch 'v4.5.0-release-branch' 2017-08-07 14:03:17 -06:00
Ward Fisher
8ab714f1d8 Corrected a missing endif. 2017-08-07 10:23:15 -06:00