summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-03-08 07:15:36 +0100
committerMichael Adam <obnox@samba.org>2011-03-22 22:49:57 +0100
commitac8836e77f0f7a15bf52f1dc8860729d2693888f (patch)
tree8071b69959e2cfd1ec5f51b81d37893952e3f8fd /source3
parent278cfec53a16e49973e1d04b001bb7f38e483807 (diff)
downloadsamba-ac8836e77f0f7a15bf52f1dc8860729d2693888f.tar.gz
samba-ac8836e77f0f7a15bf52f1dc8860729d2693888f.tar.bz2
samba-ac8836e77f0f7a15bf52f1dc8860729d2693888f.zip
s3:loadparm: deprecate "idmap uid/gid/backend" and have them set "idmap config * : range/backend"
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index d0dd3464ba..1a8754918b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -699,6 +699,7 @@ static int default_server_announce;
static bool handle_include( int snum, const char *pszParmValue, char **ptr);
static bool handle_copy( int snum, const char *pszParmValue, char **ptr);
static bool handle_netbios_name( int snum, const char *pszParmValue, char **ptr);
+static bool handle_idmap_backend(int snum, const char *pszParmValue, char **ptr);
static bool handle_idmap_uid( int snum, const char *pszParmValue, char **ptr);
static bool handle_idmap_gid( int snum, const char *pszParmValue, char **ptr);
static bool handle_debug_list( int snum, const char *pszParmValue, char **ptr );
@@ -4547,9 +4548,9 @@ static struct parm_struct parm_table[] = {
.type = P_STRING,
.p_class = P_GLOBAL,
.ptr = &Globals.szIdmapBackend,
- .special = NULL,
+ .special = handle_idmap_backend,
.enum_list = NULL,
- .flags = FLAG_ADVANCED,
+ .flags = FLAG_ADVANCED | FLAG_DEPRECATED,
},
{
.label = "idmap cache time",
@@ -4576,7 +4577,7 @@ static struct parm_struct parm_table[] = {
.ptr = &Globals.szIdmapUID,
.special = handle_idmap_uid,
.enum_list = NULL,
- .flags = FLAG_ADVANCED,
+ .flags = FLAG_ADVANCED | FLAG_DEPRECATED,
},
{
.label = "winbind uid",
@@ -4594,7 +4595,7 @@ static struct parm_struct parm_table[] = {
.ptr = &Globals.szIdmapGID,
.special = handle_idmap_gid,
.enum_list = NULL,
- .flags = FLAG_ADVANCED,
+ .flags = FLAG_ADVANCED | FLAG_DEPRECATED,
},
{
.label = "winbind gid",
@@ -7655,38 +7656,25 @@ bool lp_idmap_gid(gid_t *low, gid_t *high)
return True;
}
-/* Do some simple checks on "idmap [ug]id" parameter values */
-
-static bool handle_idmap_uid(int snum, const char *pszParmValue, char **ptr)
+static bool handle_idmap_backend(int snum, const char *pszParmValue, char **ptr)
{
- uint32 low, high;
-
- if (sscanf(pszParmValue, "%u - %u", &low, &high) != 2 || high < low)
- return False;
+ lp_do_parameter(snum, "idmap config * : backend", pszParmValue);
- /* Parse OK */
+ return true;
+}
- string_set(ptr, pszParmValue);
+/* Do some simple checks on "idmap [ug]id" parameter values */
- idmap_uid_low = low;
- idmap_uid_high = high;
+static bool handle_idmap_uid(int snum, const char *pszParmValue, char **ptr)
+{
+ lp_do_parameter(snum, "idmap config * : range", pszParmValue);
return True;
}
static bool handle_idmap_gid(int snum, const char *pszParmValue, char **ptr)
{
- uint32 low, high;
-
- if (sscanf(pszParmValue, "%u - %u", &low, &high) != 2 || high < low)
- return False;
-
- /* Parse OK */
-
- string_set(ptr, pszParmValue);
-
- idmap_gid_low = low;
- idmap_gid_high = high;
+ lp_do_parameter(snum, "idmap config * : range", pszParmValue);
return True;
}