summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-05-06 18:14:02 +0000
committerJeremy Allison <jra@samba.org>1998-05-06 18:14:02 +0000
commitb54509045d7186fc0526d91bcf429659cba8be1d (patch)
treeaaf529823ffb62ad2b350c156885ab849b38db9a /source3/param
parent2b4d426726cad43db6ef2889c83d898b52a2018f (diff)
downloadsamba-b54509045d7186fc0526d91bcf429659cba8be1d.tar.gz
samba-b54509045d7186fc0526d91bcf429659cba8be1d.tar.bz2
samba-b54509045d7186fc0526d91bcf429659cba8be1d.zip
loadparm.c: Added #ifdef USE_LDAP around ldap code.
server.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic() as only smbd knows about usernames. Also fixes problem with calling standard_sub_basic() from loadparm.c. smbpass.c: Partial tidyup of machine_password_lock() code - not finished yet. util.c: Moved %U, %G and %N into standard_sub() from standard_sub_basic() as only smbd knows about usernames. Also fixes problem with calling standard_sub_basic() from loadparm.c. lib/rpc/server/srv_ldap_helpers.c: Added #ifdef USE_LDAP around ldap code. lib/rpc/server/srv_samr.c: Added #ifdef USE_LDAP around ldap code. Jeremy. (This used to be commit 446b98ca071170fc950bad86ad96b58308a5b75c)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7483af54a4..9ae845486a 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -172,7 +172,9 @@ typedef struct
int shmem_size;
int client_code_page;
int announce_as; /* This is initialised in init_globals */
+#ifdef USE_LDAP
int ldap_port;
+#endif /* USE_LDAP */
BOOL bDNSproxy;
BOOL bWINSsupport;
BOOL bWINSproxy;
@@ -622,6 +624,7 @@ static struct parm_struct parm_table[] =
{"oplocks", P_BOOL, P_LOCAL, &sDefault.bOpLocks, NULL, NULL, FLAG_GLOBAL},
{"fake oplocks", P_BOOL, P_LOCAL, &sDefault.bFakeOplocks, NULL, NULL, 0},
+#ifdef USE_LDAP
{"Ldap Options", P_SEP, P_SEPARATOR},
{"ldap server", P_STRING, P_GLOBAL, &Globals.szLdapServer, NULL, NULL, 0},
{"ldap port", P_INTEGER, P_GLOBAL, &Globals.ldap_port, NULL, NULL, 0},
@@ -629,7 +632,7 @@ static struct parm_struct parm_table[] =
{"ldap filter", P_STRING, P_GLOBAL, &Globals.szLdapFilter, NULL, NULL, 0},
{"ldap root", P_STRING, P_GLOBAL, &Globals.szLdapRoot, NULL, NULL, 0},
{"ldap root passwd", P_STRING, P_GLOBAL, &Globals.szLdapRootPassword,NULL, NULL, 0},
-
+#endif /* USE_LDAP */
{"Miscellaneous Options", P_SEP, P_SEPARATOR},
@@ -776,10 +779,11 @@ static void init_globals(void)
Globals.bUnixPasswdSync = False;
Globals.bPasswdChatDebug = False;
+#ifdef USE_LDAP
/* default values for ldap */
string_set(&Globals.szLdapServer, "localhost");
Globals.ldap_port=389;
-
+#endif /* USE_LDAP */
/* these parameters are set to defaults that are more appropriate
for the increasing samba install base:
@@ -983,11 +987,13 @@ FN_GLOBAL_STRING(lp_domain_guest_users,&Globals.szDomainGuestUsers)
FN_GLOBAL_STRING(lp_domain_hostsallow,&Globals.szDomainHostsallow)
FN_GLOBAL_STRING(lp_domain_hostsdeny,&Globals.szDomainHostsdeny)
+#ifdef USE_LDAP
FN_GLOBAL_STRING(lp_ldap_server,&Globals.szLdapServer);
FN_GLOBAL_STRING(lp_ldap_suffix,&Globals.szLdapSuffix);
FN_GLOBAL_STRING(lp_ldap_filter,&Globals.szLdapFilter);
FN_GLOBAL_STRING(lp_ldap_root,&Globals.szLdapRoot);
FN_GLOBAL_STRING(lp_ldap_rootpasswd,&Globals.szLdapRootPassword);
+#endif /* USE_LDAP */
FN_GLOBAL_BOOL(lp_dns_proxy,&Globals.bDNSproxy)
FN_GLOBAL_BOOL(lp_wins_support,&Globals.bWINSsupport)
@@ -1044,7 +1050,9 @@ FN_GLOBAL_INTEGER(lp_announce_as,&Globals.announce_as)
FN_GLOBAL_INTEGER(lp_lm_announce,&Globals.lm_announce)
FN_GLOBAL_INTEGER(lp_lm_interval,&Globals.lm_interval)
+#ifdef USE_LDAP
FN_GLOBAL_INTEGER(lp_ldap_port,&Globals.ldap_port)
+#endif /* USE_LDAP */
FN_LOCAL_STRING(lp_preexec,szPreExec)
FN_LOCAL_STRING(lp_postexec,szPostExec)