Sha256: f7bc89de61409150f03c31e8797c8692e4768ec085eea03858c105f7bed13952

Contents?: true

Size: 468 Bytes

Versions: 54

Compression:

Stored size: 468 Bytes

Contents

require 'puppettest'

module PuppetTest
  # NOTE: currently both of these will produce bogus results on Darwin due to the wonderful
  # UID of nobody.
  def nonrootuser
    Etc.passwd { |user|
      return user if user.uid != Puppet::Util::SUIDManager.uid and user.uid > 0 and user.uid < 255
    }
  end

  def nonrootgroup
    Etc.group { |group|
      return group if group.gid != Puppet::Util::SUIDManager.gid and group.gid > 0 and group.gid < 255
    }
  end
end

Version data entries

54 entries across 54 versions & 3 rubygems

Version Path
puppet-2.7.26 test/lib/puppettest/support/helpers.rb
puppet-2.7.25 test/lib/puppettest/support/helpers.rb
puppet-2.7.24 test/lib/puppettest/support/helpers.rb
puppet-2.7.23 test/lib/puppettest/support/helpers.rb
puppet-2.7.22 test/lib/puppettest/support/helpers.rb
puppet-2.7.21 test/lib/puppettest/support/helpers.rb
puppet-2.6.18 test/lib/puppettest/support/helpers.rb
puppet-2.7.20 test/lib/puppettest/support/helpers.rb
puppet-2.7.20.rc1 test/lib/puppettest/support/helpers.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/puppet-2.7.18/test/lib/puppettest/support/helpers.rb
puppet-2.7.19 test/lib/puppettest/support/helpers.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/puppet-2.7.8/test/lib/puppettest/support/helpers.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/puppet-2.7.18/test/lib/puppettest/support/helpers.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/puppet-2.7.8/test/lib/puppettest/support/helpers.rb
puppet-2.7.18 test/lib/puppettest/support/helpers.rb
puppet-2.6.17 test/lib/puppettest/support/helpers.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/puppet-2.7.8/test/lib/puppettest/support/helpers.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/puppet-2.7.8/test/lib/puppettest/support/helpers.rb
puppet-2.7.17 test/lib/puppettest/support/helpers.rb
puppet-2.7.16 test/lib/puppettest/support/helpers.rb