diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-07 23:59:13 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-08 00:14:07 +0100 |
commit | 1427547595bf4e9e64ad2c92c9eade27f5af8c26 (patch) | |
tree | af125732a191bee2ec4fd5bb27d8beaf22de6618 /vtysh/vtysh_main.c | |
parent | Merge pull request #5196 from kuldeepkash/testcases (diff) | |
download | frr-1427547595bf4e9e64ad2c92c9eade27f5af8c26.tar.xz frr-1427547595bf4e9e64ad2c92c9eade27f5af8c26.zip |
vtysh: be helpful and kind to unprivileged users
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vtysh/vtysh_main.c')
-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 d536263db..c7e1d252c 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 |