diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-28 19:46:04 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-04-28 19:46:04 +0000 |
| commit | 12c122c882c6053f8b21714bb8c4c8bf8be699c9 (patch) | |
| tree | c1957def7a101b71f02c05e142ae2c5ec7bfcd68 /lib | |
| parent | 047e63f8481a95c32ceccc22673d4a08659ec9c8 (diff) | |
Puppetd now has an option for listening -- just run the --listen option, and it will start up with a pelement server. It will fail to start if the authconfig file (defaulting to /etc/puppet/namespaceauth.conf) is missing, since it defaults to access at this point.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1148 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/networkclient.rb | 1 | ||||
| -rw-r--r-- | lib/puppet/server.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/server/authconfig.rb | 9 | ||||
| -rw-r--r-- | lib/puppet/server/servlet.rb | 1 |
4 files changed, 9 insertions, 4 deletions
diff --git a/lib/puppet/networkclient.rb b/lib/puppet/networkclient.rb index 2fbb85f59..ef3d88179 100644 --- a/lib/puppet/networkclient.rb +++ b/lib/puppet/networkclient.rb @@ -48,7 +48,6 @@ module Puppet interface.methods.each { |ary| method = ary[0] - Puppet.info "Defining %s.%s" % [namespace, method] if public_method_defined?(method) raise Puppet::DevError, "Method %s is already defined" % method diff --git a/lib/puppet/server.rb b/lib/puppet/server.rb index 51aaef185..7bdd21134 100644 --- a/lib/puppet/server.rb +++ b/lib/puppet/server.rb @@ -110,9 +110,7 @@ module Puppet # mount has to be called after the server is initialized self.mount("/RPC2", Puppet::Server::Servlet, @handlers) end - end - class Server # the base class for the different handlers class Handler attr_accessor :server diff --git a/lib/puppet/server/authconfig.rb b/lib/puppet/server/authconfig.rb index bc5d713e0..951a21229 100644 --- a/lib/puppet/server/authconfig.rb +++ b/lib/puppet/server/authconfig.rb @@ -34,6 +34,8 @@ class AuthConfig < Puppet::ParsedFile namespace = namespace.intern method = method.intern + read() + if @rights.include?(name) return @rights[name].allowed?(host, ip) elsif @rights.include?(namespace) @@ -58,7 +60,8 @@ class AuthConfig < Puppet::ParsedFile return unless self.exists? super(@file) @rights = Rights.new - @configstamp = @configtimeout = @configstatted = nil + @configstamp = @configstatted = nil + @configtimeout = 60 if parsenow read() @@ -77,10 +80,14 @@ class AuthConfig < Puppet::ParsedFile if tmp == @configstamp return + else + Puppet.notice "%s vs %s" % [tmp, @configstamp] end else return end + else + Puppet.notice "%s and %s" % [@configtimeout, @configstatted] end end diff --git a/lib/puppet/server/servlet.rb b/lib/puppet/server/servlet.rb index 2ea599c1a..d60ae77d7 100644 --- a/lib/puppet/server/servlet.rb +++ b/lib/puppet/server/servlet.rb @@ -104,6 +104,7 @@ class Server def initialize(server, handlers) @puppetserver = server + @notified = {} # the servlet base class does not consume any arguments # and its BasicServer base class only accepts a 'class_delim' # option which won't change in Puppet at all |
