lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1067 - in nss-pam-ldapd: . debian man nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1067 - in nss-pam-ldapd: . debian man nslcd



Author: arthur
Date: Sat Feb 27 15:08:47 2010
New Revision: 1067
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1067

Log:
rename admindn option to rootpwmoddn

Modified:
   nss-pam-ldapd/debian/nslcd.postinst
   nss-pam-ldapd/man/nslcd.conf.5.xml
   nss-pam-ldapd/nslcd.conf
   nss-pam-ldapd/nslcd.h
   nss-pam-ldapd/nslcd/cfg.c
   nss-pam-ldapd/nslcd/cfg.h
   nss-pam-ldapd/nslcd/pam.c

Modified: nss-pam-ldapd/debian/nslcd.postinst
==============================================================================
--- nss-pam-ldapd/debian/nslcd.postinst Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/debian/nslcd.postinst Sat Feb 27 15:08:47 2010        (r1067)
@@ -116,7 +116,7 @@
 #bindpw secret
 
 # The DN used for password modifications by root.
-#admindn cn=admin,dc=example,dc=com
+#rootpwmoddn cn=admin,dc=example,dc=com
 
 # SSL options
 #ssl off

Modified: nss-pam-ldapd/man/nslcd.conf.5.xml
==============================================================================
--- nss-pam-ldapd/man/nslcd.conf.5.xml  Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/man/nslcd.conf.5.xml  Sat Feb 27 15:08:47 2010        (r1067)
@@ -188,7 +188,7 @@
     </varlistentry>
 
     <varlistentry>
-     <term><option>admindn</option> <emphasis remap="I">DN</emphasis></term>
+     <term><option>rootpwmoddn</option> <emphasis 
remap="I">DN</emphasis></term>
      <listitem>
       <para>
        Specifies the distinguished name to use when the root user tries to

Modified: nss-pam-ldapd/nslcd.conf
==============================================================================
--- nss-pam-ldapd/nslcd.conf    Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/nslcd.conf    Sat Feb 27 15:08:47 2010        (r1067)
@@ -30,7 +30,7 @@
 #bindpw secret
 
 # The distinguished name to perform password modifications by root by.
-#admindn cn=admin,dc=example,dc=com
+#rootpwmoddn cn=admin,dc=example,dc=com
 
 # The default search scope.
 #scope sub

Modified: nss-pam-ldapd/nslcd.h
==============================================================================
--- nss-pam-ldapd/nslcd.h       Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/nslcd.h       Sat Feb 27 15:08:47 2010        (r1067)
@@ -196,7 +196,7 @@
      INT32   authz NSLCD_PAM_* result code
      STRING  authorisation error message
    If the username is empty in this request an attempt is made to
-   authenticate as the administrator (set using admindn). The returned DN
+   authenticate as the administrator (set using rootpwmoddn). The returned DN
    is that of the administrator. */
 #define NSLCD_ACTION_PAM_AUTHC         20001
 

Modified: nss-pam-ldapd/nslcd/cfg.c
==============================================================================
--- nss-pam-ldapd/nslcd/cfg.c   Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/nslcd/cfg.c   Sat Feb 27 15:08:47 2010        (r1067)
@@ -96,7 +96,7 @@
 #endif /* not LDAP_VERSION3 */
   cfg->ldc_binddn=NULL;
   cfg->ldc_bindpw=NULL;
-  cfg->ldc_admindn=NULL;
+  cfg->ldc_rootpwmoddn=NULL;
   cfg->ldc_sasl_authcid=NULL;
   cfg->ldc_sasl_authzid=NULL;
   cfg->ldc_sasl_secprops=NULL;
@@ -768,9 +768,9 @@
     {
       get_restdup(filename,lnr,keyword,&line,&cfg->ldc_bindpw);
     }
