Adding a new parameter to smb.conf

Partha Sarathi partha at exablox.com
Wed Feb 10 02:59:16 UTC 2016


Hi Folks,

I am trying add a new smb.conf parameter in SAMBA-4.3.4 and followed the
README as below,

===============
Adding a parameter
------------------

To add or change an smb.conf option, you only have to modify
lib/param/param_table.c and add the documentation to docs-xml/smbdotconf.
If special defaults are needed, the functions loadparm_int() in
lib/param/loadparm.c and/or init_globals() in source3/param/loadparm.c
need to be adapted accordingly.
The rest is generated for you.
=================

and I modified the param table with a new entry as below at
samba4.3.4/lib/param/param_table.c

        {
                .label          = "tdb backup script",
                .type           = P_STRING,
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(tdb_backup_script),
                .special        = NULL,
                .enum_list      = NULL,
        },

and the build failed with
../lib/param/param_table.c:2432:14: error: ‘struct loadparm_global’ has no
member named ‘tdb_backup_script’
Waf: Leaving directory `/home/partha/packaging/samba43/bin'
Build failed:  -> task failed (err #1):
{task: cc param_table.c -> param_table_8.o}
make: *** [all] Error 1


and the python generated "param_global.h" does not have this entry in
"struct loadparm_global"

Am I missing any thing here ?


--Partha


More information about the samba-technical mailing list