summaryrefslogtreecommitdiff
path: root/lib/param/loadparm_server_role.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-11-10 12:45:54 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-11-17 00:34:08 +0100
commit9524e2fce1b7f644fef5f7c8134f72681d786e65 (patch)
tree0ffe517b8f05845767921af0c255eea71da5f71e /lib/param/loadparm_server_role.h
parentf099feaa01b6548cb60cb9d7d50b1f196b1af878 (diff)
downloadsamba-9524e2fce1b7f644fef5f7c8134f72681d786e65.tar.gz
samba-9524e2fce1b7f644fef5f7c8134f72681d786e65.tar.bz2
samba-9524e2fce1b7f644fef5f7c8134f72681d786e65.zip
param: calculate server role from security, and security from server role
This allows smb.conf files from either the samba3 or samba4 tradition to come to the same value of server role, using the information in the smb.conf file. This is important so that tools like 'net getlocalsid' work against a Samba4 AD installation (yes, users have tried this). Andrew Bartlett Pair-Programmed-With: Amitay Isaacs <amitay@samba.org>
Diffstat (limited to 'lib/param/loadparm_server_role.h')
-rw-r--r--lib/param/loadparm_server_role.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/param/loadparm_server_role.h b/lib/param/loadparm_server_role.h
new file mode 100644
index 0000000000..2c82527573
--- /dev/null
+++ b/lib/param/loadparm_server_role.h
@@ -0,0 +1,31 @@
+/*
+ Unix SMB/CIFS implementation.
+ Parameter loading functions
+ Copyright (C) Karl Auer 1993-1998
+
+ Largely re-written by Andrew Tridgell, September 1994
+
+ Copyright (C) Simo Sorce 2001
+ Copyright (C) Alexander Bokovoy 2002
+ Copyright (C) Stefan (metze) Metzmacher 2002
+ Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003
+ Copyright (C) Michael Adam 2008
+ Copyright (C) Andrew Bartlett 2010
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+const char* server_role_str(uint32_t role);
+int lp_find_server_role(int server_role, int security, bool domain_logons, bool domain_master);
+int lp_find_security(int server_role, int security);