Page MenuHomeFreeBSD

mdo(1): Use setcred() to change credentials
Needs ReviewPublic

Authored by olce on Fri, Nov 15, 5:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 10:04 PM
Unknown Object (File)
Mon, Nov 18, 7:06 PM
Unknown Object (File)
Mon, Nov 18, 4:07 PM
Unknown Object (File)
Sun, Nov 17, 11:31 PM
Unknown Object (File)
Sun, Nov 17, 11:29 PM
Unknown Object (File)
Sat, Nov 16, 4:51 AM
Unknown Object (File)
Fri, Nov 15, 5:34 PM

Details

Reviewers
bapt
Summary

This revision is part of a series. Click on the Stack tab below to see the context.
This series has also been squeezed into D47633 to provide an overall view.

Commit message:
As this is the only system call that MAC/do currently supports, and the
only one that really can be for transitions involving simultaneous
changes of user and group IDs.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60612
Build 57496: arc lint + arc unit

Event Timeline

olce requested review of this revision.Fri, Nov 15, 5:08 PM
brooks added inline comments.
usr.bin/mdo/mdo.c
31

Technically a C23 extension, but probably ok? Could explicitly set one member to stay C99 compatible.

Maybe better yet would be an initializer that sets everything to an invalid value (-1 or the like) so accidentally setting a uid or gid flag without setting the value doesn't lead to root.