On Thu, 2010-08-26 at 14:56 -0400, Chris Lalancette wrote:
> Since condor will not accept jobs from a root process, running
> the aggregator as root is more-or-less pointless.  Add in a check
> in src/script/server to fail aggregator startup if running as root
> so we don't get spurious bug reports about this problem.
> 
> Signed-off-by: Chris Lalancette <clala...@redhat.com>
> ---
>  src/script/server |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/src/script/server b/src/script/server
> index dfabcb8..e9b183a 100755
> --- a/src/script/server
> +++ b/src/script/server
> @@ -1,3 +1,9 @@
>  #!/usr/bin/env ruby
> +
> +if Process.uid == 0 or Process.gid == 0
> +  puts "Deltacloud aggregator cannot be run as root"
> +  exit(1)
> +end
> +
>  require File.dirname(__FILE__) + '/../config/boot'
> -require 'commands/server'
> \ No newline at end of file
> +require 'commands/server'

ACK



_______________________________________________
deltacloud-devel mailing list
deltacloud-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to