Page MenuHomeFreeBSD

Capsicum: add capability mode to users binary
ClosedPublic

Authored by tyler_tysdomain.com on Jan 5 2017, 4:51 AM.

Details

Summary

This patch adds capsicum support to the users binary.

Test Plan

Run users with no arguments, works well.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tyler_tysdomain.com retitled this revision from to Capsicum: add capability mode to users binary.Jan 5 2017, 4:51 AM
tyler_tysdomain.com updated this object.
tyler_tysdomain.com edited the test plan for this revision. (Show Details)
tyler_tysdomain.com updated this revision to Diff 23613.
cem added inline comments.Jan 5 2017, 5:13 AM
usr.bin/users/users.cc
56 ↗(On Diff #23613)

Does this need to include errno.h to compile?

Does this need to include errno.h to compile?

It compiles without, but you're right in that it should. The only reason it does compile is that some header somewhere also includes errno.h

  1. Updating D9046: Capsicum: add capability mode to users binary #
  2. Enter a brief description of the changes included in this update.
  3. The first line is used as subject, next lines as comment. #
  4. If you intended to create a new revision, use:
  5. $ arc diff --create

Updated to include extra err.h and errno.h

cem edited edge metadata.Jan 5 2017, 5:31 AM
cem accepted this revision.
This revision is now accepted and ready to land.Jan 5 2017, 5:31 AM
oshogbo edited edge metadata.Jan 5 2017, 11:16 AM
oshogbo accepted this revision.

It's look good with me.
To be super precise we could consider limiting standard descriptors (std{in, out, err}).

emaste edited edge metadata.Jan 6 2017, 3:05 AM

It's look good with me.
To be super precise we could consider limiting standard descriptors (std{in, out, err}).

This is a valid point, but I'm willing to trade off simplicity and smaller changes against precisely limiting stdio on trivial utilities like this.

This revision was automatically updated to reflect the committed changes.