diff options
Diffstat (limited to 'source3/printing/pcap.c')
-rw-r--r-- | source3/printing/pcap.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index 65195ab1af..ff0a2b5477 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -7,6 +7,8 @@ Re-working by Martin Kiff, 1994 Re-written again by Andrew Tridgell + + Modified for SVID support by Norm Jacobs, 1997 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -49,6 +51,9 @@ * Opening a pipe for "lpc status" and reading that would probably * be pretty effective. Code to do this already exists in the freely * distributable PCNFS server code. + * + * Modified to call SVID/XPG4 support if printcap name is set to "lpstat" + * in smb.conf under Solaris. */ #include "includes.h" @@ -255,10 +260,17 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname) DEBUG(0,( "No printcap file name configured!\n")); return(False); } + +#ifdef SYSV + if (strequal(psz, "lpstat")) + return (sysv_printername_ok(pszPrintername)); +#endif + #ifdef AIX if (strlocate(psz,"/qconfig") != NULL) return(ScanQconfig(psz,pszPrintername)); #endif + if ((pfile = fopen(psz, "r")) == NULL) { DEBUG(0,( "Unable to open printcap file %s for read!\n", psz)); @@ -292,7 +304,6 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname) } } - fclose(pfile); return(False); } @@ -317,6 +328,13 @@ void pcap_printer_fn(void (*fn)()) return; } +#ifdef SYSV + if (strequal(psz, "lpstat")) { + sysv_printer_fn(fn); + return; + } +#endif + #ifdef AIX if (strlocate(psz,"/qconfig") != NULL) { @@ -324,6 +342,7 @@ void pcap_printer_fn(void (*fn)()) return; } #endif + if ((pfile = fopen(psz, "r")) == NULL) { DEBUG(0,( "Unable to open printcap file %s for read!\n", psz)); |