Permalink
Commits on Jul 5, 2017
  1. Fix out-of-tree build on MINGW.

    larskanis committed with freddy77 Jul 5, 2017
Commits on Jul 3, 2017
  1. Fix unencrypted login with Sybase

    Do not declare we support encryption if is disabled.
    This regression was introduced in
    f0400f5 ("Use different
    encryption level for Sybase and MSSQL").
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    Reported-by: Fredy Paquet <fredy@opag.ch>
    freddy77 committed Jul 3, 2017
Commits on Jun 27, 2017
  1. Do not change login structure logging in

    This make automatic protocol detection behave differently
    than not automatic.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 26, 2017
  2. Allows to use constant string in string functions

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 27, 2017
Commits on Jun 18, 2017
  1. dblib: dbsprhead: tdsdump_log buffer address only

    The buffer passed to dbsprhead might be uninitialized; printing it as
    a string doesn't make much sense. Output its address (using "%p")
    instead.
    RavuAlHemio committed Jun 17, 2017
  2. dblib: dbsprhead: adjust buf_len by name length

    After copying the column name into the buffer in dbsprhead, reduce
    buf_len, which is used to guard against writing outside the buffer, by
    the length of the column name.
    RavuAlHemio committed with freddy77 Jun 17, 2017
Commits on Jun 17, 2017
  1. tds: Escape left brace in regex in encodings.pl

    Since Perl v5.22.0, unescaped left braces ('{') in regexes are
    deprecated; since Perl v5.26.0, they are forbidden in most cases.
    Escape such a case in encodings.pl using a backslash.
    RavuAlHemio committed Jun 17, 2017
Commits on Jun 11, 2017
  1. ctlib: fix type cast

    The argument is a CS_BOOL, not a char. This worked only on little
    endian platforms.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 11, 2017
  2. tds: fix typo in some error log

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 11, 2017
  3. dblib: use dblib type instead of C one

    This make code a bit more coherent.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 11, 2017
  4. dblib: remove some signed/unsigned comparison

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 11, 2017
Commits on Jun 8, 2017
  1. support Linux system < 2.6.27 having eventfd

    Before this version eventfd didn't accept and have flags support.
    Try to create the eventfd without flags and then set later.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 8, 2017
Commits on Jun 7, 2017
  1. cmake: Compile pool

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 6, 2017
  2. appveyor: Add missing tools and include to artifacts

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 7, 2017
  3. pool: Fix some compatibility with Windows

    Do not include Unix headers.
    Call proper socket portability wrapper.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 7, 2017
Commits on Jun 6, 2017
  1. pool: Allows to specify different login for server side

    This allows clients to use normal logins while connecting to
    server with different account. Can be used for instance to
    use domain server logins on server side or to use dummy
    account to connect to the pool.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 6, 2017
  2. pool: Avoid crash if password setting is missing

    Test on user.c was causing a crash due to NULL dereference.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 6, 2017
  3. Fix ct_options for CS_OPT_ARITHIGNORE and CS_OPT_ARITHABORT

    The two options required just normal boolean processing.
    
    This problem was reported by Matt Meissner.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Jun 6, 2017
Commits on May 24, 2017
  1. Fix a leak in bcp_getl test

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed May 24, 2017
  2. Fix bulk copy setting

    By default bulk copy is enabled but the usage of bulk_copy
    field in TDSLOGIN where a bit weird.
    Make clear and document that bulk_copy != 0 means enabled.
    Also fix a mismatch between BCP_SETL and bcp_getl.
    This fix bug #119 ("BCP_SETL() and bcp_getl() have inconsistant API").
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed May 24, 2017
Commits on May 17, 2017
  1. Fix compile if TLS is disabled

    tds_ssl_deinit have to be defined including the proper header.
    This as if TLS is disabled the function is defined in the header.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed May 17, 2017
Commits on May 3, 2017
  1. Move tdsstring.c to src/utils

    Not really dependent in TDS stuff so move to utils.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed May 3, 2017
  2. Separate some generic macro into a new macros.h header

    Allow to use inside src/utils (which should not be based on any
    specific TDS files).
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed May 3, 2017
Commits on May 2, 2017
  1. Fix very big login packet using MSSQL

    If login packet is really big to split into multiple TDS packets
    and is encrypted MSSQL only encrypt the first TDS packet, the others
    are not encrypted.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 30, 2017
  2. Define proper visibility for tds_invalid_funcs symbol

    This allows to detect if symbol is not defined in output
    libraries.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed May 2, 2017
  3. Fix encryption = off treated like encryption = request in freetds.conf

    Also updated the documentation to describe how the encryption default
    depends on the tds version. Existing users of encryption should be ok,
    since TDS_ENCRYPTION_DEFAULT always becomes either TDS_ENCRYPTION_OFF
    or TDS_ENCRYPTION_REQUEST.
    
    For #110
    George Carrette committed with freddy77 May 2, 2017
Commits on Apr 30, 2017
  1. Increase conditionals test coverage

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 30, 2017
  2. Increase hash test coverage

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 30, 2017
Commits on Apr 29, 2017
  1. Prevent invalid record parameter

    This can happen if invalid data are sent.
    For instance if server send some parameter using PARAMFMT followed
    by old style PARAM. You potentially get a result which is half
    composed by a row and half by separate data.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 29, 2017
  2. Assure SELECT @@PID query returns a normal row

    Invalid server response can cause a different row type
    to be returned causing a NULL pointer dereference in tds_set_spid.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 29, 2017
  3. Add an invalid data type to avoid not initialized pointer to functions

    Always initialize TDSCOLUMN->funcs to avoid NULL pointer dereferences.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 29, 2017
  4. Use different encryption level for Sybase and MSSQL

    For compatibility MSSQL have to default to REQUEST the old
    default (OFF) was threated like REQUEST so there is no issue
    to change it.
    Sybase instead should not use encryption as on Sybase before
    version 16 encrypted login is not working unless specifically
    configured.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 29, 2017
  5. Do not send clear text password if encryption login is required on Sy…

    …base
    
    Password should just be sent encrypted, no reason to send also
    not encrypted.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 29, 2017
  6. Define and use mnemonics for Microsoft encryption protocol

    Make code easier to read.
    
    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 29, 2017
Commits on Apr 15, 2017
  1. Check server is not returning negative values for column sizes

    Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
    freddy77 committed Apr 15, 2017