]> code.citadel.org Git - citadel.git/blobdiff - citadel/control.c
* Use syslog-compatible logging levels in lprintf(); the loglevel chosen
[citadel.git] / citadel / control.c
index 01d2e9d80e568601f837e51232589d2bdf6f8624..973c10fd448091d9d391495b82fd7702b0d0e1c6 100644 (file)
@@ -80,7 +80,7 @@ void get_control(void)
                }
        }
        if (control_fp == NULL) {
-               lprintf(1, "ERROR opening citadel.control: %s\n",
+               lprintf(CTDL_ALERT, "ERROR opening citadel.control: %s\n",
                        strerror(errno));
                return;
        }
@@ -196,6 +196,19 @@ void cmd_conf(char *argbuf)
                cprintf("%d\n", config.c_disable_newu);
                cprintf("%d\n", config.c_aide_mailboxes);
                cprintf("%d\n", config.c_purge_hour);
+#ifdef HAVE_LDAP
+               cprintf("%s\n", config.c_ldap_host);
+               cprintf("%d\n", config.c_ldap_port);
+               cprintf("%s\n", config.c_ldap_base_dn);
+               cprintf("%s\n", config.c_ldap_bind_dn);
+               cprintf("%s\n", config.c_ldap_bind_pw);
+#else
+               cprintf("\n");
+               cprintf("0\n");
+               cprintf("\n");
+               cprintf("\n");
+               cprintf("\n");
+#endif
                cprintf("000\n");
        }
 
@@ -335,6 +348,27 @@ void cmd_conf(char *argbuf)
                                        config.c_purge_hour = atoi(buf);
                                }
                                break;
+#ifdef HAVE_LDAP
+                       case 32:
+                               safestrncpy(config.c_ldap_host, buf,
+                                           sizeof config.c_ldap_host);
+                               break;
+                       case 33:
+                               config.c_ldap_port = atoi(buf);
+                               break;
+                       case 34:
+                               safestrncpy(config.c_ldap_base_dn, buf,
+                                           sizeof config.c_ldap_base_dn);
+                               break;
+                       case 35:
+                               safestrncpy(config.c_ldap_bind_dn, buf,
+                                           sizeof config.c_ldap_bind_dn);
+                               break;
+                       case 36:
+                               safestrncpy(config.c_ldap_bind_pw, buf,
+                                           sizeof config.c_ldap_bind_pw);
+                               break;
+#endif
                        }
                        ++a;
                }