This file is indexed.

/usr/share/doc/ruby-ldap/FAQ is in ruby-ldap 0.9.16-1+b7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FAQ
---

Q. How do I add/modify binary data?

A. Create a LDAP::Mod object with the flag LDAP::LDAP_MOD_BVALUES as follows:

   entry = [
     LDAP::mod(LDAP::LDAP_MOD_ADD|LDAP_MOD_BVALUES, 'jpegPhoto', [jpeg_img]),
     LDAP::mod(LDAP::LDAP_MOD_ADD, 'cn', ['Takaaki Tateishi']) #, ...
   ]
   conn.add("dc=localhost, dc=localdomain", entry)



Q. Is there shortcut method for adding/modifying entries?

A. Yes, there is. You can directly give LDAP::Conn#add/modify hash data as
   follows:

   entry = {
     'objectclass' => [ 'top', 'person' ] #, ...
   }
   conn.add( "cn=foobar, dc=localhost, dc=localdomain", entry )



Q. Can I use SASL authentication?

A. Yes, it works for me using Cyrus SASL and Kerberos V via GSSAPI.
   Use LDAP::Conn#sasl_bind. Your mileage may vary.



Q. Can I put a limit on the number of results returned by the server?

A. Yes, as of version 0.9.4, you can. Set the size limit using
   LDAP::Conn#set_option and then check for LDAP::Conn#search or
   LDAP::Conn#search2 having exceeded this limit, by using LDAP::Conn#err:

     conn = LDAP::Conn.new( 'localhost', 389 )

     # Limit the results set to a maximum of 10.
     conn.set_option( LDAP::LDAP_OPT_SIZELIMIT, 10 )

     conn.search2( 'dc=localhost,dc=localdomain',
                    LDAP::LDAP_SCOPE_SUBTREE, '(objectClass=*)' )

     if conn.err == LDAP::LDAP_SIZELIMIT_EXCEEDED
       # Results set was truncated by server.
     end

   Note that LDAP::LDAP_SIZELIMIT_EXCEEDED may occur even when you have not
   put an explicit limit on the number of results to be returned. The server
   will likely have its own maximum configured, so it can be important to
   check for this condition on all of your calls to LDAP::Conn#search and
   LDAP::Conn#search2.