* Add 'base DN' and 'bind DN' and 'bind DN password' to siteconfig
authorArt Cancro <ajc@citadel.org>
Sat, 17 Jan 2004 21:25:30 +0000 (21:25 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 17 Jan 2004 21:25:30 +0000 (21:25 +0000)
* Split the config for LDAP Connector into its own panel

webcit/ChangeLog
webcit/siteconfig.c

index 358205182163b86de7b432951a0cc44fe4da9bbb..7d897367ef301f0eeb8f137a0ccf3b5c5d77a6c6 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 502.3  2004/01/17 21:25:30  ajc
+* Add 'base DN' and 'bind DN' and 'bind DN password' to siteconfig
+* Split the config for LDAP Connector into its own panel
+
 Revision 502.2  2004/01/17 04:32:54  ajc
 * Add site config options for Citadel servers which support LDAP
 
@@ -1623,3 +1627,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 7fa90c86f7747f4b6c265dc13d02f3c7f35a0ba9..acbf44db0b9d87a0f363fac2c36e118e68f0f624 100644 (file)
@@ -93,6 +93,18 @@ void display_siteconfig(void)
                        "</A></TD></TR>\n"
                );
 
+               wprintf("<TR BGCOLOR=\"#CCCCCC\"><TD>"
+                       "</TD><TD>"
+                       "<A HREF=\"/display_siteconfig?whichmenu=ldap\">"
+                       "<IMG BORDER=\"0\" WIDTH=\"48\" HEIGHT=\"48\" "
+                       "SRC=\"/static/advanced-icon.gif\" ALT=\"&nbsp;\">"
+                       "</TD><TD>"
+                       "<A HREF=\"/display_siteconfig?whichmenu=ldap\">"
+                       "<B>Directory</B><BR>"
+                       "Configure the LDAP connector for Citadel"
+                       "</A></TD></TR>\n"
+               );
+
                wprintf("</TABLE>");
 
                do_template("endbox");
@@ -459,7 +471,7 @@ void display_siteconfig(void)
                        }
                        break;
                case 33:
-                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "network")) ) {
+                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "ldap")) ) {
                                wprintf("<TR><TD>Host name of LDAP server (blank to disable)</TD><TD>");
                                wprintf("<INPUT TYPE=\"text\" NAME=\"c_ldap_host\" MAXLENGTH=\"127\" VALUE=\"%s\">", buf);
                                wprintf("</TD></TR>\n");
@@ -469,7 +481,7 @@ void display_siteconfig(void)
                        }
                        break;
                case 34:
-                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "network")) ) {
+                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "ldap")) ) {
                                wprintf("<TR><TD>Port number of LDAP server (blank to disable)</TD><TD>");
                                wprintf("<INPUT TYPE=\"text\" NAME=\"c_ldap_port\" MAXLENGTH=\"127\" VALUE=\"%d\">", atoi(buf));
                                wprintf("</TD></TR>\n");
@@ -478,6 +490,36 @@ void display_siteconfig(void)
                                wprintf("<INPUT TYPE=\"hidden\" NAME=\"c_ldap_port\" VALUE=\"%d\">", atoi(buf));
                        }
                        break;
+               case 35:
+                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "ldap")) ) {
+                               wprintf("<TR><TD>Base DN</TD><TD>");
+                               wprintf("<INPUT TYPE=\"text\" NAME=\"c_ldap_base_dn\" MAXLENGTH=\"255\" VALUE=\"%s\">", buf);
+                               wprintf("</TD></TR>\n");
+                       }
+                       else {
+                               wprintf("<INPUT TYPE=\"hidden\" NAME=\"c_ldap_base_dn\" VALUE=\"%s\">", buf);
+                       }
+                       break;
+               case 36:
+                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "ldap")) ) {
+                               wprintf("<TR><TD>Bind DN</TD><TD>");
+                               wprintf("<INPUT TYPE=\"text\" NAME=\"c_ldap_bind_dn\" MAXLENGTH=\"255\" VALUE=\"%s\">", buf);
+                               wprintf("</TD></TR>\n");
+                       }
+                       else {
+                               wprintf("<INPUT TYPE=\"hidden\" NAME=\"c_ldap_bind_dn\" VALUE=\"%s\">", buf);
+                       }
+                       break;
+               case 37:
+                       if ( (serv_info.serv_supports_ldap) && (!strcasecmp(whichmenu, "ldap")) ) {
+                               wprintf("<TR><TD>Password for bind DN</TD><TD>");
+                               wprintf("<INPUT TYPE=\"password\" NAME=\"c_ldap_bind_pw\" MAXLENGTH=\"255\" VALUE=\"%s\">", buf);
+                               wprintf("</TD></TR>\n");
+                       }
+                       else {
+                               wprintf("<INPUT TYPE=\"hidden\" NAME=\"c_ldap_bind_pw\" VALUE=\"%s\">", buf);
+                       }
+                       break;
                }
        }
 
@@ -539,6 +581,9 @@ void siteconfig(void)
        serv_printf("%s", bstr("c_purge_hour"));
        serv_printf("%s", bstr("c_ldap_host"));
        serv_printf("%s", bstr("c_ldap_port"));
+       serv_printf("%s", bstr("c_ldap_base_dn"));
+       serv_printf("%s", bstr("c_ldap_bind_dn"));
+       serv_printf("%s", bstr("c_ldap_bind_pw"));
        serv_printf("000");
        strcpy(WC->ImportantMessage, "System configuration has been updated.");
        display_siteconfig();