nss-pam-ldapd commit: r1680 - nss-pam-ldapd/pynslcd
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1680 - nss-pam-ldapd/pynslcd
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1680 - nss-pam-ldapd/pynslcd
- Date: Fri, 4 May 2012 22:06:31 +0200 (CEST)
Author: arthur
Date: Fri May 4 22:06:31 2012
New Revision: 1680
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1680&view=revision
Log:
small code style improvements
Modified:
nss-pam-ldapd/pynslcd/cfg.py
Modified: nss-pam-ldapd/pynslcd/cfg.py
==============================================================================
--- nss-pam-ldapd/pynslcd/cfg.py Fri May 4 15:36:45 2012 (r1679)
+++ nss-pam-ldapd/pynslcd/cfg.py Fri May 4 22:06:31 2012 (r1680)
@@ -118,18 +118,20 @@
# separate function as not to pollute the namespace and avoid import loops
import alias, ether, group, host, netgroup, network, passwd
import protocol, rpc, service, shadow
- return dict(alias=alias, aliases=alias,
- ether=ether, ethers=ether,
- group=group,
- host=host, hosts=host,
- netgroup=netgroup,
- network=network, networks=network,
- passwd=passwd,
- protocol=protocol, protocols=protocol,
- rpc=rpc,
- service=service, services=service,
- shadow=shadow,
- none=sys.modules[__name__])
+ return dict(
+ alias=alias, aliases=alias,
+ ether=ether, ethers=ether,
+ group=group,
+ host=host, hosts=host,
+ netgroup=netgroup,
+ network=network, networks=network,
+ passwd=passwd,
+ protocol=protocol, protocols=protocol,
+ rpc=rpc,
+ service=service, services=service,
+ shadow=shadow,
+ none=sys.modules[__name__]
+ )
class ParseError(Exception):
@@ -172,7 +174,8 @@
globals()[m.group('keyword').lower()] = m.group('value')
continue
# parse options with a single value that can contain spaces
- m =
re.match('(?P<keyword>binddn|rootpwmoddn|sasl_realm|sasl_authcid|sasl_authzid|sasl_secprops|krb5_ccname|tls_cacertdir|tls_cacertfile|tls_randfile|tls_ciphers|tls_cert|tls_key)\s+(?P<value>\S.*)',
line, re.IGNORECASE)
+ m =
re.match('(?P<keyword>binddn|rootpwmoddn|sasl_realm|sasl_authcid|sasl_authzid|sasl_secprops|krb5_ccname|tls_cacertdir|tls_cacertfile|tls_randfile|tls_ciphers|tls_cert|tls_key)\s+(?P<value>\S.*)',
+ line, re.IGNORECASE)
if m:
globals()[m.group('keyword').lower()] = m.group('value')
continue
@@ -236,8 +239,8 @@
if m:
users = m.group('value')
if users.lower() == 'alllocal':
- # get all users known to the system currently (since nslcd
isn't yet
- # running, this should work)
+ # get all users known to the system currently (since nslcd
+ # isn't yet running, this should work)
import pwd
users = (x.pw_name for x in pwd.getpwall())
else:
@@ -250,11 +253,12 @@
if m:
from attmap import Expression
pam_authz_search.append(Expression(m.group('value')))
- # TODO: check pam_authz_search expression to only contain
username, service, ruser, rhost, tty, hostname, fqdn, dn or uid variables
+ # TODO: check pam_authz_search expression to only contain
+ # username, service, ruser, rhost, tty, hostname, fqdn, dn or
+ # uid variables
continue
# ssl <on|off|start_tls>
- m = re.match('ssl\s+(?P<value>%s)' %
- '|'.join(_ssl_options.keys()),
+ m = re.match('ssl\s+(?P<value>%s)' % '|'.join(_ssl_options.keys()),
line, re.IGNORECASE)
if m:
global ssl
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1680 - nss-pam-ldapd/pynslcd,
Commits of the nss-pam-ldapd project