diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-14 11:24:01 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-14 11:24:01 +0000 |
commit | e2b50d04ad5eb5fa7c10b59cf5ba0cfe374ab240 (patch) | |
tree | 1f390e8d15e40d656034435929d339c93fb1614a /source3/param | |
parent | a62ff8003e5e34f671e0036a2dde5742f0cf5ee4 (diff) | |
download | samba-e2b50d04ad5eb5fa7c10b59cf5ba0cfe374ab240.tar.gz samba-e2b50d04ad5eb5fa7c10b59cf5ba0cfe374ab240.tar.bz2 samba-e2b50d04ad5eb5fa7c10b59cf5ba0cfe374ab240.zip |
if a local parameter is changed at the global level then propogate the
change to all shares that are currently set to the default value.
(This used to be commit b0e1183b2cbeb7a3150b7250cd19d14c9e5508b6)
Diffstat (limited to 'source3/param')
-rw-r--r-- | source3/param/loadparm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 4bd167798c..27cbc8c8dd 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1983,6 +1983,19 @@ static void dump_globals(FILE *f) } /*************************************************************************** +return True if a local parameter is currently set to the global default +***************************************************************************/ +BOOL lp_is_default(int snum, struct parm_struct *parm) +{ + int pdiff = PTR_DIFF(parm->ptr,&sDefault); + + return equal_parameter(parm->type, + ((char *)pSERVICE(snum)) + pdiff, + ((char *)&sDefault) + pdiff); +} + + +/*************************************************************************** Display the contents of a single services record. ***************************************************************************/ static void dump_a_service(service *pService, FILE *f) |