diff options
author | Michael Adam <obnox@samba.org> | 2010-06-01 15:35:01 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-08-14 02:10:40 +0200 |
commit | 6d9f4d6d36da6f9ab729d769d00e615fe8b4a499 (patch) | |
tree | 507328805fac94553847106daaabfef0dc534df0 /source3 | |
parent | 2056703d56c67b4f01b61edafdf17d5e20220078 (diff) | |
download | samba-6d9f4d6d36da6f9ab729d769d00e615fe8b4a499.tar.gz samba-6d9f4d6d36da6f9ab729d769d00e615fe8b4a499.tar.bz2 samba-6d9f4d6d36da6f9ab729d769d00e615fe8b4a499.zip |
s3:loadparm: add new boolean parameter "idmap read only"
This will be used to be able to put the default idmap config
read only. This can make sense for instance with the tdb2
idmap backend and using the idmap script feature.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/param/loadparm.c | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 3ca3f103e9..f7d5e8f8f5 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -3653,6 +3653,7 @@ bool lp_winbind_normalize_names(void); bool lp_winbind_rpc_only(void); bool lp_create_krb5_conf(void); const char *lp_idmap_backend(void); +bool lp_idmap_read_only(void); int lp_idmap_cache_time(void); int lp_idmap_negative_cache_time(void); int lp_keepalive(void); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 98e62a3e5e..b20b56578c 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -212,6 +212,7 @@ struct global { bool bWinbindRpcOnly; bool bCreateKrb5Conf; char *szIdmapBackend; + bool bIdmapReadOnly; char *szAddShareCommand; char *szChangeShareCommand; char *szDeleteShareCommand; @@ -4501,6 +4502,15 @@ static struct parm_struct parm_table[] = { .flags = FLAG_ADVANCED, }, { + .label = "idmap read only", + .type = P_BOOL, + .p_class = P_GLOBAL, + .ptr = &Globals.bIdmapReadOnly, + .special = NULL, + .enum_list = NULL, + .flags = FLAG_ADVANCED, + }, + { .label = "idmap cache time", .type = P_INTEGER, .p_class = P_GLOBAL, @@ -5211,6 +5221,7 @@ static void init_globals(bool first_time_only) Globals.bAllowTrustedDomains = True; string_set(&Globals.szIdmapBackend, "tdb"); + Globals.bIdmapReadOnly = false; string_set(&Globals.szTemplateShell, "/bin/false"); string_set(&Globals.szTemplateHomedir, "/home/%D/%U"); @@ -5514,6 +5525,7 @@ FN_GLOBAL_BOOL(lp_winbind_rpc_only, &Globals.bWinbindRpcOnly) FN_GLOBAL_BOOL(lp_create_krb5_conf, &Globals.bCreateKrb5Conf) FN_GLOBAL_CONST_STRING(lp_idmap_backend, &Globals.szIdmapBackend) +FN_GLOBAL_BOOL(lp_idmap_read_only, &Globals.bIdmapReadOnly) FN_GLOBAL_INTEGER(lp_idmap_cache_time, &Globals.iIdmapCacheTime) FN_GLOBAL_INTEGER(lp_idmap_negative_cache_time, &Globals.iIdmapNegativeCacheTime) FN_GLOBAL_INTEGER(lp_keepalive, &Globals.iKeepalive) |