-    else if (strcasecmp(keyword,"admindn")==0)
+    else if (strcasecmp(keyword,"rootpwmoddn")==0)
     {
-      get_restdup(filename,lnr,keyword,&line,&cfg->ldc_admindn);
+      get_restdup(filename,lnr,keyword,&line,&cfg->ldc_rootpwmoddn);
     }
     /* SASL authentication options */
     else if (strcasecmp(keyword,"sasl_authcid")==0)

Modified: nss-pam-ldapd/nslcd/cfg.h
==============================================================================
--- nss-pam-ldapd/nslcd/cfg.h   Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/nslcd/cfg.h   Sat Feb 27 15:08:47 2010        (r1067)
@@ -93,7 +93,7 @@
   /* bind cred */
   char *ldc_bindpw;
   /* bind DN for password modification by administrator */
-  char *ldc_admindn;
+  char *ldc_rootpwmoddn;
   /* sasl authentication id */
   char *ldc_sasl_authcid;
   /* sasl authorization id */

Modified: nss-pam-ldapd/nslcd/pam.c
==============================================================================
--- nss-pam-ldapd/nslcd/pam.c   Sat Feb 27 15:03:51 2010        (r1066)
+++ nss-pam-ldapd/nslcd/pam.c   Sat Feb 27 15:08:47 2010        (r1067)
@@ -145,16 +145,16 @@
   /* write the response header */
   WRITE_INT32(fp,NSLCD_VERSION);
   WRITE_INT32(fp,NSLCD_ACTION_PAM_AUTHC);
-  /* if the username is blank and admindn is configure, try to authenticate
+  /* if the username is blank and rootpwmoddn is configure, try to authenticate
      as administrator, otherwise validate request as usual */
-  if ((*username=='\0')&&(nslcd_cfg->ldc_admindn!=NULL))
+  if ((*username=='\0')&&(nslcd_cfg->ldc_rootpwmoddn!=NULL))
   {
-    if (strlen(nslcd_cfg->ldc_admindn)>=sizeof(userdn))
+    if (strlen(nslcd_cfg->ldc_rootpwmoddn)>=sizeof(userdn))
     {
-      log_log(LOG_ERR,"nslcd_pam_authc(): admindn will not fit in userdn");
+      log_log(LOG_ERR,"nslcd_pam_authc(): rootpwmoddn will not fit in userdn");
       return -1;
     }
-    strcpy(userdn,nslcd_cfg->ldc_admindn);
+    strcpy(userdn,nslcd_cfg->ldc_rootpwmoddn);
   }
   else if 
(validate_user(session,userdn,sizeof(userdn),username,sizeof(username)))
   {
@@ -286,7 +286,7 @@
   if (rc==LDAP_SUCCESS)
   {
     /* if doing password modification as admin, don't pass old password along 
*/
-    if 
((nslcd_cfg->ldc_admindn!=NULL)&&(strcmp(binddn,nslcd_cfg->ldc_admindn)==0))
+    if 
((nslcd_cfg->ldc_rootpwmoddn!=NULL)&&(strcmp(binddn,nslcd_cfg->ldc_rootpwmoddn)==0))
       oldpassword=NULL;
     /* perform password modification */
     rc=myldap_passwd(session,userdn,oldpassword,newpassword);
@@ -320,10 +320,10 @@
   /* write the response header */
   WRITE_INT32(fp,NSLCD_VERSION);
   WRITE_INT32(fp,NSLCD_ACTION_PAM_PWMOD);
-  /* check if the the user passed the admindn */
-  if 
((nslcd_cfg->ldc_admindn!=NULL)&&(strcmp(userdn,nslcd_cfg->ldc_admindn)==0))
+  /* check if the the user passed the rootpwmoddn */
+  if 
((nslcd_cfg->ldc_rootpwmoddn!=NULL)&&(strcmp(userdn,nslcd_cfg->ldc_rootpwmoddn)==0))
   {
-    binddn=nslcd_cfg->ldc_admindn;
+    binddn=nslcd_cfg->ldc_rootpwmoddn;
     userdn[0]='\0'; /* cause validate_user() to get the user DN */
   }
   /* validate request and fill in the blanks */
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits