diff options
author | Jeremy Allison <jra@samba.org> | 2000-07-31 20:41:51 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-07-31 20:41:51 +0000 |
commit | 49fcb300de40d6da8682b485fd2c51236bcbb3dd (patch) | |
tree | 22f8c92ec9d8e81f67fadf5ac3e7b0ba81cdceef /source3/param | |
parent | 2759822674174007dafa84c99e77e0c5919d6c60 (diff) | |
download | samba-49fcb300de40d6da8682b485fd2c51236bcbb3dd.tar.gz samba-49fcb300de40d6da8682b485fd2c51236bcbb3dd.tar.xz samba-49fcb300de40d6da8682b485fd2c51236bcbb3dd.zip |
Added John Reilly's enumports/addprinter/delprinter scripting code plus the
fix for the Win9x printer drivers.
Changed command names to add "command" string on the end for some consistancy
with the other scripting commands.
Added '%P' option to tdbpack/unpack to store long comment string.
Made port name be "Samba Printer Port" if no enum port script given.
Fixed prs_uint32_pre code to cope with null args.
Jeremy.
(This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
Diffstat (limited to 'source3/param')
-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. |