I'll wait for your reply to the other posted security concerns, but in  
general, I'd prefer the squashed patches.

On Aug 6, 2009, at 9:24 PM, Markus Roberts wrote:

>
> Changed logic to account for dead-end symlinks as well, as per Luke.
>
> Signed-off-by: Markus Roberts <[email protected]>
> ---
> lib/puppet/type/file.rb |    5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
> index 66ca3b3..f62af87 100644
> --- a/lib/puppet/type/file.rb
> +++ b/lib/puppet/type/file.rb
> @@ -723,7 +723,10 @@ module Puppet
>
>             use_temporary_file = (content.length != 0)
>             if use_temporary_file
> -                path = "#{self[:path]}.puppettmp_#{rand(10000)}"  
> until !File.exists?(path)
> +                path = "#{self[:path]}.puppettmp_#{rand(10000)}"
> +                while File.exists?(path) or File.symlink?(path)
> +                    path = "#{self[:path]}.puppettmp_#{rand(10000)}"
> +                    end
>               else
>                 path = self[:path]
>               end
> -- 
> 1.6.0.4
>
>
> >


-- 
Smoking is one of the leading causes of statistics. -- Fletcher Knebel
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to