1
0
mirror of https://github.com/termux/termux-packages synced 2024-07-02 08:05:11 +00:00
termux-packages/packages/unixodbc/fix-hardcoded-paths.patch
2022-11-17 05:06:24 +00:00

61 lines
2.0 KiB
Diff

--- a/DriverManager/__handles.c
+++ b/DriverManager/__handles.c
@@ -468,7 +468,7 @@
( toupper( tracing_string[ 0 ] ) == 'O' &&
toupper( tracing_string[ 1 ] ) == 'N' ))
{
- SQLGetPrivateProfileString( "ODBC", "TraceFile", "/tmp/sql.log",
+ SQLGetPrivateProfileString( "ODBC", "TraceFile", "@TERMUX_PREFIX@/tmp/sql.log",
tracing_file, sizeof( tracing_file ),
"odbcinst.ini" );
--- a/DriverManager/__info.c
+++ b/DriverManager/__info.c
@@ -5722,7 +5722,7 @@
if ( !log_info.log_file_name )
{
- strcpy( file_name, "/tmp/sql.log" );
+ strcpy( file_name, "@TERMUX_PREFIX@/tmp/sql.log" );
}
else
{
@@ -5739,7 +5739,7 @@
{
if ( !log_info.log_file_name )
{
- fp = uo_fopen( "/tmp/sql.log", "a" );
+ fp = uo_fopen( "@TERMUX_PREFIX@/tmp/sql.log", "a" );
}
else
{
@@ -5809,7 +5809,7 @@
if ( !log_info.log_file_name )
{
- strcpy( file_name, "/tmp/sql.log" );
+ strcpy( file_name, "@TERMUX_PREFIX@/tmp/sql.log" );
}
else
{
@@ -5826,7 +5826,7 @@
{
if ( !log_info.log_file_name )
{
- fp = uo_fopen( "/tmp/sql.log", "a" );
+ fp = uo_fopen( "@TERMUX_PREFIX@/tmp/sql.log", "a" );
}
else
{
--- a/man/odbcinst.ini.5
+++ b/man/odbcinst.ini.5
@@ -58,7 +58,7 @@
.IP \fBTraceFile
Specifies the system path or path-pattern to which ODBC driver trace output will
be written. This option has no effect unless \fBTrace\fR is enabled. The default
-file location for trace output is \fB/tmp/sql.log\fR.
+file location for trace output is \fB@TERMUX_PREFIX@/tmp/sql.log\fR.
\fIWARNING\fR: Setting \fBTraceFile\fR to a path writable by multiple users
might not work correctly, as only the first user will be able to create and open