~ubuntu-branches/debian/squeeze/nss-pam-ldapd/squeeze

« back to all changes in this revision

Viewing changes to nslcd/network.c

  • Committer: Bazaar Package Importer
  • Author(s): Arthur de Jong
  • Date: 2009-12-28 13:30:00 UTC
  • Revision ID: james.westby@ubuntu.com-20091228133000-n0hyju3c5tmo8bjq
Tags: 0.7.2
* some attributes may be mapped to a shell-like expression that expand
  attributes from LDAP entries; this allows attributes overrides, defaults
  and much more (as a result the passwd cn attribute mapping has been
  removed because the gecos mapping is now "${gecos:-$cn}" by default)
* update the NSS module to follow the change in Glibc where the addr 
  parameter of getnetbyaddr_r() was changed from network-byte-order to
  host-byte-order
* properly escape searches for uniqueMember attributes for DN with a comma
  in an attribute value
* miscellaneous improvements to the configure script implementing better
  (and simpler) library detection
* some general refactoring and other miscellaneous improvements
* make configure check if we need to explicitly link to -llber
  (closes: #555779)
* libnss-ldapd: recommend libpam-krb5 as an alternative to libpam-ldapd for
  Kerberos environments
* updated Italian debconf translation by Vincenzo Campanella
  (closes: #556107)
* fix nslcd postrm to remove old config file (thanks piuparts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
static int mkfilter_network_byname(const char *name,
67
67
                                   char *buffer,size_t buflen)
68
68
{
69
 
  char buf2[1024];
 
69
  char safename[1024];
70
70
  /* escape attribute */
71
 
  if (myldap_escape(name,buf2,sizeof(buf2)))
 
71
  if (myldap_escape(name,safename,sizeof(safename)))
72
72
    return -1;
73
73
  /* build filter */
74
74
  return mysnprintf(buffer,buflen,
75
75
                    "(&%s(%s=%s))",
76
76
                    network_filter,
77
 
                    attmap_network_cn,buf2);
 
77
                    attmap_network_cn,safename);
78
78
}
79
79
 
80
80
static int mkfilter_network_byaddr(const char *name,
81
81
                                   char *buffer,size_t buflen)
82
82
{
83
 
  char buf2[1024];
 
83
  char safename[1024];
84
84
  /* escape attribute */
85
 
  if (myldap_escape(name,buf2,sizeof(buf2)))
 
85
  if (myldap_escape(name,safename,sizeof(safename)))
86
86
    return -1;
87
87
  /* build filter */
88
88
  return mysnprintf(buffer,buflen,
89
89
                    "(&%s(%s=%s))",
90
90
                    network_filter,
91
 
                    attmap_network_ipNetworkNumber,buf2);
 
91
                    attmap_network_ipNetworkNumber,safename);
92
92
}
93
93
 
94
94
void network_init(void)