aboutsummaryrefslogtreecommitdiff
path: root/lib/smb.c
AgeCommit message (Collapse)Author
2018-02-09get_posix_time: only check for overflows if they can happen!Daniel Stenberg
2018-01-30time: support > year 2038 time stamps for system with 32bit longDaniel Stenberg
... with the introduction of CURLOPT_TIMEVALUE_LARGE and CURLINFO_FILETIME_T. Fixes #2238 Closes #2264
2018-01-16SMB: fix numeric constant suffix and variable typesDaniel Stenberg
1. don't use "ULL" suffix since unsupported in older MSVC 2. use curl_off_t instead of custom long long ifdefs 3. make get_posix_time() not do unaligned data access Fixes #2211 Closes #2240 Reported-by: Chester Liu
2017-11-13SMB: fix uninitialized local variableDaniel Stenberg
Reported-by: Brian Carpenter
2017-07-09smb: rename variable to fix shadowing warningMarcel Raad
GCC 4.6.3 on travis complains: smb.c: In function ‘get_posix_time’: smb.c:725:13: error: declaration of ‘time’ shadows a global declaration [-Werror=shadow] Fix this by renaming the variable.
2017-07-04smb: add support for CURLOPT_FILETIMEGisle Vanem
Bug: https://curl.haxx.se/mail/lib-2017-07/0005.html Closes #1643
2017-07-04smb: fix build for djgpp/MSDOSGisle Vanem
bug: https://curl.haxx.se/mail/lib-2017-07/0005.html
2017-06-30handler: refactor connection checkingMax Dymond
Add a new type of callback to Curl_handler which performs checks on the connection. Alter RTSP so that it uses this callback to do its own check on connection health.
2017-05-01upload: UPLOAD_BUFSIZE is now for the upload bufferDaniel Stenberg
2017-03-29NTLM: check for features with #ifdef instead of #ifMarcel Raad
Feature defines are normally checked with #ifdef instead of #if in the rest of the codebase. Additionally, some compilers warn when a macro is implicitly evaluated to 0 because it is not defined, which was the case here. Ref: https://github.com/curl/curl/pull/1362#discussion_r108605101 Closes https://github.com/curl/curl/pull/1367
2017-02-20smb: use getpid replacement for windows UWP buildsDaniel Stenberg
Source: https://github.com/Microsoft/vcpkg/blob/7676b8780db1e1e591c4fc7eba4f96f73c428cb4/ports/curl/0002_fix_uwp.patch
2017-02-14smb: code indentDaniel Stenberg
2016-11-24Declare endian read functions argument as a const pointer.Patrick Monnerat
This is done for all functions of the form Curl_read[136][624]_[lb]e.
2016-10-09smb: properly check incoming packet boundariesTobias Stoeckmann
Not all reply messages were properly checked for their lengths, which made it possible to access uninitialized memory (but this does not lead to out of boundary accesses). Closes #1052
2016-06-29conn: don't free easy handle data in handler->disconnectDaniel Stenberg
Reported-by: Gou Lingfeng Bug: https://curl.haxx.se/mail/lib-2016-06/0139.html
2016-06-22internals: rename the SessionHandle struct to Curl_easyDaniel Stenberg
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
2015-11-21smb.c: Fixed compilation warningsSteve Holme
smb.c:134:3: warning: conversion to 'short unsigned int' from 'int' may alter its value smb.c:146:42: warning: conversion to 'unsigned int' from 'long long unsigned int' may alter its value smb.c:146:65: warning: conversion to 'unsigned int' from 'long long unsigned int' may alter its value
2015-06-17SMB: rangecheck values read off incoming packetDaniel Stenberg
CVE-2015-3237 Detected by Coverity. CID 1299430. Bug: http://curl.haxx.se/docs/adv_20150617B.html
2015-03-24curl_memory: make curl_memory.h the second-last header file loadedDan Fandrich
This header file must be included after all header files except memdebug.h, as it does similar memory function redefinitions and can be similarly affected by conflicting definitions in system or dependent library headers.
2015-03-16free: instead of Curl_safefree()Daniel Stenberg
Since we just started make use of free(NULL) in order to simplify code, this change takes it a step further and: - converts lots of Curl_safefree() calls to good old free() - makes Curl_safefree() not check the pointer before free() The (new) rule of thumb is: if you really want a function call that frees a pointer and then assigns it to NULL, then use Curl_safefree(). But we will prefer just using free() from now on.
2015-01-01smb: Use endian functions for reading NBT and message size valuesSteve Holme
2015-01-01smb.c: Fixed compilation warningsSteve Holme
smb.c:780: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign smb.c:781: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign smb.c:804: warning: passing 'char *' to parameter of type 'unsigned char *' converts between pointers to integer types with different sign
2014-12-31smb: Use endian functions for reading length and offset valuesSteve Holme
2014-12-30smb.c: Fixed compilation warningSteve Holme
smb.c:586: warning: conversion to 'short unsigned int' from 'int' may alter its value
2014-12-30smb: Use the connection's upload bufferBill Nagel
Use the connection's upload buffer instead of allocating our own send buffer.
2014-12-29smb: Close the connection after a failed client writeBill Nagel
2014-12-24smb: Use standard naming for setup connection functionSteve Holme
Renamed smb_setup() to smb_setup_connection() to follow more widely used function naming.
2014-12-21smb: use memcpy() instead of strncpy()Daniel Stenberg
... as it never copies the trailing zero anyway and always just the four bytes so let's not mislead anyone into thinking it is actually treated as a string. Coverity CID: 1260214
2014-12-14smb.c: Fixed code analysis warningSteve Holme
smb.c:320: warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Result may not be an expected value
2014-12-14smb: Use HAVE_PROCESS_H for process.h inclusionSteve Holme
Rather than testing against _WIN32 use the preferred HAVE_PROCESS_H pre-processor define when including process.h.
2014-12-14smb: Fixed unnecessary initialisation of struct member variablesSteve Holme
There is no need to set the 'state' and 'result' member variables to SMB_REQUESTING (0) and CURLE_OK (0) after the allocation via calloc() as calloc() initialises the contents to zero.
2014-12-13smb.c: Fixed line longer than 79 columnsSteve Holme
2014-12-13smb: Added state change functions to assist with debuggingSteve Holme
For debugging purposes, and as per other protocols within curl, added state change functions rather than changing the states directly.
2014-12-12smb: Disable SMB when 64-bit integers are not supportedSteve Holme
This fixes compilation issues with compilers that don't support 64-bit integers through long long or __int64.
2014-12-09smb: fix unused return code warningDaniel Stenberg
2014-12-08SMB: Fix a data size mismatch that broke SMB on big-endian platformsPatrick Monnerat
2014-12-07smb: Fixed Windows autoconf builds following commit eb88d778e7Steve Holme
As Windows based autoconf builds don't yet define USE_WIN32_CRYPTO either explicitly through --enable-win32-cypto or automatically on _WIN32 based platforms, subsequent builds broke with the following error message: "Can't compile NTLM support without a crypto library."
2014-12-07smb: Build with SSPI enabledBill Nagel
Build SMB/CIFS protocol support when SSPI is enabled.
2014-12-06smb: Fixed a problem with large file transfersSteve Holme
Fixed an issue with the message size calculation where the raw bytes from the buffer were interpreted as signed values rather than unsigned values. Reported-by: Gisle Vanem Assisted-by: Bill Nagel
2014-12-06smb: Moved the URL decoding into a separate functionSteve Holme
2014-12-06smb: Fixed URL encoded URLs not workingSteve Holme
2014-12-05SMB: Fix big endian problems. Make it OS/400 aware.Patrick Monnerat
2014-12-02smb: Don't try to connect with empty credentialsSteve Holme
On some platforms curl would crash if no credentials were used. As such added detection of such a use case to prevent this from happening. Reported-by: Gisle Vanem
2014-12-02smb.c: Coding policing of pointer usageSteve Holme
2014-11-30smb.c: use size_t as input argument types for msg sizesDaniel Stenberg
This fixes warnings about conversions to int
2014-11-30smb.c: Fixed compilation warningsSteve Holme
smb.c:398: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long' smb.c:443: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and 'unsigned long'
2014-11-30smb.c: Fixed compilation warningsSteve Holme
smb.c:322: warning: conversion to 'short unsigned int' from 'unsigned int' may alter its value smb.c:323: warning: conversion to 'short unsigned int' from 'unsigned int' may alter its value smb.c:482: warning: conversion to 'short unsigned int' from 'int' may alter its value smb.c:521: warning: conversion to 'unsigned int' from 'curl_off_t' may alter its value smb.c:549: warning: conversion to 'unsigned int' from 'curl_off_t' may alter its value smb.c:550: warning: conversion to 'short unsigned int' from 'int' may alter its value
2014-11-30smb.c: Renamed SMB command message variables to avoid compiler warningsSteve Holme
smb.c:489: warning: declaration of 'close' shadows a global declaration smb.c:511: warning: declaration of 'read' shadows a global declaration smb.c:528: warning: declaration of 'write' shadows a global declaration
2014-11-30smb.c: Fixed compilation warningsSteve Holme
smb.c:212: warning: unused parameter 'done' smb.c:380: warning: ISO C does not allow extra ';' outside of a function smb.c:812: warning: unused parameter 'premature' smb.c:822: warning: unused parameter 'dead'