vmware / photon

Minimal Linux container host
https://vmware.github.io/photon
Other
3.06k stars 697 forks source link

Microsoft ODBC driver for SQL Server #1509

Open kuklis opened 1 year ago

kuklis commented 1 year ago

Is your feature request related to a problem? Please describe.

The driver is available for major distros, but not for Photon. https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16 I neee to install the driver on Photon 4. Which precompiled package can be compatible with PhotonOs 4?

Describe the solution you'd like

A distribution name and version to download the package from MS site, that works with v4

Describe alternatives you've considered

No response

Additional context

No response

dcasota commented 1 year ago

Hi,

There is no precompiled package of the Microsoft ODBC driver for SQL Server for Photon OS. Unfortunately, actually the cascade of [odbc driver for linux, krb5-libs, glibc] has the local privilege escalation vulnerability (CVE-2023-4911). All major distros were affected. Even if you would install the driver on Photon OS, Photon OS might be affected as well. As alternative, you could try the https://github.com/openlink/iODBC alternative. There is no precompiled package for Photon OS. Here a setup recipe for Photon OS 5. With a little bit of tinkering, it should work on Photon OS 4 as well.

tdnf install -y curl build-essential
curl -J -O -L https://github.com/openlink/iODBC/archive/refs/tags/v3.52.16.tar.gz
tar -xzvf iODBC-3.52.16.tar.gz
cd iODBC-3.52.16/
./autogen.sh
./configure
make
make install
kuklis commented 1 year ago

Thanks for the suggestion. Wrt. compatibility, which version do you suggest to try if I want to experiment with the MS driver? Rhel 7, or Rhel 8 maybe could work?

dcasota commented 1 year ago

@sshedi for Photon OS 4, are there updates planned for glibc > 2.32 ? Actually the 2.32 version is bad for tdnf. A copy attempt of fresh compiled glibc.* from glibc2.38 to the /lib directory results in an os dump (!).

@kuklis As mentioned, there are no Photon OS packages for the odbc driver. A few required packages glibc, openssl-libs, krb5-libs must be compatible to each other and for the package manager tdnf. A containerized ms odbc driver for ms sql server with rhel as docker base image should work.

sshedi commented 1 year ago

Hi @dcasota , we don't upgrade core package versions post release. Glibc type packages are not upgraded unless absolutely necessary.

Actually the 2.32 version is bad for tdnf. A copy attempt of fresh compiled glibc.* from glibc2.38 to the /lib directory results in an os dump (!).

Not just tdnf, many binaries will crash because of ABI incompatibility and various other reasons. Don't modify glibc libraries.

kuklis commented 1 year ago

Sles 15 package worked.