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

379 Commits

Author SHA1 Message Date
Jeremy Allison
72e39041e9 r4184: Removed unused extern.
Jeremy.
2007-10-10 10:53:36 -05:00
Gerald Carter
426634df9c r4134: check the setprinter(3) based on the access permissions on the handle and avoid the call to print_access_chaeck() 2007-10-10 10:53:35 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Gerald Carter
12440744ba r4083: consolidate printer searches to use find_service rather than for loops 2007-10-10 10:53:31 -05:00
Gerald Carter
d47b8a0b4f r3069: add 'force printername' service parameter for people that want to enforce printername == sharename for spoolss printing 2007-10-10 10:53:00 -05:00
Gerald Carter
3760464193 r3066: BUG 1519: fix segfault caused by double free of a printer 2007-10-10 10:53:00 -05:00
Gerald Carter
fc691572c9 r3065: BUG 1519 (more): apparently the server_name notify request is used to fill in the title bar of the port monitor window and unless we get it right, you cannot open the printer properties from the port monitor window 2007-10-10 10:53:00 -05:00
Gerald Carter
8c3fd1908d 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() 2007-10-10 10:52:59 -05:00
Gerald Carter
1664395257 r2955: fixing a segfault uncovered by the changes for BUG 1519 2007-10-10 10:52:57 -05:00
Gerald Carter
859599dbca r2918: BUG 1907: fix getprinterdriverdir_1(). have to make sure we don't add unnecessary double slashes to the servername 2007-10-10 10:52:56 -05:00
Günther Deschner
cc5892f041 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
2007-10-10 10:52:53 -05:00
Gerald Carter
57db8ca91f 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() 2007-10-10 10:52:52 -05:00
Gerald Carter
50a5a3dbd0 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
2007-10-10 10:52:46 -05:00
Gerald Carter
7474c6a446 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.
2007-10-10 10:52:32 -05:00
Jeremy Allison
77bddd40b0 r1974: Just use a simple linked list for this.
Jeremy.
2007-10-10 10:52:26 -05:00
Gerald Carter
540daf71d8 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 2007-10-10 10:52:23 -05:00
Günther Deschner
8f1716a29b 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
2007-10-10 10:52:19 -05:00
Jeremy Allison
a6d0452a2d r1501: One more check for option != 0.
Jeremy.
2007-10-10 10:52:13 -05:00
Gerald Carter
3f73d19807 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 2007-10-10 10:52:12 -05:00
Jeremy Allison
a535a05975 r1241: Fix incorrect type in printer publishing (struct uuid, not UUID_FLAT).
Jeremy.
2007-10-10 10:52:02 -05:00
Gerald Carter
e3d4fea780 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 2007-10-10 10:52:01 -05:00
Gerald Carter
066b9c4276 r925: add changes frpm trunk (r841 and r842) -- enable background queue update process and allow printers to have different sharenames from printernames 2007-10-10 10:51:49 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Gerald Carter
17ecea4152 merging print change notify fix from HP appliance. Also might address some one the issues in BUG 1007 -
Jeremy Allison
3a3e336030 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
-
Jeremy Allison
06aa434c3f Patch from Stefan Metzmacher <metze@metzemix.de> to fix signing problems
when reverse connecting back to a client for printer notify.
Jeremy.
-
Jeremy Allison
6677eba28a Portability fix from schmitz@hp.com (Joachim Schmitz) for bug #548.
Jeremy.
-
Jeremy Allison
f82c273a42 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.
-
Gerald Carter
deb2578087 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.
-
Gerald Carter
d09dc91c02 possible fix for bug 288 to repcent using an uninitialized cli_state struct -
Herb Lewis
a6a39c61e8 get rid of some sompiler warnings on IRIX -
Jeremy Allison
68590b9e22 RPC fix from Ronan Waide <waider@waider.ie>. Tested with rpcecho.
Jeremy.
-
Gerald Carter
948b1b138c fix some error returns and strings; patch from metze -
Tim Potter
59dae1da66 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
-
Tim Potter
ba4d334b82 More printf fixes - size_t is long on some architectures. -
Tim Potter
afed2cbbcc 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.
-
Gerald Carter
3d29302756 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.
-
Jeremy Allison
ff222716a0 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.
-
Gerald Carter
02bc7be1ac Fix for bug #199 (xp driver uploads). Needed to support
the "OSVersion" print server data value.
-
Tim Potter
986eae40f7 Rename some uuid functions so as not to conflict with system
versions.  Fixes bug #154.
-
Jeremy Allison
063a210448 Merge DEBUG message on usleep on open.
Jeremy.
-
Jeremy Allison
b754089a26 Ensure sys_adminlog code won't coredump with incorrect client params.
Jeremy.
-
Andrew Bartlett
32fb801ddc 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
-
Tim Potter
c69237edf2 Merge of comment typo.
Whitespace syncup.
-
Jelmer Vernooij
21166e87bf Fix typos -
Gerald Carter
b2e29c7bd4 * We must return 0x2 as the majorversion for nt4 to upload drivers
* fix bug found by clobber_region()
-
Gerald Carter
23f0fcf642 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.
-
Jeremy Allison
8a6f3313e6 Ensure we're not filtering our essential delete messages.
Added jobid debug when unpacking message.
Jeremy.
-
Gerald Carter
12eb3e9937 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 -
Gerald Carter
51d330dcf3 fixup extra SAFE_FREE()'s noticed by abartlet -