From 8d64ca70b4c2467d4ed8c76a9eae385abdebd7a7 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 6 Sep 2010 08:12:36 +0000 Subject: cli: Only admin should run gluster CLI Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1546 (gluster commandline should be available only for super user) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1546 --- cli/src/cli.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cli') diff --git a/cli/src/cli.c b/cli/src/cli.c index 48490ddf4..58cb61bb4 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -459,6 +459,11 @@ main (int argc, char *argv[]) int ret = -1; glusterfs_ctx_t *ctx = NULL; + if (geteuid ()) { + printf ("Only super user can run this command\n"); + return EPERM; + } + ret = glusterfs_globals_init (); if (ret) return ret; -- cgit