summaryrefslogtreecommitdiffstats
path: root/lib/puppet/server
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/server')
-rwxr-xr-xlib/puppet/server/authstore.rb3
-rwxr-xr-xlib/puppet/server/fileserver.rb17
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/puppet/server/authstore.rb b/lib/puppet/server/authstore.rb
index 3e7881162..b0f63b68a 100755
--- a/lib/puppet/server/authstore.rb
+++ b/lib/puppet/server/authstore.rb
@@ -28,6 +28,9 @@ class Server
def allowed?(name, ip)
if name or ip
+ # This is probably unnecessary, and can cause some weirdnesses in
+ # cases where we're operating over localhost but don't have a real
+ # IP defined.
unless name and ip
raise Puppet::DevError, "Name and IP must be passed to 'allowed?'"
end
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb
index 8033fac5b..53c60cdbe 100755
--- a/lib/puppet/server/fileserver.rb
+++ b/lib/puppet/server/fileserver.rb
@@ -126,6 +126,10 @@ class Server
sub.join("\t")
}.join("\n")
end
+
+ def local?
+ self.local
+ end
# Mount a new directory with a name.
def mount(path, name)
@@ -188,6 +192,11 @@ class Server
private
def authcheck(file, mount, client, clientip)
+ # If we're local, don't bother passing in information.
+ if local?
+ client = nil
+ clientip = nil
+ end
unless mount.allowed?(client, clientip)
mount.warning "%s cannot access %s" %
[client, file]
@@ -482,12 +491,6 @@ class Server
@path = nil
end
- @comp = Puppet.type(:component).create(
- :name => "mount[#{name}]"
- )
- #@comp.type = "mount"
- #@comp.name = name
-
super()
end
@@ -504,8 +507,6 @@ class Server
:name => path,
:check => CHECKPARAMS
)
-
- @comp.push(obj)
end
if links == :manage