1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

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
This commit is contained in:
Garming Sam 2014-07-11 14:01:33 +12:00 committed by Michael Adam
parent 72642f1260
commit e17c241711

View File

@ -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;