summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-06 15:06:45 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-06 15:06:45 +0000
commitcd5e2494279792f8516947a63bf313f8142a52c0 (patch)
treeb8c5a18a7501e2b0449645dbcc8dd8ee8462b988 /source
parent76da586396c85b6614579b9234eec34f57c12ffe (diff)
downloadsamba-cd5e2494279792f8516947a63bf313f8142a52c0.tar.gz
samba-cd5e2494279792f8516947a63bf313f8142a52c0.tar.xz
samba-cd5e2494279792f8516947a63bf313f8142a52c0.zip
added winbindd options in head branch, so it is possible to combine
branches
Diffstat (limited to 'source')
-rw-r--r--source/param/loadparm.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index 1294eda45cd..04bf6522bf1 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -165,6 +165,10 @@ typedef struct
char *szUtmpDir;
#endif /* WITH_UTMP */
char *szSourceEnv;
+ char *szWinbindUID;
+ char *szWinbindGID;
+ char *szTemplateHomedir;
+ char *szTemplateShell;
int max_log_size;
int mangled_stack;
int max_xmit;
@@ -195,6 +199,7 @@ typedef struct
int map_to_guest;
int min_passwd_length;
int oplock_break_wait_time;
+ int winbind_cache_time;
#ifdef WITH_LDAP
int ldap_port;
#endif /* WITH_LDAP */
@@ -506,6 +511,7 @@ static BOOL handle_client_code_page(char *pszParmValue,char **ptr);
static BOOL handle_vfs_object(char *pszParmValue, char **ptr);
static BOOL handle_source_env(char *pszParmValue,char **ptr);
static BOOL handle_netbios_name(char *pszParmValue,char **ptr);
+static BOOL handle_winbind_id(char *pszParmValue, char **ptr);
static void set_default_server_announce_type(void);
@@ -889,6 +895,14 @@ static struct parm_struct parm_table[] =
{"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, FLAG_GLOBAL},
#endif
+ {"Winbind options", P_SEP, P_SEPARATOR},
+
+ {"winbind uid", P_STRING, P_GLOBAL, &Globals.szWinbindUID, handle_winbind_id, NULL, 0},
+ {"winbind gid", P_STRING, P_GLOBAL, &Globals.szWinbindGID, handle_winbind_id, NULL, 0},
+ {"template homedir", P_STRING, P_GLOBAL, &Globals.szTemplateHomedir, NULL, NULL, 0},
+ {"template shell", P_STRING, P_GLOBAL, &Globals.szTemplateShell, NULL, NULL, 0},
+ {"winbind cache time", P_INTEGER, P_GLOBAL, &Globals.winbind_cache_time, NULL, NULL, 0},
+
{NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0}
};
@@ -1072,6 +1086,10 @@ static void init_globals(void)
Globals.bAllowTrustedDomains = True;
+ string_set(&Globals.szTemplateShell, "/bin/false");
+ string_set(&Globals.szTemplateHomedir, "/home/%U");
+ Globals.winbind_cache_time = 15;
+
/*
* This must be done last as it checks the value in
* client_code_page.
@@ -2209,6 +2227,37 @@ static BOOL handle_copy(char *pszParmValue,char **ptr)
}
/***************************************************************************
+ Handle winbind uid and gid allocation parameters. The format of these
+ parameters is:
+
+ [global]
+
+ winbind uid = 1000-1999
+ winbind gid = 700-899
+
+ We only do simple parsing checks here. The strings are parsed into useful
+ structures in the winbind daemon code.
+
+***************************************************************************/
+
+/* Do some simple checks on "winbind [ug]id" parameter value */
+
+static BOOL handle_winbind_id(char *pszParmValue, char **ptr)
+{
+ int low, high;
+
+ if (sscanf(pszParmValue, "%d-%d", &low, &high) != 2) {
+ return False;
+ }
+
+ /* Parse OK */
+
+ string_set(ptr,pszParmValue);
+
+ return True;
+}
+
+/***************************************************************************
initialise a copymap
***************************************************************************/
static void init_copymap(service *pservice)