diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-07 22:59:13 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-07 23:14:07 +0000 |
| commit | 1427547595bf4e9e64ad2c92c9eade27f5af8c26 (patch) | |
| tree | af125732a191bee2ec4fd5bb27d8beaf22de6618 | |
| parent | 566c5d2127a691835bfbe8ed39af2668d809d4e9 (diff) | |
vtysh: be helpful and kind to unprivileged users
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
| -rw-r--r-- | vtysh/vtysh_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c index d536263db0..c7e1d252c7 100644 --- a/vtysh/vtysh_main.c +++ b/vtysh/vtysh_main.c @@ -535,6 +535,9 @@ int main(int argc, char **argv, char **env) /* Do not connect until we have passed authentication. */ if (vtysh_connect_all(daemon_name) <= 0) { fprintf(stderr, "Exiting: failed to connect to any daemons.\n"); + if (geteuid() != 0) + fprintf(stderr, + "Hint: if this seems wrong, try running me as a privileged user!\n"); if (no_error) exit(0); else |
