From b40175936ae3d7acd6eb3f386c467ba3f9868631 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 25 Jul 2000 06:10:59 +0000 Subject: Fix for mounting a printer as a share. Not that there's anything specifically wrong with this, but Samba is fooled by the client into thinking the printer is a file share. Files copied to the share gather dust in the spool directory and aren't printed. This patch has the effect of not allowing printers to be mounted as file shares. Not sure whether this is the correct solution or not. {Jeremy,JF,Tridge} please check! (This used to be commit dcf3249bb9fef2a05b376e9c8c1a0a7d602d8a2e) --- source3/smbd/service.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index e6c8b2a6d8..2eab50c482 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -273,6 +273,11 @@ connection_struct *make_connection(char *service,char *user,char *password, int return NULL; } + /* Behave as a printer if we are supposed to */ + if (lp_print_ok(snum) && (strcmp(dev, "A:") == 0)) { + pstrcpy(dev, "LPT1:"); + } + /* lowercase the user name */ strlower(user); -- cgit