Parent

Class Index [+]

Quicksearch

ActiveSambaLdap::UnixIdPool

Public Class Methods

ldap_mapping(options={}) click to toggle source

(Not documented)

# File lib/active_samba_ldap/unix_id_pool.rb, line 8
      def ldap_mapping(options={})
        default_options = {
          :dn_attribute => "sambaDomainName",
          :prefix => "",
          :classes => ["top", "sambaDomain", "sambaUnixIdPool"],
        }
        options = default_options.merge(options)
        super options
      end

Public Instance Methods

find_available_gid_number(group_class) click to toggle source

(Not documented)

# File lib/active_samba_ldap/unix_id_pool.rb, line 25
    def find_available_gid_number(group_class)
      find_available_number(group_class, "gidNumber", gid_number) do
        group_class.configuration[:start_gid]
      end
    end
find_available_uid_number(account_class) click to toggle source

(Not documented)

# File lib/active_samba_ldap/unix_id_pool.rb, line 19
    def find_available_uid_number(account_class)
      find_available_number(account_class, "uidNumber", uid_number) do
        account_class.configuration[:start_uid]
      end
    end

Private Instance Methods

find_available_number(klass, key, start_value) click to toggle source

(Not documented)

# File lib/active_samba_ldap/unix_id_pool.rb, line 32
    def find_available_number(klass, key, start_value)
      number = Integer(start_value || yield)

      100.times do |i|
        return number if klass.search(:filter => "(#{key}=#{number})").empty?
        number += 1
      end

      nil
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.