1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

696 Commits

Author SHA1 Message Date
Gerald Carter
90bd2b4fd0 r4028: * prevent the background LPQ daemon from updating
the print queue cache just because multiple smbd
  processes sent a message that it was out of date.

* add some extra debug messages while trying to track down
  down jobs being left in the queue after printing has
  completed.
(This used to be commit a64505d52f)
2007-10-10 10:53:28 -05:00
Jeremy Allison
79f7373b33 r3867: Fix from david.hu@hp.com - make a copy of an incoming message
rather than indirecting into it as a struct (may not be on an
even byte boundary). Bug #2052.
Jeremy.
(This used to be commit 8a91a69961)
2007-10-10 10:53:22 -05:00
Jim McDonough
3e8e24c629 r3727: Update from Rob Foehl (rwf@loonybin.net):
Try modifying printer before adding it,since add logic appends ObjectClass to mods, which caused a contraint violation when modifying an already published printer.

Also cleanup the check_published_printers() logic when verifying published status on startup.
(This used to be commit 82eb168c82)
2007-10-10 10:53:16 -05:00
Gerald Carter
5c27f5fbc3 r3710: fix another safe_strcpy() warning SPAM with the printer drivcename
(This used to be commit 5eac16464d)
2007-10-10 10:53:15 -05:00
Gerald Carter
f3ea955b70 r3707: 2028: avoid false error messages when copying a long printer name to the device mode
(This used to be commit c9613214a5)
2007-10-10 10:53:15 -05:00
Gerald Carter
4e18fa46d5 r3069: add 'force printername' service parameter for people that want to enforce printername == sharename for spoolss printing
(This used to be commit d47b8a0b4f)
2007-10-10 10:53:00 -05:00
Gerald Carter
293136c04b r3067: patch based on volker's initial work in trunk that fixes the queu update problem when using the background daemon
(This used to be commit de7af09e72)
2007-10-10 10:53:00 -05:00
Gerald Carter
c53e6401eb r3049: fixing some calls in the printing code to stanard_sub_basic(); fix standard_sub_snum() to use the current user's gid; add some (snum == -1) checks to standard_sub_advanced()
(This used to be commit 8c3fd1908d)
2007-10-10 10:52:59 -05:00
Gerald Carter
534c4a2504 r2996: readability fix for length check; no semantic changes
(This used to be commit 668ab6984a)
2007-10-10 10:52:58 -05:00
Gerald Carter
7df1ed060b r2955: fixing a segfault uncovered by the changes for BUG 1519
(This used to be commit 1664395257)
2007-10-10 10:52:57 -05:00
Günther Deschner
2d016a67b8 r2821: Adding "Windows x64" as architecture string and driverdir "x64" for the
64bit AMD platform.

(This used to be "Windows AMD64" and "AMD64" in one of the release
candidates of SP2 for Windows XP. AMD64 is obviously still supported but
not documented.)

