diff --git a/ChangeLog.txt b/ChangeLog.txt index de88e2733e..9b91a7405f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -17,6 +17,20 @@ * contrib/gtqtc/gtqtc.hbp + added depbinpath for QT6 on Linux to locate moc correctly +2024-12-29 00:28 UTC+0100 Aleksander Czajczynski (hb fki.pl) + * src/rtl/hbproces.c + ! in process creating functions like hb_processRun(), *Open(), + on Android: don't use setuid( getuid() ) method for resetting + attributes as it rises "Bad system call" and the process is not + executed. This fixes building Harbour in hbmk2 stage on Android + device itself (for example using Termux) and can fix deploying + multi-process Android apps. For devices older than Android 8, + where the kernel was not hardened, please report any regresions, + if you have such multi-process deployments. + + * ChangeLog.txt + % stripped spaces before EOLs + 2024-12-19 10:24 UTC+0100 Aleksander Czajczynski (hb fki.pl) * contrib/rddsql/sqlbase.c % cleanup unnecessary braces diff --git a/src/rtl/hbproces.c b/src/rtl/hbproces.c index 83bed65291..2100d70de1 100644 --- a/src/rtl/hbproces.c +++ b/src/rtl/hbproces.c @@ -423,9 +423,15 @@ static int hb_fsProcessExec( const char * pszFileName, for( i = 3; i < iMaxFD; ++i ) hb_fsClose( i ); } - /* reset extended process attributes */ + +#if ! defined( __BIONIC__ ) + /* reset extended process attributes + * except on Android libc, where in practice + * this method raises "Bad system call" exception + */ ( void ) setuid( getuid() ); ( void ) setgid( getgid() ); +#endif /* execute command */ execvp( argv[ 0 ], argv ); @@ -846,9 +852,14 @@ HB_FHANDLE hb_fsProcessOpen( const char * pszFileName, hb_fsClose( i ); } - /* reset extended process attributes */ +# if ! defined( __BIONIC__ ) + /* reset extended process attributes + * except on Android libc, where in practice + * this method raises "Bad system call" exception + */ if( setuid( getuid() ) == -1 ) {} if( setgid( getgid() ) == -1 ) {} +# endif /* execute command */ {