summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-10-01 13:10:57 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-10-01 13:10:57 +0000
commitad8a22e570c8970247dc76defc9be2b768bd102d (patch)
treee672142a6c857da134cc893e5ebe7cef08791d19 /source3/param
parent8147df0b6b4674670e70b45c603e8323e5c61c33 (diff)
downloadsamba-ad8a22e570c8970247dc76defc9be2b768bd102d.tar.gz
samba-ad8a22e570c8970247dc76defc9be2b768bd102d.tar.bz2
samba-ad8a22e570c8970247dc76defc9be2b768bd102d.zip
Updates from Samba HEAD:
- Fix segfaults in the 'net ads' commands when no password is provided - Readd --with-ldapsam for 2.2 compatability. This conditionally compiles the old options, but the actual code is available on all ldap systems. - Fix shadow passwords (as per work with vl) - Fix sending plaintext passwords to unicode servers (again vl) - Add a bit of const to secrets.c functions - Fix some spelling and grammer by vance. - Document the -r option in smbgroupedit. There are more changes in HEAD, I'm only merging the changes I've been involved with. Andrew Bartlett (This used to be commit 83973c389355a5cc9ca74af467dfd8b5dabd2c8f)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c484439837..67276befec 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -207,6 +207,10 @@ typedef struct
int iLockSpinTime;
char *szLdapMachineSuffix;
char *szLdapUserSuffix;
+#ifdef WITH_LDAP_SAMCONFIG
+ int ldap_port;
+ char *szLdapServer;
+#endif
int ldap_ssl;
char *szLdapSuffix;
char *szLdapFilter;
@@ -596,7 +600,7 @@ static struct enum_list enum_ldap_ssl[] = {
{LDAP_SSL_OFF, "off"},
{LDAP_SSL_OFF, "Off"},
{LDAP_SSL_START_TLS, "start tls"},
- {LDAP_SSL_START_TLS, "start_tls"},
+ {LDAP_SSL_START_TLS, "Start_tls"},
{-1, NULL}
};
@@ -1003,6 +1007,10 @@ static struct parm_struct parm_table[] = {
{"Ldap Options", P_SEP, P_SEPARATOR},
+#ifdef WITH_LDAP_SAMCONFIG
+ {"ldap server", P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, 0},
+ {"ldap port", P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, 0},
+#endif
{"ldap suffix", P_STRING, P_GLOBAL, &Globals.szLdapSuffix, handle_ldap_suffix, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"ldap machine suffix", P_STRING, P_GLOBAL, &Globals.szLdapMachineSuffix, handle_ldap_machine_suffix, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
{"ldap user suffix", P_STRING, P_GLOBAL, &Globals.szLdapUserSuffix, handle_ldap_user_suffix, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
@@ -1177,7 +1185,7 @@ static void init_printer_values(void)
"lp -i %p-%j -H hold");
string_set(&sDefault.szLpresumecommand,
"lp -i %p-%j -H resume");
-#endif /* SYSV */
+#endif /* HPUX */
break;
case PRINT_QNX:
@@ -1244,7 +1252,6 @@ static void init_globals(void)
string_set(&Globals.szSMBPasswdFile, dyn_SMB_PASSWD_FILE);
string_set(&Globals.szPrivateDir, dyn_PRIVATE_DIR);
- Globals.szPassdbBackend = str_list_make("smbpasswd unixsam", NULL);
/* use the new 'hash2' method by default */
string_set(&Globals.szManglingMethod, "hash2");
@@ -1367,6 +1374,14 @@ static void init_globals(void)
a large number of sites (tridge) */
Globals.bHostnameLookups = False;
+#ifdef WITH_LDAP_SAMCONFIG
+ string_set(&Globals.szLdapServer, "localhost");
+ Globals.ldap_port = 636;
+ Globals.szPassdbBackend = str_list_make("ldapsam unixsam", NULL);
+#else
+ Globals.szPassdbBackend = str_list_make("smbpasswd unixsam", NULL);
+#endif /* WITH_LDAP_SAMCONFIG */
+
string_set(&Globals.szLdapSuffix, "");
string_set(&Globals.szLdapMachineSuffix, "");
string_set(&Globals.szLdapUserSuffix, "");
@@ -1582,6 +1597,11 @@ FN_GLOBAL_STRING(lp_winbind_separator, &Globals.szWinbindSeparator)
FN_GLOBAL_BOOL(lp_winbind_enum_users, &Globals.bWinbindEnumUsers)
FN_GLOBAL_BOOL(lp_winbind_enum_groups, &Globals.bWinbindEnumGroups)
FN_GLOBAL_BOOL(lp_winbind_use_default_domain, &Globals.bWinbindUseDefaultDomain)
+
+#ifdef WITH_LDAP_SAMCONFIG
+FN_GLOBAL_STRING(lp_ldap_server, &Globals.szLdapServer)
+FN_GLOBAL_INTEGER(lp_ldap_port, &Globals.ldap_port)
+#endif
FN_GLOBAL_STRING(lp_ldap_suffix, &Globals.szLdapSuffix)
FN_GLOBAL_STRING(lp_ldap_machine_suffix, &Globals.szLdapMachineSuffix)
FN_GLOBAL_STRING(lp_ldap_user_suffix, &Globals.szLdapUserSuffix)