Guenther
(This used to be commit cc5892f041)
2007-10-10 10:52:53 -05:00
Gerald Carter
31441aaa13 r2768: BUG 1519: save the hostname used in the open_printer_ex() for later reuse when filling in the spolss replies (also gets rid of get_called_name()
(This used to be commit 57db8ca91f)
2007-10-10 10:52:52 -05:00
Gerald Carter
729155a428 r2570: minor fix with Rob's patch. use dos_errstr() instead of W_ERROR_V() when using %s in the format string
(This used to be commit b26e4dbd7f)
2007-10-10 10:52:46 -05:00
Gerald Carter
5a8effaaae r2569: Patch from Rob Foehl <rwf@loonybin.net>:
- fix typo in libads/ldap_printer.c:39, ads_find_printer_on_server()
  (originally libads-typo.patch)
- fix leak in printing/nt_printing.c, is_printer_published()
  (originally is_printer_published-leak.patch)
- fix double print_backend_init() calls, now only called from main()
- restructuring in printing/nt_printing.c
  - replaced (un)publish_it() with ads-specific functions
  - moved common code to nt_printer_publish()
  - improved error handling in several places
- added check_published_printers() in printing/nt_printing.c, to verify
  that each published printer is actually in the directory at startup
- changed calling semantics of mod_a_printer, dump_a_printer, and
  update_driver_init to be more consistent with the rest of the api and
  reduce some copying
(This used to be commit 50a5a3dbd0)
2007-10-10 10:52:46 -05:00
Gerald Carter
12172c91da r2191: ensure that we assign our pid to print jobs (and not our parent's pid); ensures that spooling jobs from dead smbds are removed from the tdb
(This used to be commit 9e42d016e1)
2007-10-10 10:52:35 -05:00
Gerald Carter
278f9467f2 r2133: Several fixes:
* BUG 1627: fix for NIS compiles on HPUX 11.00, AIX 4.3 and 5.1
  patch from Olaf Flebbe <o.flebbe@science-computing.de>.
  Will need to watch this one in the build farm.

* Fix bug found by rwf@loonybin.net where the PRINT_ATTRIBUTE_PUBLISHED
  was getting reset by attempts to sanitize the defined attributes
  (PRINTER_ATTRIBUTE_SAMBA)

* Resolve name conflict on DEC OSF-5.1 (inspired by patch from
  Adharsh Praveen <rprav@india.hp.com>)

* Work around parsing error in the print change notify code
  (not that the alignment bug is still there but reording the
   entries in the array works around it).

* remove duplicate declaration of getprintprocdir from rpcclient.
(This used to be commit 7474c6a446)
2007-10-10 10:52:32 -05:00
Günther Deschner
5b1c7afe9b r2068: Use SMB_ASSERT to track down empty printername (thanks jerry).
Guenther
(This used to be commit 9d8fdd5f32)
2007-10-10 10:52:29 -05:00
Günther Deschner
b4ec659c76 r2067: Prevent nameless $LIBDIR/printing/.tdb from beeing created.
I've seen these on several sites now without knowing how they could get
created.

Guenther
(This used to be commit 531a23d1d2)
2007-10-10 10:52:29 -05:00
Gerald Carter
1842fde7d1 r1885: tighten the cache consistency with the ntprinters.tdb entry an the in memory cache associated with open printer handles; also make sure that register_messages_flags() doesn't overwrite the originally registers flags
(This used to be commit 540daf71d8)
2007-10-10 10:52:23 -05:00
Günther Deschner
60727acc3b r1692: first commit :)
* add IA64 to the architecture table of printer-drivers

* add new "net"-subcommands:

  net rpc printer migrate {drivers|printers|forms|security|settings|all}
        [printer]
  net rpc share migrate {shares|files|all} [share]

  this is the first part of the migration suite. this will will (once
  feature-complete) allow to do 1:1 server-cloning in the best possible way by
  making heavy use of samba's rpc_client-functions. all migration-steps
  are implemented as rpc/smb-client-calls; net communicates via rpc/smb
  with two servers at the same time (a remote, source server and a
  destination server that currently defaults to the local smbd). this
  allows e. g. printer-driver migration including driverfiles, recursive
  mirroring of file-shares including file-acls, etc. almost any migration
  step can be called with a migrate-subcommand to provide more flexibility
  during a migration process (at the cost of quite some redundancy :) ).

  "net rpc printer migrate settings" is still in a bad condition (many
  open questions that hopefully can be adressed soon).

  "net rpc share migrate security" as an isolated call to just migrate
  share-ACLs will be added later.

  Before playing with it, make sure to use a test-server. Migration is a
  serious business and this tool-set can perfectly overwrite your
  existing file/print-shares.

* along with the migration functions had to make I the following
  changes:

        - implement setprinter level 3 client-side

        - implement net_add_share level 502 client-side

        - allow security descriptor to be set in setprinterdata level 2
          serverside

guenther
(This used to be commit 8f1716a29b)
2007-10-10 10:52:19 -05:00
Gerald Carter
d90c4a0462 r1384: ensure we remove the tdb entry for a job in the spooling state
(This used to be commit bc8cf6c852)
2007-10-10 10:52:09 -05:00
Jeremy Allison
c531f726c4 r1325: Always use GetTimeOfDay() (wrapper). Ensure ldap replication
sleep time is not more than 5 seconds. Should fix issue
reported by Chris Garrigues <cwg@deepeddy.com>.
Jeremy.
(This used to be commit fbc06831d3)
2007-10-10 10:52:06 -05:00
Volker Lendecke
baf7cf42a6 r1295: To be able to send a message to the background queue updated, we need to be
root. Otherwise the USR1 signal will not be delivered.

Volker
(This used to be commit c66be874d8)
2007-10-10 10:52:04 -05:00
Gerald Carter
087868c499 r1230: (merges from HP PSA) fixing a couple of caching bugs in the printing code. (a) make sure to clear jobs_changed list when deleting a job and, (b) invalidate the printer handle cache when we get a notification that something has changed on that printer
(This used to be commit e3d4fea780)
2007-10-10 10:52:01 -05:00
Jeremy Allison
2fc57c9a2c r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm
still doing more testing, but it fixes a behaviour that we've been wrong
on ever since the start of Samba.
Jeremy.
(This used to be commit 894cc6d162)
2007-10-10 10:51:54 -05:00
Gerald Carter
386a11f49e r1011: fix bad merge (from a few months ago) and ensure that we always use tdb_open_log() instead of tdb_open_ex()
(This used to be commit e65564ab4a)
2007-10-10 10:51:53 -05:00
Volker Lendecke
e707189db3 r979: Implement the 'cups server' option. This makes it possible to have virtual
smbd's connect to different cups daemons.

Volker
(This used to be commit 148dc71ea5)
2007-10-10 10:51:52 -05:00
Gerald Carter
7959cba656 r925: add changes frpm trunk (r841 and r842) -- enable background queue update process and allow printers to have different sharenames from printernames
(This used to be commit 066b9c4276)
2007-10-10 10:51:49 -05:00
Gerald Carter
509c71fef5 r783: fix bug in reading printer data from disk; all ow valuenames with embedded '\'s
(This used to be commit fdc1633c34)
2007-10-10 10:51:38 -05:00
Gerald Carter
0f462790a3 r689: removed unneeded forward declarations
(This used to be commit ae0a770d60)
2007-10-10 10:51:34 -05:00
Jim McDonough
88adbfa1f7 r560: Fix bugzilla 1279: cannot control individual print jobs using cups
Store the print job using a little-endian key.
(This used to be commit e0491dae98)
2007-10-10 10:51:29 -05:00
Jim McDonough
ba8a59dbf4 r555: Fix big-endian storage of jobids in jobs_changed list. Found during
debugging of 1279
(This used to be commit 7c1cfb16c0)
2007-10-10 10:51:29 -05:00
Gerald Carter
72d124af9e r551: BUG 1293: fix double free in printer publishing code
(This used to be commit f9a371f33b)
2007-10-10 10:51:28 -05:00
Gerald Carter
5254c9b6b4 r543: possible fix for BUG 1293 -- initialize pointer to NULL to ensure the failure check is valid
(This used to be commit b7005e6989)
2007-10-10 10:51:28 -05:00
Jeremy Allison
683d27ff1e r460: Fix for broken driver upload/delete path processing.
Jeremy.
(This used to be commit 78be46d13b)
2007-10-10 10:51:24 -05:00
Gerald Carter
578a7d254f r242: adding 'cups options' parameter to allow raw printing without changing /etc/cups/cupsd.conf -- documentation to follow
(This used to be commit 2f323b0991)
2007-10-10 10:51:15 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b)
2007-10-10 10:51:13 -05:00
Gerald Carter
931df5850e r39: * importing .cvsignore files
* updateing WHATSNEW with vl's change
(This used to be commit a7e2730ec4)
2007-10-10 10:51:05 -05:00
Jeremy Allison
722aa118c6 Added per-share parameter "store dos attributes". When set, will store
dos attributes in an EA. Based on an original patch from tridge, but
modified somewhat to cover all cases.
Jeremy.
(This used to be commit ed653cd468)
2004-04-02 18:46:19 +00:00
Gerald Carter
cc98a35689 fixes for prnadmin.dll API
* force the PRINTER_ATTRIBUTE_LOCAL (nor PRINTER_ATTRIBUTE_NETWORK)
  * ensure that we return the sec_desc in smb_io_printer_info_2
    (allows prnui.dll to restore security descriptors from a data file).
(This used to be commit c335cb80d2)
2004-03-24 19:15:17 +00:00
Gerald Carter
dbb38cc6b5 merging print change notify fix from HP appliance. Also might address some one the issues in BUG 1007
(This used to be commit 17ecea4152)
2004-03-16 17:06:11 +00:00
Gerald Carter
dbe9e8a4cb fix byte ordering problem when storing the updating pid for the lpq cache; was causing an abort in process_exists() on solaris
(This used to be commit 26681cd2a1)
2004-03-15 15:06:33 +00:00
Jeremy Allison
c9b7cbbfa5 Added strstr_m() function. Use in all places where we might run into mb
(should fix the mb service name problem, can't remember the bugid).
Jeremy.
(This used to be commit 94a272b9a8)
2004-03-09 00:17:14 +00:00
Gerald Carter
cb49c07c98 fix compiler warning
(This used to be commit df19b6066e)
2004-03-05 17:39:38 +00:00
Jeremy Allison
fba5a72249 Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
(This used to be commit c9f31fafed)
2004-03-03 20:55:59 +00:00
Gerald Carter
ef36785beb allow the 'printing' parameter to be set on a per share basis.
The problem was that the current_printif struct was set during
print_backend_init() based on the 'printcap name'.  So you could
not use cups and then override the setting for a specific printer
by setting 'printing = bsd' (a common setup for pdf generation
print services.

There is a subtle change in behavior in that the print
interface functions are selecting on the basis of lp_printing()
and not lp_printcap_name(), but the new behavior seems more
intuitive IMHO.
(This used to be commit 14de9c0657)
2004-03-02 14:26:45 +00:00
Gerald Carter
1fe6e29637 BUG 1147; bad pointer case in get_stored_queue_info() causing seg fault
(This used to be commit 91af1fb73a)
2004-03-01 17:03:05 +00:00
Gerald Carter
df6d2db4ce merge from old APP_HEAD
* remove corrupt tdb and shutdown (only for printing tdbs, connections,
  sessionid & locking)
* decrement smbd counter in connections.tdb in smb_panic()
* various Makefile hack to get things to link

'max smbd processes' looks like it might be broken.  The counter KEY is not
being set.  Will look into that tomorrow.
(This used to be commit 6e22c5da92)
2004-02-12 05:24:02 +00:00
Jeremy Allison
2f2e5b0191 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
(This used to be commit 3a3e336030)
2004-01-30 18:38:48 +00:00
Gerald Carter
bb104f31d5 bug 770; correct fix this time; Make sure that we send the SMBjobid for unix jobs back to the client. Allows windows client to remove print jobs submitted from lpr
(This used to be commit 5145611188)
2004-01-14 20:56:26 +00:00
Gerald Carter
e7615b5776 bug 660; using byte order safe macros (or tdb_unpack) when reading 2 or 4 byte values from a tdb buffer
(This used to be commit be9f25bea9)
2004-01-14 19:12:06 +00:00
Andrew Bartlett
5eee23cc64 auth/auth_util.c:
- Fill in the 'backup' idea of a domain, if the DC didn't supply one.  This
   doesn't seem to occour in reality, hence why we missed the typo.

lib/charcnv.c:
lib/smbldap.c:
libads/ldap.c:
libsmb/libsmbclient.c:
printing/nt_printing.c:
 - all the callers to pull_utf8_allocate() pass a char ** as the first
   parammeter, so don't make them all cast it to a void **

nsswitch/winbind_util.c:
 - Allow for a more 'correct' view of when usernames should be qualified
   in winbindd.  If we are a PDC, or have 'winbind trusted domains only',
   then for the authentication returns stip the domain portion.
 - Fix valgrind warning about use of free()ed name when looking up our
   local domain.  lp_workgroup() is maniplated inside a procedure that
   uses it's former value.  Instead, use the fact that our local domain is
   always the first in the list.

Andrew Bartlett
(This used to be commit 494781f628)
2003-12-31 00:31:43 +00:00
Gerald Carter
318190580d Move to short lived TALLOC_CTX* for allocating printer
objects from the print handle cache.   Fixes bug that
caused smbd to consume large amounts of RAM when

(a) a printer handle was kept open over an extended
    period of time, and
(b) the client issued frequent requests that resulted
    in a call to get_a_printer()
(This used to be commit 10b9976e0a)
2003-12-30 22:17:14 +00:00
Gerald Carter
038784aa80 don't mistake pre-existing UNIX jobs for smb jobs; patch from SATOH Fumiyasu bug 770
(This used to be commit 3a55788dca)
2003-12-01 18:02:05 +00:00
Gerald Carter
055750f090 allow users to delete jobs with cups printing backend
The changes the name of the job passed off to cups
from "Test Page" to "smbprn.00000033 Test Page" so that
we can get the smb jobid back from lpq.  Working on bug
770.
(This used to be commit 5979f4d645)
2003-11-25 19:16:35 +00:00
Gerald Carter
c26aa9fd2d patch from Matthias Hilbig for bug 467; use the dns name (or IP) as the originating client name when using CUPS
(This used to be commit 71333299a6)
2003-11-24 18:37:19 +00:00
Gerald Carter
281e293331 * Fix from SATOH Fumiyasu for bug 660 (failing to view print
jobs) by only enforce the 'max reported print jobs' parameter
  when it is non-zero.

* Fixed bug 338 by making sure that data values are written
  out when we are marshalling an EnumPrinterDataEx() reply.
  This probably fixes other bugs reported against point-n-print
  feature in 3.0.0
(This used to be commit fd98af75d6)
2003-11-13 20:15:17 +00:00
Andrew Tridgell
e1c468477c a small include file rearrangement that doesn't affect normal
compilation, but that allows Samba3 to take advantage of pre-compiled
headers in gcc if available.
(This used to be commit b3e024ce1d)
2003-11-12 01:51:10 +00:00
Tim Potter
fbb8f131c2 Fix more 64-bit printf warnings.
(This used to be commit 23443e3aa0)
2003-11-03 14:34:25 +00:00
Jeremy Allison
231124ced9 Fixes to check for wraps which could cause coredumps.
Jeremy.
(This used to be commit ad06edd1bb)
2003-10-29 21:28:00 +00:00
Gerald Carter
611b198743 make sure we have a devmode before copying a string to the devicename; patch from metze
(This used to be commit 1700e83ac8)
2003-10-20 14:02:02 +00:00
Gerald Carter
64e21a4eb1 updating version in copyright
(This used to be commit 947425e795)
2003-10-14 22:32:27 +00:00
Jeremy Allison
0551426657 Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying
the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on
auto inherited checks.
Jeremy.
(This used to be commit 28b315a750)
2003-09-19 21:57:43 +00:00
Gerald Carter
8ce241cb80 fix unitiailized timestamp where merging print_jobs and lpq listing
(This used to be commit 8382cd6796)
2003-09-11 17:01:26 +00:00
Jeremy Allison
ca1c6ebb11 Fix a nasty mess, and also bug #296. passdb/pdb_ldap.c was not converting
to/from utf8 for some calls. The libads code gets this right. Wonder why
the passdb code doesn't use it ?
Jeremy.
(This used to be commit 910d21d316)
2003-09-10 22:33:06 +00:00
Jeremy Allison
94f59f5492 More tuning from cachegrind. Change most trim_string() calls to trim_char(0,
as that's what they do. Fix string_replace() to fast-path ascii.
Jeremy.
(This used to be commit f35e9a8b90)
2003-09-05 19:59:55 +00:00
Gerald Carter
14eb5f108e make sure the printer data value exists before saying you deleted it
(This used to be commit 017133ea0c)
2003-08-25 13:05:48 +00:00
Gerald Carter
983b4e7011 it never amazes me when some new things crawls out of the windows
spooler. :-(

When installing the Adobe PS driver onto a Samba printer via cupsaddsmb,
I noticed a WIN2k client sending DeletePrinterData("DependentFiles")
pver and over.  I also noticed that we never checked to see if the
value was valid.  No now we do and return WERR_BADFILE which I think
is correct.

Next, I noticed that we never wrote the updated printer out to disk
after a succesfully DeletePrinterData[Ex]().

Finally, I found a driver (Canon BJC 1000 using the Adobe PS drivers
and foomatic PPD file) that was destroying the device name string
in the devmode.  So now get_a_printer_2() always writes out the
device name in \\server\share form.

I think these changes might fix bug 294.
(This used to be commit deb2578087)
2003-08-23 03:34:24 +00:00
Gerald Carter
bd886acab8 stupid...stupid...stupid....fix bug 294 by looking at the right arch string
(This used to be commit 584df6b8d6)
2003-08-16 01:40:38 +00:00
Herb Lewis
aa39cc37da get rid of more compiler warnings
(This used to be commit 398bd14fc6)
2003-08-15 04:42:05 +00:00
Gerald Carter
9b80349a2f fix bug 294; win9x driver lookups should always use version 0
(This used to be commit 8cc1a49c13)
2003-08-14 20:51:41 +00:00
Tim Potter
7d833de662 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
(This used to be commit 59dae1da66)
2003-07-25 04:24:40 +00:00
Tim Potter
77373f1f8e More printf fixes - size_t is long on some architectures.
(This used to be commit ba4d334b82)
2003-07-24 23:46:27 +00:00
Jeremy Allison
a9c0fcfa37 Some fclose -> x_fclose found by Tony Jago.
Jeremy.
(This used to be commit 919078cf39)
2003-07-24 07:02:55 +00:00
Gerald Carter
eb2b683022 fix cache coherency bug in print handle print_info_2 cache.
Needs to be rewritten to use a reference counter, but this
will work for now.

also the memory allocation in the printing code needs to be cleaned
up to use talloc exclusively.
(This used to be commit 3d29302756)
2003-07-14 19:51:34 +00:00
Gerald Carter
c674e411c7 i guess i'm the only one this ever annyoed...
fix the confusion when we tdb_lock_bystring() but
we retrieve an entry using tdb_fetch_by_string.
It's now always tdb.*bystring()
(This used to be commit 66359531b8)
2003-07-10 20:37:01 +00:00
Jeremy Allison
ce72beb2b5 Removed strupper/strlower macros that automatically map to strupper_m/strlower_m.
I really want people to think about when they're using multibyte strings.
Jeremy.
(This used to be commit ff222716a0)
2003-07-03 19:11:31 +00:00
Gerald Carter
fb5a006c09 fix typos in log messages and comments.
(This used to be commit fd24183ec3)
2003-07-01 05:45:16 +00:00
Jeremy Allison
0e983b32fd Some const correctness. Stop tdb being used as a remote backend. If an
idmap backend is specified cause smbd to ask winbindd (use winbindd if
you want a consistant remote backend solution).
Should work well enough for next beta now...
Jeremy.
(This used to be commit 8f830c509a)
2003-06-27 20:55:48 +00:00
Gerald Carter
f414539d86 ifdef out some functions that are not used when HAVE_ADS is not defined
(This used to be commit 2d192e0431)
2003-06-25 19:49:27 +00:00
Gerald Carter
f51d769dd3 large change:
*)  consolidates the dc location routines again (dns
    and netbios)  get_dc_list() or get_sorted_dc_list()
    is the authoritative means of locating DC's again.

    (also inludes a flag to get_dc_list() to define
     if this should be a DNS only lookup or not)

    (however, if you set "name resolve order = hosts wins"
     you could still get DNS queries for domain name IFF
     ldap_domain2hostlist() fails.  The answer?  Fix your DNS
     setup)

*)  enabled DOMAIN<0x1c> lookups to be funneled through
    resolve_hosts resulting in a call to ldap_domain2hostlist()
    if lp_security() == SEC_ADS

*)  enables name cache for winbind ADS backend

*)  enable the negative connection cache for winbind
    ADS backend

*)  removes some old dead code

*)  consolidates some duplicate code

*)  moves the internal_name_resolve() to use an IP/port pair
    to deal with SRV RR dns replies.  The namecache code
    also supports the IP:port syntax now as well.

*)  removes 'ads server' and moves the functionality back
    into 'password server' (which can support "hostname:port"
    syntax now but works fine with defaults depending on
    the value of lp_security())
(This used to be commit d7f7fcda42)
2003-06-25 17:41:05 +00:00
Tim Potter
add20d8f8f Squash another compiler warning.
(This used to be commit 8b20883435)
2003-05-27 07:29:13 +00:00
Alexander Bokovoy
bc2a3748e9 Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
(This used to be commit c2689ed118)
2003-05-14 10:59:01 +00:00
Alexander Bokovoy
e7c8c15888 Fix VFS layer:
1. Finally work with cascaded modules with private data storage per module
2. Convert VFS API to macro calls to simplify cascading
3. Add quota support to VFS layer (prepare to NT quota support)

Patch by Stefan (metze) Metzemacher, with review of Jelmer and me
Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
(This used to be commit 91984ef5ca)
2003-05-11 23:34:18 +00:00
Andrew Bartlett
376b8d57ee Elsewhere, we use a #define for this environment variable name, so do the
same here.

Andrew Bartlett
(This used to be commit a4556786d2)
2003-05-09 09:37:12 +00:00
Gerald Carter
6760896739 removing printing = SOFTQ since no one knows what it is
(This used to be commit 2839534722)
2003-04-29 05:06:18 +00:00
Jim McDonough
fda7b4b226 Get credentials before publishing printers.
(This used to be commit 674174fcca)
2003-04-25 21:51:26 +00:00
Andrew Bartlett
2a3a9f0bf4 Merge the 'safe' parts of my StrnCpy patch - many of the users really wanted
a pstrcpy/fstrcpy or at most a safe_strcpy().

These have the advantage of being compiler-verifiable.

Get these out of the way, along with a rewrite of 'get_short_archi' in the
spoolss client and server.  (This pushes around const string pointers, rather
than copied strings).

Andrew Bartlett
(This used to be commit 32fb801ddc)
2003-04-23 13:27:35 +00:00
Jeremy Allison
30418a47c6 Limit the number of outstanding print notify messages for a process to
1000.
Jeremy.
(This used to be commit 2e5e4c10d2)
2003-04-23 00:19:30 +00:00
Jeremy Allison
cf00ce3e87 Fix mem leak. Spotted by tpot (thanks Tim).
Jeremy.
(This used to be commit 03a1f46e34)
2003-04-16 08:46:03 +00:00
Tim Potter
862c88d810 Array size fixup for construct_nt_devicemode() from HEAD.
(This used to be commit 5d1e8cca03)
2003-04-14 03:50:38 +00:00
Jeremy Allison
6e0bd81f44 Grr. Get rid of one of the extra NULL's that crept in from app-head.
Spotted by Andrew Esh.
Jeremy.
(This used to be commit 9e6e6c3f50)
2003-04-10 19:34:52 +00:00
Jeremy Allison
7c735eabc9 Ensure we're not filtering our essential delete messages.
Added jobid debug when unpacking message.
Jeremy.
(This used to be commit 8a6f3313e6)
2003-04-10 18:43:13 +00:00
Jeremy Allison
4b5548d8dc Ensure print queue array is zeroed out before returning.
Jeremy.
(This used to be commit f0fac6a1e3)
2003-04-09 00:00:08 +00:00
Jeremy Allison
7991cf1e52 Fix the new storage code to correctly convert from system queue info to
pjob info. Ensure we retrieve more than one job from the storage code.
Jeremy.
(This used to be commit 59be98401c)
2003-04-04 01:02:20 +00:00
Jeremy Allison
a9b39993fa Subtle changes to message handling after ENUMJOBS.
Jeremy.
(This used to be commit e5e83544dc)
2003-04-02 02:31:51 +00:00
Jeremy Allison
5ab2abd707 Fix extra NULL arg added during app-head merge.
Jeremy.
(This used to be commit b2ef052ada)
2003-03-26 19:35:37 +00:00
Jeremy Allison
67df8fb300 Merge of new appliance-head scalable printing fixes.
Jeremy.
(This used to be commit 331e621b58)
2003-03-21 22:00:21 +00:00
Jeremy Allison
3be18a1fba lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues.
Jeremy.
(This used to be commit bf795b684e)
2003-03-20 00:52:37 +00:00
Jeremy Allison
a3d7a1ea20 Fix off by one bug noticed by Andrew Bartlett.
Jeremy.
(This used to be commit 759aab9944)
2003-03-14 02:10:26 +00:00
Gerald Carter
ccb58b303a add #define for the max device name length in a DEVICEMODE
(This used to be commit 52ef84b534)
2003-03-06 16:09:11 +00:00
Jeremy Allison
d45fe965ef Writable string const fixes.
Jeremy.
(This used to be commit c832e95c2f)
2003-03-05 01:30:15 +00:00
Jeremy Allison
6626fef5d4 Fix for little-used lpq parser.
Jeremy.
(This used to be commit 75b36459ab)
2003-03-05 00:54:47 +00:00
Jeremy Allison
0bf15545dd Ensure added jobs increment total_jobs.
Jeremy.
(This used to be commit a75d9fc4e1)
2003-03-01 00:49:00 +00:00
Gerald Carter
23b3b29eec Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
(This used to be commit 31272d3b6b)
2003-02-25 20:53:53 +00:00
Andrew Bartlett
e075e1dfa9 Missed one in the previous merge - user_ok() and user_in_group() now take
an optional list of groups the user is in.
(This used to be commit 39f3bec0f6)
2003-02-24 02:47:14 +00:00
Jeremy Allison
647d65e08b Bit of a hack job to prevent smbprn.XXX jobs appearing in the queue if the
jobid is below the UNIX_JOB_START number.
Jeremy.
(This used to be commit 7ec1c8869d)
2003-02-19 01:43:33 +00:00
Gerald Carter
940fcdf095 * set PRINTER_ATTRIBUTE_RAW_ONLY; CR 1736
* never save a pointer to an automatic variable (they go away)
  implement a deep copy for SPOOLSS_NOTIFY_MSG to correct
  messages being sent that have junk for strings;
  fix in response to changes for CR 1504
(This used to be commit ffda9e2480)
2003-02-15 23:33:30 +00:00
Gerald Carter
89d480a933 off by one bug in string length; CR 1159
(This used to be commit aaefa889ad)
2003-02-14 22:25:12 +00:00
Andrew Bartlett
7ceed4213a Merge from HEAD: Fix NULL pointer de-reference in arguments to tdb_pack.
Andrew Bartlet
(This used to be commit 0809670d0f)
2003-02-12 10:57:39 +00:00
Andrew Bartlett
8a20407442 Cleanups: (merge from HEAD)
- use safe_strcpy() instead of pstrcpy() for malloc()ed strings

 - CUPS: a failure in an attempt to automaticly add a printer is not level 0 stuff.

 - Fix up a possible Realloc() failure segfault

Andrew Bartlett
(This used to be commit c1cfc296c2)
2003-02-10 11:47:21 +00:00
Jeremy Allison
4703248a8e Ensure we return NOSPACE if we can't fast allocate a print job.
Jeremy.
(This used to be commit 82cf8aa747)
2003-02-08 01:04:43 +00:00
Jeremy Allison
0edff28a63 Collapse duplicate messages before sending.
Jeremy.
(This used to be commit 105d37474d)
2003-02-05 23:03:58 +00:00
Gerald Carter
0adfd3d418 CUPS patch to log client name
(This used to be commit d4168c327b)
2003-02-05 06:37:27 +00:00
Jeremy Allison
42edbfe918 Hold the lock for a much shorter time when allocating a new jobid.
Jeremy.
(This used to be commit 62e274abbb)
2003-02-04 23:52:49 +00:00
Jeremy Allison
41b680fce5 Up the hash table size for printing tdb.c
Jeremy.
(This used to be commit 97848f40ee)
2003-02-04 23:43:03 +00:00
Jeremy Allison
ce85e52eff Ensure we only ever set fsp->conn in one place.
Jeremy.
(This used to be commit d8a42753cc)
2003-02-04 01:43:10 +00:00
Jeremy Allison
bbf9f09ee5 Add 3 second timeout when terminating server and sending print notify
messages. Stops build-up of large numbers of smbd's waiting to terminate
on large print throughput.
Jeremy.
(This used to be commit 07efebb984)
2003-01-30 23:55:58 +00:00
Jeremy Allison
920287bf6b More scalable print tdb fixes.
Jeremy.
(This used to be commit 7ace900b33)
2003-01-30 23:26:49 +00:00
Gerald Carter
f473388887 CUPS-PRINTER_CLASS patch from Michael Sweet
(This used to be commit 8d0bde4315)
2003-01-28 01:58:38 +00:00
Gerald Carter
99cdb46208 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
(This used to be commit 0fb724b321)
2003-01-15 18:57:41 +00:00
Andrew Bartlett
27b7e51a3c Merge from HEAD:
- fstring/pstring mixups
 - the detection code that found them (disabled)
 - a bit of whitespace
 - a static

Andrew Bartlett
(This used to be commit 9b70fa868e)
2003-01-14 08:53:59 +00:00
Gerald Carter
071af8f007 [merge] make sure to update print queue cache during timeout_processing() to send notify events; CR 1491
(This used to be commit f8a915b14d)
2003-01-11 02:38:36 +00:00
Jeremy Allison
545087c060 Don't delete jobs subitted after the lpq time.
Jeremy.
(This used to be commit 6cb9f6ccb1)
2003-01-10 01:21:59 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Jeremy Allison
ef8bd7c4f7 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 09a218a9f6)
2002-12-20 20:21:31 +00:00
Jim McDonough
f201af1925 Store printer guid in the dsspooler registry key so we don't have to
query the directory server every time someone asks
(This used to be commit dd81003bdd)
2002-12-13 21:56:34 +00:00
Jim McDonough
81a2a30739 More printer publishing code.
- Add published attribute to info2, needed for win clients to work properly
- Return proper info on getprinter 7

This means you can now look at the sharing tab of a printer and get correct
info about whether it is published or not, and change it.
(This used to be commit d57bddc9b2)
2002-12-13 19:01:27 +00:00
Jeremy Allison
3999a905e9 Fix debugs for rap mapping. Delete job on map fail.
Jeremy.
(This used to be commit 6eb27e4f0d)
2002-12-05 22:32:15 +00:00
Jim McDonough
26236b30d0 More printer data to publish
(This used to be commit 6e2f0c4e30)
2002-12-05 19:13:40 +00:00
Jeremy Allison
00a20ce45f The element in fsp->print_job should be a RAP jobid, not a uint32 RPC
jobid. This was causing Win9x client "set name" calls to fail.
Still need one cleanup fix to finish.
Jeremy.
(This used to be commit 6c23d2030a)
2002-12-05 04:00:16 +00:00
Jeremy Allison
14662de563 Janitor for tpot yet again... Merging in memory leak fix.
Jeremy.
(This used to be commit 6ce50ffcda)
2002-12-04 21:28:11 +00:00
Jim McDonough
dae62a3d2e Automatic printer publishing when using APW or choosing 'list in the directory' in printer settings. Currently very little is published, and you cannot unpublish because of a bug in win2k clients.
(This used to be commit ca6360e8db)
2002-12-04 17:40:50 +00:00
Tim Potter
f3e3a56ea9 Merge a bunch of trivial changes from HEAD. The difference remaining
should actual functional differences between HEAD and 3.0.

 - Mostly reformatting
 - Removal of unecessary #include "smb.h"
 - Merge of dyn_DRIVERFILE removal
 - Silly bug fix for python code
(This used to be commit d3998307ad)
2002-11-29 02:58:59 +00:00
cvs2svn Import User
0d26e0ee42 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 9653595609) 2002-11-26 11:57:31 +00:00
Gerald Carter
afc5f1aefb [print notify fixes from APP_HEAD]
* fixing change notify on print server handle
 * adding change notify support into smbcontrol for sending comment
   changes, etc...

All part of CR 1159/1160
(This used to be commit f1062e79de)
2002-11-26 00:46:31 +00:00
Gerald Carter
585e8a8c02 [print notify fixes from APP_HEAD]
* fixing change notify on print server handle
 * adding change notify support into smbcontrol for sending comment
   changes, etc...

All part of CR 1159/1160
(This used to be commit 256d8c27cd)
2002-11-26 00:01:56 +00:00
Andrew Bartlett
94596400e3 No need to #include smb.h, when we already #include include.h
(This used to be commit b3049bb0d0)
2002-11-24 08:37:02 +00:00
Jeremy Allison
f023d6129b Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 19f86f1f72)
2002-11-23 02:52:38 +00:00
Jeremy Allison
de474974ea Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 5d5762d178)
2002-11-23 02:52:36 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Jeremy Allison
250c980119 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit 82b8f749a3)
2002-11-12 23:15:52 +00:00
Jeremy Allison
7f94064e4a First cut of fix for changenotify on a print server handle. Use the connections tdb
with an snum of -1 and a special printername.
Jeremy.
(This used to be commit 940b04ddfa)
2002-11-10 22:24:10 +00:00
Jeremy Allison
fc2dc328e1 First cut of fix for changenotify on a print server handle. Use the connections tdb
with an snum of -1 and a special printername.
Jeremy.
(This used to be commit 06b0438007)
2002-11-10 22:24:00 +00:00
Jeremy Allison
978214b18e Fix for scalable printing noticed by tpot. Don't loop infinately
when holding a mutex.... :-).
Jeremy.
(This used to be commit 7e7b40e0fe)
2002-11-10 03:00:43 +00:00
Jeremy Allison
f4fb10c622 Fix for scalable printing noticed by tpot. Don't loop infinately
when holding a mutex.... :-).
Jeremy.
(This used to be commit c206643baa)
2002-11-10 03:00:28 +00:00
Jeremy Allison
e1adcd154a Fix crash bug with overwriting memory.
Jeremy.
(This used to be commit 9b08b4e4c2)
2002-11-07 22:45:11 +00:00
Jeremy Allison
72b7cfe4f1 Fix crash bug with overwriting malloced memory.
Jeremy.
(This used to be commit 3228730c83)
2002-11-07 22:43:54 +00:00
Jeremy Allison
d1e10b7971 Keeping branches in sync....
Jeremy.
(This used to be commit ceb01b5ab1)
2002-11-07 07:14:14 +00:00
Jeremy Allison
8980fcf1ea Keeping branches in sync....
Jeremy.
(This used to be commit eb937761c4)
2002-11-07 07:13:29 +00:00