diff options
author | Garming Sam <garming@catalyst.net.nz> | 2014-07-11 14:01:33 +1200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-07-31 10:41:58 +0200 |
commit | e17c241711487cd2d203b50fceda83f745b97dc4 (patch) | |
tree | 561bde39201f7c3eab5b0b4c99f9a785e209dbae | |
parent | 72642f126086f89ba3e1e42992718f6db22f0831 (diff) | |
download | samba-e17c241711487cd2d203b50fceda83f745b97dc4.tar.gz samba-e17c241711487cd2d203b50fceda83f745b97dc4.tar.xz samba-e17c241711487cd2d203b50fceda83f745b97dc4.zip |
param: Add errors for when an s3 context is used incorrectly
Change-Id: I176b4413769f41739639875ab874a3e340b6a184
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 31 10:41:58 CEST 2014 on sn-devel-104
-rw-r--r-- | lib/param/loadparm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 2b73d40f6c..480f970b02 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -574,6 +574,10 @@ struct loadparm_service *lpcfg_add_service(struct loadparm_context *lp_ctx, int num_to_alloc = lp_ctx->iNumServices + 1; struct parmlist_entry *data, *pdata; + if (lp_ctx->s3_fns != NULL) { + smb_panic("Add a service should not be called on an s3 loadparm ctx"); + } + if (pservice == NULL) { pservice = lp_ctx->sDefault; } @@ -2296,6 +2300,11 @@ void lpcfg_killunused(struct loadparm_context *lp_ctx, bool (*snumused) (struct smbsrv_connection *, int)) { int i; + + if (lp_ctx->s3_fns != NULL) { + smb_panic("Cannot be used from an s3 loadparm ctx"); + } + for (i = 0; i < lp_ctx->iNumServices; i++) { if (lp_ctx->services[i] == NULL) continue; |