This file is indexed.

/usr/lib/python3/dist-packages/lib389/sasl.py is in python3-lib389 1.3.7.10-1ubuntu1.

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
# --- BEGIN COPYRIGHT BLOCK ---
# Copyright (C) 2016 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---

"""
Lib389 python ldap sasl operations.

These should be upstreamed if possible.
"""

from ldap.sasl import sasl, CB_AUTHNAME, CB_PASS, CB_USER

from lib389.utils import ensure_bytes

class LdapSSOTokenSASL(sasl):
    """
    This class handles draft-wibrown-ldapssotoken-01 authentication.
    """

    def __init__(self,token):
        auth_dict = { CB_PASS:token }
        sasl.__init__(self, auth_dict, "LDAPSSOTOKEN")

class PlainSASL(sasl):
    """
    This class handles PLAIN sasl authentication
    """

    def __init__(self, authz_id, passwd):
        auth_dict = { CB_AUTHNAME:authz_id, CB_PASS:passwd }
        sasl.__init__(self, auth_dict, "PLAIN")