diff options
author | Tim Potter <tpot@samba.org> | 2000-07-25 06:10:59 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-07-25 06:10:59 +0000 |
commit | b40175936ae3d7acd6eb3f386c467ba3f9868631 (patch) | |
tree | e6b4e20f06eb60eb7ae159ede0b939cfb22d503c /source3/smbd | |
parent | ac70155b252eb57e28d54598556e244da438cd34 (diff) | |
download | samba-b40175936ae3d7acd6eb3f386c467ba3f9868631.tar.gz samba-b40175936ae3d7acd6eb3f386c467ba3f9868631.tar.bz2 samba-b40175936ae3d7acd6eb3f386c467ba3f9868631.zip |
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)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/service.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |