summaryrefslogtreecommitdiff
path: root/source3/param/loadparm_server_role.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-11-08 12:12:06 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-11-17 00:34:08 +0100
commitd97acc8fb9710c41c9758801af1e79c38f9ffdcc (patch)
tree8d695f0f6ad8ade27b5f5673f879b5a2dcd14574 /source3/param/loadparm_server_role.c
parent7b175e875ea4cdfa27c21369a28e9c4ef14c925b (diff)
downloadsamba-d97acc8fb9710c41c9758801af1e79c38f9ffdcc.tar.gz
samba-d97acc8fb9710c41c9758801af1e79c38f9ffdcc.tar.bz2
samba-d97acc8fb9710c41c9758801af1e79c38f9ffdcc.zip
s3-param: Add "server role" as global parameter
This will help extracting server role processing code in common library.
Diffstat (limited to 'source3/param/loadparm_server_role.c')
-rw-r--r--source3/param/loadparm_server_role.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source3/param/loadparm_server_role.c b/source3/param/loadparm_server_role.c
index 1f18b4fd12..7fe4411b54 100644
--- a/source3/param/loadparm_server_role.c
+++ b/source3/param/loadparm_server_role.c
@@ -30,7 +30,6 @@
/*******************************************************************
Set the server type we will announce as via nmbd.
********************************************************************/
-static int server_role;
static const struct srv_role_tab {
uint32 role;
@@ -56,7 +55,7 @@ const char* server_role_str(uint32 role)
void set_server_role(void)
{
- server_role = ROLE_STANDALONE;
+ int server_role = ROLE_STANDALONE;
switch (lp_security()) {
case SEC_SHARE:
@@ -98,14 +97,7 @@ void set_server_role(void)
break;
}
+ _lp_set_server_role(server_role);
DEBUG(10, ("set_server_role: role = %s\n", server_role_str(server_role)));
}
-/***********************************************************
- returns role of Samba server
-************************************************************/
-
-int lp_server_role(void)
-{
- return server_role;
-}