Project

General

Profile

Actions

Bug #4577

closed

pfexec's error reporting is (at least sometimes) awful

Added by Rich Lowe over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2014-02-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

A SmartOS user was confused about how precisely to invoke pfexec(1M), and did this

> pfexec -P "Primary Administrator" id
setppriv(): Bad address

The error here is that -P takes privileges, not profile names. The error message should, well, say something similar to that. Probably "unknown privilege: <thing>" or if necessary a generic message regarding the parsing failing.

Also (and perhaps a separate bug, but I think it's related) the manual page for pfexec(1M) is pretty much moonspeak unless you already understand how all this works, which doesn't help in the slightest.

Actions #1

Updated by Rich Lowe over 7 years ago

  • Difficulty changed from Medium to Bite-size
Actions #2

Updated by Gary Mills over 7 years ago

  • Assignee set to Gary Mills

I'll take this one.

Actions #3

Updated by Electric Monk over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 511ef1d6e74f3d1db7bd854375a0926d87bdd7e6

commit  511ef1d6e74f3d1db7bd854375a0926d87bdd7e6
Author: Gary Mills <gary_mills@fastmail.fm>
Date:   2014-06-21T17:24:43.000Z

    4577 pfexec's error reporting is (at least sometimes) awful
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Adam Števko <adam.stevko@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF