1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

470 Commits

Author SHA1 Message Date
Gerald Carter
a169b950c7 r2918: BUG 1907: fix getprinterdriverdir_1(). have to make sure we don't add unnecessary double slashes to the servername
(This used to be commit 859599dbcaa9e39a7902cc959955fcea2dad334b)
2007-10-10 10:52:56 -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 cc5892f0411b8eb5daebe746164a2cf21d3d4c68)
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 57db8ca91f52329c7f8985c04463b6b69015b0c4)
2007-10-10 10:52:52 -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 50a5a3dbd02acb0d09133b6e42cc37d091ea901d)
2007-10-10 10:52:46 -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 7474c6a446037f3ca2546cb6984d800bfc524029)
2007-10-10 10:52:32 -05:00
Jeremy Allison
b894c95f8d r1974: Just use a simple linked list for this.
Jeremy.
(This used to be commit 77bddd40b0a3cb9d2a95b61c098468d3d98e41b0)
2007-10-10 10:52:26 -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 540daf71d8ad189af5dd6d45aa1ce2b3d67da752)
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 8f1716a29b7e85baf738bc14df7dabf03762f723)
2007-10-10 10:52:19 -05:00
Jeremy Allison
de22eab16d r1501: One more check for option != 0.
Jeremy.
(This used to be commit a6d0452a2d71201309a5abbe3ebc161ae75b17b8)
2007-10-10 10:52:13 -05:00
Gerald Carter
aca7386989 r1484: BUG 1520: work around bug in xp sp2 rc2 where the client sends a fnpcn() request without previously sending a ffpcn(). Return what win2k sp4 does
(This used to be commit 3f73d19807cbcbae8e5cfd96fd5c9b4de8c388a3)
2007-10-10 10:52:12 -05:00
Jeremy Allison
cf1c4ae9a6 r1241: Fix incorrect type in printer publishing (struct uuid, not UUID_FLAT).
Jeremy.
(This used to be commit a535a059754730d0a5c2fe64ef14708da2ca6b5c)
2007-10-10 10:52:02 -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 e3d4fea7808abc77bfdb1a540ab18afe04af5030)
2007-10-10 10:52:01 -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 066b9c4276a968788a03709a00d4f672ac032df7)
2007-10-10 10:51:49 -05:00
Gerald Carter
8ad3d8c9b0 r196: merging struct uuid from trunk
(This used to be commit 911a28361b9d8dd50597627f245ebfb57c6294fb)
2007-10-10 10:51:13 -05: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 17ecea4152fb0883acde675b01f19d3e19ff1d64)
2004-03-16 17:06:11 +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 3a3e33603084048e647af86a9badaaf49433c789)
2004-01-30 18:38:48 +00:00
Jeremy Allison
f589164ed9 Patch from Stefan Metzmacher <metze@metzemix.de> to fix signing problems
when reverse connecting back to a client for printer notify.
Jeremy.
(This used to be commit 06aa434c3fdb139e3f3143d19413556945cbcd4f)
2003-10-21 21:19:00 +00:00
Jeremy Allison
3092718ab1 Portability fix from schmitz@hp.com (Joachim Schmitz) for bug #548.
Jeremy.
(This used to be commit 6677eba28a1f2de11c36e3edc5b7d2854452bd04)
2003-10-02 17:36:47 +00:00
Jeremy Allison
d3b9384308 Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
(This used to be commit f82c273a42f930c7152cfab84394781744815e0e)
2003-09-25 21:26:16 +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 deb25780874b66e68ac597db24fbc50e7f7458b5)
2003-08-23 03:34:24 +00:00
Gerald Carter
4e88fd330e possible fix for bug 288 to repcent using an uninitialized cli_state struct
(This used to be commit d09dc91c024d718a8ddb6b7f08c7fe84716beda4)
2003-08-15 20:12:40 +00:00
Herb Lewis
062f89bc28 get rid of some sompiler warnings on IRIX
(This used to be commit a6a39c61e8228c8b3b7552ab3c61ec3a6a639143)
2003-08-15 01:42:30 +00:00
Jeremy Allison
38b3ee6467 RPC fix from Ronan Waide <waider@waider.ie>. Tested with rpcecho.
Jeremy.
(This used to be commit 68590b9e2266cf76b46a68cca0acaa47733811fe)
2003-08-08 17:08:35 +00:00
Gerald Carter
6bf70229ae fix some error returns and strings; patch from metze
(This used to be commit 948b1b138cf1fce18c93645fbdf948e589b19dc5)
2003-07-25 14:35:17 +00:00
Tim Potter
7d833de662 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
(This used to be commit 59dae1da66a5eb7e128263bd578f167d8746e9f0)
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 ba4d334b822248d8ab929c9568533431603d967e)
2003-07-24 23:46:27 +00:00
Tim Potter
06345b8116 Use %p for a pointer type in a printf-style format string. Also casting
a pointer to a uint32 value is incorrect on a 64-bit architecture.
(This used to be commit afed2cbbcc07de9e453156972250f5f9d22e8e83)
2003-07-22 01:18:24 +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 3d293027563b36411b7f84ed9d8f47f926271c6f)
2003-07-14 19:51:34 +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 ff222716a08af65d26ad842ce4c2841cc6540959)
2003-07-03 19:11:31 +00:00
Gerald Carter
6b31240391 Fix for bug #199 (xp driver uploads). Needed to support
the "OSVersion" print server data value.
(This used to be commit 02bc7be1ac6b75bf6559ea684bbc89ab3e19402e)
2003-07-03 17:18:07 +00:00
Tim Potter
0a9396dcca Rename some uuid functions so as not to conflict with system
versions.  Fixes bug #154.
(This used to be commit 986eae40f7669d15dc75aed340e628aa7efafddc)
2003-06-13 04:35:53 +00:00
Jeremy Allison
cd22a6ac90 Merge DEBUG message on usleep on open.
Jeremy.
(This used to be commit 063a210448d57e08db6d47a584c591f20645c80a)
2003-06-03 07:18:18 +00:00
Jeremy Allison
a975bc2471 Ensure sys_adminlog code won't coredump with incorrect client params.
Jeremy.
(This used to be commit b754089a2660975c593a6651e5e72b7360a0aba1)
2003-05-15 17:21:32 +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 32fb801ddc035e8971e9911ed4b6e51892e9d1cc)
2003-04-23 13:27:35 +00:00
Tim Potter
dfe1dd1455 Merge of comment typo.
Whitespace syncup.
(This used to be commit c69237edf2bfdb426447d808fbd1dc6eb5cffabe)
2003-04-15 06:56:43 +00:00
Jelmer Vernooij
ce31379577 Fix typos
(This used to be commit 21166e87bfeeaa5079dfbcac3df9232d73986532)
2003-04-14 20:42:26 +00:00
Gerald Carter
e1ea87ff03 * We must return 0x2 as the majorversion for nt4 to upload drivers
* fix bug found by clobber_region()
(This used to be commit b2e29c7bd45f8f33d9ed58fe75bbf5ffc78350f5)
2003-04-11 23:48:24 +00:00
Gerald Carter
84b4b3caf1 simple fix to hopefully speed up srv_spoolss_replyopenprinter().
Use the client address from the pipe->conn->client_address
instead of trying to resolve the name in the _spoolss_rffpcn()
request.  Should make us more robust as well when the clients
are not registered in DNS or WINS.
(This used to be commit 23f0fcf6421b1e8dd6ed6ab14af14ea7eb380c1c)
2003-04-11 20:29:36 +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 8a6f3313e69c6d47e20838f42ebc9f8a2ce9ddc4)
2003-04-10 18:43:13 +00:00
Gerald Carter
c618a8dae4 another forgotten merge sitting on my laptop from app_head; only stall open_printer when 2k client opens with admin privs & fix reply for ChangeId printer data reply
(This used to be commit 12eb3e993788eb8bc0e9eb62e60a8b55079df5ad)
2003-04-09 05:30:48 +00:00
Gerald Carter
b4f1061cca fixup extra SAFE_FREE()'s noticed by abartlet
(This used to be commit 51d330dcf3bd74367fc18f4229a9cfa0392f0b36)
2003-04-08 14:06:27 +00:00
Jeremy Allison
a9b39993fa Subtle changes to message handling after ENUMJOBS.
Jeremy.
(This used to be commit e5e83544dc0acf812bfa5ea17960b5a6be954ca1)
2003-04-02 02:31:51 +00:00
Gerald Carter
45c7b76da3 fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra
(This used to be commit 50c25e54ff05bfb01a93e84afd2ad92e90d5a5c2)
2003-04-01 14:57:59 +00:00
Gerald Carter
4660928c61 fix potential smbd crash when we fail to alloacte a policy handle for a printer open; CR 2102 (reviewed by jreilly)
(This used to be commit 26478158bc03fdf019589ce68062100a39149b52)
2003-03-31 17:43:45 +00:00
Gerald Carter
a97a1d5fed add a few error checks in EnumPrinterData()
(This used to be commit 6cd74dea086aa6e0936719f6e2829494c4688ea6)
2003-03-31 00:59:58 +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 bf795b684e608f82db822e0759e7b69afd451b65)
2003-03-20 00:52:37 +00:00
Gerald Carter
cc7f40f4b7 * always report ourselves as a Windows 2000 print server (even
without ADS support)
* add "MinorVersion" print server data key and comment on "OSVersion"
(This used to be commit e1383368169faa50b9e612c9f71f92f790698b48)
2003-03-03 17:32:55 +00:00
Gerald Carter
d95f1e4260 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
(This used to be commit e8939165b77c9e2ea8b3cef2e85885b9812c7184)
2003-03-03 16:32:03 +00:00
Jeremy Allison
ba3ccc2928 Added limit to number of jobs enumerated. Set to 0 (means no limit).
Yes I will add the docs....
Jeremy.
(This used to be commit e1b0001c8df9e9823b42a372ca675188570b252a)
2003-03-01 02:39:12 +00:00
Gerald Carter
0d30cdf66c additional fix for CR 601
* distinguish WinXP from Win2k
  * add a 1/3 of a second delay in OpenPrinter
    in order to trigger a LAN/WAN optimization in
    2k clients.
(This used to be commit c7712fa054d21b4884a78b7ea6c0fb8b3d637c6b)
2003-02-27 21:22:36 +00:00