Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Jopek committed Dec 29, 2024
2 parents 3b7ff3e + a23ea49 commit 2aed4ed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
14 changes: 14 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions src/rtl/hbproces.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 */
{
Expand Down

0 comments on commit 2aed4ed

Please sign in to comment.