diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-06 15:06:45 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-06 15:06:45 +0000 |
commit | 12a38a4632d7e5955b547a8bffdef86d3393393f (patch) | |
tree | f59588ee78a660762419ec82cfb268754c1b6ee6 | |
parent | 2684f508493ca2563b736216af0801b9532d225e (diff) | |
download | samba-12a38a4632d7e5955b547a8bffdef86d3393393f.tar.gz samba-12a38a4632d7e5955b547a8bffdef86d3393393f.tar.bz2 samba-12a38a4632d7e5955b547a8bffdef86d3393393f.zip |
added winbindd options in head branch, so it is possible to combine
branches
(This used to be commit cd5e2494279792f8516947a63bf313f8142a52c0)
-rw-r--r-- | source3/param/loadparm.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 1294eda45c..04bf6522bf 100644 --- a/source3/param/loadparm.c +++ b/source3/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) |