1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-28 00:49:42 +03:00

358 Commits

Author SHA1 Message Date
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 -
Jeremy Allison
e5e83544dc Subtle changes to message handling after ENUMJOBS.
Jeremy.
-
Gerald Carter
50c25e54ff fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra -
Gerald Carter
26478158bc fix potential smbd crash when we fail to alloacte a policy handle for a printer open; CR 2102 (reviewed by jreilly) -
Gerald Carter
6cd74dea08 add a few error checks in EnumPrinterData() -
Jeremy Allison
bf795b684e lib/messages.c: Check return from chainlock before modifying message queue.
Apply the job returned limit across all requests for job queues.
Jeremy.
-
Gerald Carter
e138336816 * always report ourselves as a Windows 2000 print server (even
without ADS support)
* add "MinorVersion" print server data key and comment on "OSVersion"
-
Gerald Carter
e8939165b7 * 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
-
Jeremy Allison
e1b0001c8d Added limit to number of jobs enumerated. Set to 0 (means no limit).
Yes I will add the docs....
Jeremy.
-
Gerald Carter
c7712fa054 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.
-
Gerald Carter
31272d3b6b 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.
-
Andrew Bartlett
74b5436c75 Merge of server-side authentication changes to 3.0:
- user_ok() and user_in_group() now take a list of groups, instead of
   looking for the user in the members of all groups.

 - The 'server_info' returned from the authentication is now kept around
  - in future we won't copy the sesion key, username etc, we will just
    referece them directly.

 - rhosts upgraded to use the SAM if possible, otherwise fake up based on
   getpwnam().

 - auth_util code to deal with groups upgraded to deal with non-winbind domain
   members again.

Andrew Bartlett
-
Gerald Carter
de6a2d154e s/unistr2_to_dos/unistr2_to_ascii/ to fix compile -
Gerald Carter
3fc90ea1d9 couple of merges from APP_HEAD
* performance optimization in enumprinterdataex() when keyname is empty
  * fix a few typos in comments
  * reload services after addprinter_command()

dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
-
Gerald Carter
9efaef4a96 set the various DsSpooler keys that are linked to PRINTER_INFO_2 fields; CR 985 -
Gerald Carter
ffda9e2480 * 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
-
Jeremy Allison
a823fee5b4 Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
-
Jeremy Allison
a29f1aa85f Removed unused variable.
Jeremy.
-
Jeremy Allison
2d63f3a13d Merge JohnR's patch.
Removed extra copy of server name in the printername field (it was
mangling the the name to be \\server\\\server\printer ... yes, there
were 3 backslashes) reported by get & enum jobs level 2.
Jeremy.
-
Jeremy Allison
76c3ccf6ed Fixed type.
Jeremy.
-
Andrew Bartlett
9b70fa868e Merge from HEAD:
- fstring/pstring mixups
 - the detection code that found them (disabled)
 - a bit of whitespace
 - a static

Andrew Bartlett
-
Gerald Carter
f8a915b14d [merge] make sure to update print queue cache during timeout_processing() to send notify events; CR 1491 -