diff options
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 61e38bea60..318c1ea534 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -104,6 +104,9 @@ static BOOL defaults_saved = False; typedef struct { char *szPrintcapname; + char *szEnumPortsCommand; + char *szAddPrinterCommand; + char *szDeletePrinterCommand; char *szLockDir; char *szRootdir; char *szDefaultService; @@ -793,6 +796,10 @@ static struct parm_struct parm_table[] = { {"queuepause command", P_STRING, P_LOCAL, &sDefault.szQueuepausecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, {"queueresume command", P_STRING, P_LOCAL, &sDefault.szQueueresumecommand, NULL, NULL, FLAG_PRINT | FLAG_GLOBAL}, + {"enumports command", P_STRING, P_GLOBAL, &Globals.szEnumPortsCommand, NULL, NULL, 0}, + {"addprinter command", P_STRING, P_GLOBAL, &Globals.szAddPrinterCommand, NULL, NULL, 0}, + {"deleteprinter command", P_STRING, P_GLOBAL, &Globals.szDeletePrinterCommand, NULL, NULL, 0}, + {"printer name", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, FLAG_PRINT}, {"printer", P_STRING, P_LOCAL, &sDefault.szPrintername, NULL, NULL, 0}, {"printer driver", P_STRING, P_LOCAL, &sDefault.szPrinterDriver, NULL, NULL, FLAG_PRINT}, @@ -1317,6 +1324,9 @@ FN_GLOBAL_STRING(lp_configfile, &Globals.szConfigFile) FN_GLOBAL_STRING(lp_smb_passwd_file, &Globals.szSMBPasswdFile) FN_GLOBAL_STRING(lp_serverstring, &Globals.szServerString) FN_GLOBAL_STRING(lp_printcapname, &Globals.szPrintcapname) +FN_GLOBAL_STRING(lp_enumports_cmd, &Globals.szEnumPortsCommand) +FN_GLOBAL_STRING(lp_addprinter_cmd, &Globals.szAddPrinterCommand) +FN_GLOBAL_STRING(lp_deleteprinter_cmd, &Globals.szDeletePrinterCommand) FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir) #ifdef WITH_UTMP FN_GLOBAL_STRING(lp_utmpdir, &Globals.szUtmpDir) @@ -3008,6 +3018,18 @@ void lp_killunused(BOOL (*snumused) (int)) /*************************************************************************** +unload a service +***************************************************************************/ +void lp_killservice(int iServiceIn) +{ + if (VALID(iServiceIn)) + { + iSERVICE(iServiceIn).valid = False; + free_service(pSERVICE(iServiceIn)); + } +} + +/*************************************************************************** save the curent values of all global and sDefault parameters into the defaults union. This allows swat and testparm to show only the changed (ie. non-default) parameters. |