1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-01 05:47:28 +03:00

243 Commits

Author SHA1 Message Date
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
584df6b8d6 stupid...stupid...stupid....fix bug 294 by looking at the right arch string -
Herb Lewis
398bd14fc6 get rid of more compiler warnings -
Gerald Carter
8cc1a49c13 fix bug 294; win9x driver lookups should always use version 0 -
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.
-
Gerald Carter
2d192e0431 ifdef out some functions that are not used when HAVE_ADS is not defined -
Gerald Carter
d7f7fcda42 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())
-
Tim Potter
8b20883435 Squash another compiler warning. -
Alexander Bokovoy
c2689ed118 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 -
Alexander Bokovoy
91984ef5ca 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
-
Andrew Bartlett
a4556786d2 Elsewhere, we use a #define for this environment variable name, so do the
same here.

Andrew Bartlett
-
Jim McDonough
674174fcca Get credentials before publishing printers. -
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
5d1e8cca03 Array size fixup for construct_nt_devicemode() from HEAD. -
Jeremy Allison
759aab9944 Fix off by one bug noticed by Andrew Bartlett.
Jeremy.
-
Gerald Carter
52ef84b534 add #define for the max device name length in a DEVICEMODE -
Jeremy Allison
c832e95c2f Writable string const fixes.
Jeremy.
-
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
39f3bec0f6 Missed one in the previous merge - user_ok() and user_in_group() now take
an optional list of groups the user is in.
-
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
-
Gerald Carter
0fb724b321 *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
-
Andrew Bartlett
9b70fa868e Merge from HEAD:
- fstring/pstring mixups
 - the detection code that found them (disabled)
 - a bit of whitespace
 - a static

Andrew Bartlett
-
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Jeremy Allison
09a218a9f6 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
-
Jim McDonough
dd81003bdd Store printer guid in the dsspooler registry key so we don't have to
query the directory server every time someone asks
-
Jim McDonough
d57bddc9b2 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.
-
Jim McDonough
6e2f0c4e30 More printer data to publish -
Jeremy Allison
6ce50ffcda Janitor for tpot yet again... Merging in memory leak fix.
Jeremy.
-
Jim McDonough
ca6360e8db 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. -
Jeremy Allison
5d5762d178 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
-
Jeremy Allison
eb937761c4 Keeping branches in sync....
Jeremy.
-
Jeremy Allison
6efd17ef78 Fix slowdown because of enumerating all print queues on every smbd startup.
Jeremy.
-
Jeremy Allison
e504d1170d Check the long_archi name for NULL.
Jeremy.
-
Gerald Carter
743f2b8025 removed the following parameters
* postscript
  * printer driver
  * printer driver location
  * printer driver file

also removed the get_a_printer_driver_9x_compatible() function
-
Jeremy Allison
9fe3c0b90d Add a timeout to tdb_lock_bystring(). Ensure we never have more than
MAX_PRINT_JOBS in a queue.
Jeremy.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Jelmer Vernooij
eac75549c3 Sync 3.0 branch with HEAD -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Tim Potter
62ee1f8c3f Merge of print server permission handling fixes from HEAD. -
Gerald Carter
233a24792e removed unnecessary memset -
Gerald Carter
d87aa35d48 specversion merge from SAMBA_2_2 -
Tim Potter
e66bdf1229 Stomped on some header file version numbers that have crept back in. -
Tim Potter
ddb5753e36 Added dos_errstr() function. Not all errors in list yet. -
Gerald Carter
5760315c1d syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
-
Tim Potter
d7efc5dd3d Backed out enumprinters stuff - leave it for another day. -
Tim Potter
dfd51bc8d0 Merge of enumprinters vs getprinter naming patch from 2.2 -
Jeremy Allison
51c3d35363 Fix from JohnR - Fixed SetPrinterData(magic key) to support zero length DEVMODE as is the case with the
Okidata Okipage 20 PCLXL Advanced printer driver.
-
Gerald Carter
9e96cbe241 merge from 2.2 -
Jeremy Allison
771ef92fc6 Bring printing in HEAD inline with 2.2.x and app-head.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-