summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-23 21:51:05 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-23 21:51:05 +0000
commit4cee58780cb15fe5889b9dd0dc34459512d75062 (patch)
tree07e0db236cfdb786458451b879333bc1d687cf3c /source3/param/loadparm.c
parent735926877bb8333a9e862657ea89001bea376b9f (diff)
downloadsamba-4cee58780cb15fe5889b9dd0dc34459512d75062.tar.gz
samba-4cee58780cb15fe5889b9dd0dc34459512d75062.tar.bz2
samba-4cee58780cb15fe5889b9dd0dc34459512d75062.zip
unix instance of group database API
(This used to be commit e76f593b3572ac881f1aa1fb3326d8b7169b0078)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7a28d3418f..49f1c44fcb 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2727,3 +2727,43 @@ BOOL lp_kernel_oplocks(void)
{
return kernel_oplocks_available;
}
+
+/***********************************************************
+ returns role of Samba server
+************************************************************/
+int lp_server_role(void)
+{
+ switch (lp_security())
+ {
+ case SEC_SHARE:
+ {
+ if (lp_domain_logons())
+ {
+ DEBUG(0,("Server's Role (logon server) conflicts with share-level security\n"));
+ }
+ return ROLE_DOMAIN_NONE;
+ }
+ case SEC_SERVER:
+ case SEC_DOMAIN:
+ {
+ if (lp_domain_logons())
+ {
+ return ROLE_DOMAIN_BDC;
+ }
+ return ROLE_DOMAIN_MEMBER;
+ }
+ case SEC_USER:
+ {
+ if (lp_domain_logons())
+ {
+ return ROLE_DOMAIN_BDC;
+ }
+ return ROLE_DOMAIN_PDC;
+ }
+ default:
+ {
+ DEBUG(0,("Server's Role undefined due to unknown security mode\n"));
+ return ROLE_DOMAIN_NONE;
+ }
+ }
+}