help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set +p exits 31


From: Chet Ramey
Subject: Re: set +p exits 31
Date: Fri, 30 Jun 2023 12:12:16 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 6/30/23 3:10 AM, Grisha Levit wrote:

This is a problem with (at least some) Android versions. The setresgid and
setgid functions are in the C library, but actually calling it causes a
SIGSYS (Bad system call) signal to be sent.

This occasionally gets me too, attached is a patch that works around the
issue by not bothering to call the set*id functions when the effective IDs
already match real ones.

This isn't exactly correct for the setresuid case, since it's possible
for the saved setuid not to match euid and uid, and you want to change
them all.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]