diff options
author | Jeremy Allison <jra@samba.org> | 2000-06-22 23:59:22 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-06-22 23:59:22 +0000 |
commit | eecab5c66096cc42323aaa4a796bf4a17e491a00 (patch) | |
tree | 93b03f3f1f5e324a32f13791b5acc21a3d07b27b /source3/param/loadparm.c | |
parent | f9e9f98a4a579f24d8ad1804b22bf36ede250e23 (diff) | |
download | samba-eecab5c66096cc42323aaa4a796bf4a17e491a00.tar.gz samba-eecab5c66096cc42323aaa4a796bf4a17e491a00.tar.bz2 samba-eecab5c66096cc42323aaa4a796bf4a17e491a00.zip |
Changed enumports to show printernames as ports. In line with 'the grand plan' :-)
Gerald & I discussed with HP. More changes to follow.
Jeremy.
(This used to be commit 193a248beda99103c73a0b0ea5e2fbcbb516ce8e)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0bcb63984b..57db8f0e87 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1476,7 +1476,7 @@ FN_LOCAL_STRING(lp_lppausecommand, szLppausecommand) FN_LOCAL_STRING(lp_lpresumecommand, szLpresumecommand) FN_LOCAL_STRING(lp_queuepausecommand, szQueuepausecommand) FN_LOCAL_STRING(lp_queueresumecommand, szQueueresumecommand) -FN_LOCAL_STRING(lp_printername, szPrintername) +static FN_LOCAL_STRING(_lp_printername, szPrintername) FN_LOCAL_STRING(lp_driverfile, szDriverFile) FN_LOCAL_STRING(lp_printerdriver, szPrinterDriver) FN_LOCAL_STRING(lp_hostsallow, szHostsallow) @@ -1958,14 +1958,17 @@ static BOOL service_ok(int iService) /* The [printers] entry MUST be printable. I'm all for flexibility, but */ /* I can't see why you'd want a non-printable printer service... */ - if (strwicmp(iSERVICE(iService).szService, PRINTERS_NAME) == 0) - if (!iSERVICE(iService).bPrint_ok) - { + if (strwicmp(iSERVICE(iService).szService, PRINTERS_NAME) == 0) { + if (!iSERVICE(iService).bPrint_ok) { DEBUG(0, ("WARNING: [%s] service MUST be printable!\n", iSERVICE(iService).szService)); iSERVICE(iService).bPrint_ok = True; } + /* [printers] service must also be non-browsable. */ + if (iSERVICE(iService).bBrowseable) + iSERVICE(iService).bBrowseable = False; + } if (iSERVICE(iService).szPath[0] == '\0' && strwicmp(iSERVICE(iService).szService, HOMES_NAME) != 0) @@ -3472,3 +3475,11 @@ int lp_force_dir_security_mode(int snum) return val; } +char *lp_printername(int snum) +{ + char *ret = _lp_printername(snum); + if (ret == NULL || (ret != NULL && *ret == '\0')) + ret = lp_servicename(snum); + + return ret; +} |