Class: ActiveSambaLdap::UnixIdPool

Inherits:
Base
  • Object
show all
Includes:
Reloadable
Defined in:
lib/active_samba_ldap/unix_id_pool.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Reloadable

included

Methods inherited from Base

restart_nscd

Class Method Details

.ldap_mapping(options = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
# 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

Instance Method Details

#find_available_gid_number(group_class) ⇒ Object



25
26
27
28
29
# 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) ⇒ Object



19
20
21
22
23
# File 'lib/active_samba_ldap/unix_id_pool.rb', line 19

def find_available_uid_number()
  find_available_number(, "uidNumber", uid_number) do
    .configuration[:start_uid]
  end
end