示例#1
0
    def collect(self, work, name):
        idx = work.update('Collecting applications from {0}'.format(name))

        log.write(log.DEBUG, "Found Linux group {0}".format(name))
        data = ADObj(core.ldap(), base=name, attrs=['info'])
        for special in self.re_special.finditer(data.get('info', [''])[0]):
            for action in self.re_action.finditer(special.group(1)):
                args = [x.strip() for x in action.group(2).split(',')]
                action = action.group(1).lower()
                self.handle_action(work, action, args)

        work.complete(idx)
示例#2
0
def ws_init():
    global ws

    ws = ADObj(core.ldap(), filt='(sAMAccountName={0}$)'.format(dns.host))
示例#3
0
def user_init():
    global user

    user = ADObj(core.ldap(),
                 filt='(sAMAccountName={0})'.format(smb.user),
                 extra=['tokenGroups'])