Skip to content

setgid() needs to happen before setuid() #1

@ghost

Description

This is awesome, by the way.

I had issues calling setuid() before setgid(). I think the reason is that only uid 0 can do either call. Maybe Linux is a little different, but on FreeBSD it's that way and it seems to make sense to me. I guess your tests should confirm the same thing? Unless this is a FreeBSD-only behavior, I should run it on my machine.

You can see that here:
https://github.com/teran-mckinney/raru/blob/master/raru.c#L36

I should probably make that comment a bit more obvious as it is kind of terse and easy to miss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions