Mailinglist Archive: opensuse (1352 mails)

< Previous Next >
[opensuse] Re: Problem with suid pgms on Leap-15.0
Andrei Borzenkov wrote:
@@ -1277,6 +1278,7 @@ disable_priv_mode ()
int e;

+ setgroups(0, NULL);
if (setuid (current_user.uid) < 0)
e = errno;
This appears to be a setuid call that would only
work when transitioning away from root.

I may be misunderstanding the problem, but it
seems the original poster had a problem when they transitioned *to* root, so the above code doesn't seem
to make sense as being the soul source of problems.

Is there something that clears the groups upon
a transition to root?

Would the above code ever be executed? As I understand
it, we are talking about a SETUID program. Aren't privilege
transitions handled in the kernel? It seems odd to have
such code in a user-level program like a shell.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups