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

553 Commits

Author SHA1 Message Date
Gerald Carter
df19b6066e fix compiler warning 0001-01-01 00:00:00 +00:00
Jeremy Allison
c9f31fafed Use a common function to parse all pathnames from the wire. This allows
much closer emulation of Win2k3 error return codes.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
14de9c0657 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
91af1fb73a BUG 1147; bad pointer case in get_stored_queue_info() causing seg fault 0001-01-01 00:00:00 +00:00
Gerald Carter
6e22c5da92 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
3a3e336030 Fix up name canonicalization (needed for krb5 keytab support later).
Remove source_env handler (no longer used in any codepath).
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
5145611188 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 0001-01-01 00:00:00 +00:00
Gerald Carter
be9f25bea9 bug 660; using byte order safe macros (or tdb_unpack) when reading 2 or 4 byte values from a tdb buffer 0001-01-01 00:00:00 +00:00
Andrew Bartlett
494781f628 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
0001-01-01 00:00:00 +00:00
Gerald Carter
10b9976e0a 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()
0001-01-01 00:00:00 +00:00
Gerald Carter
3a55788dca don't mistake pre-existing UNIX jobs for smb jobs; patch from SATOH Fumiyasu bug 770 0001-01-01 00:00:00 +00:00
Gerald Carter
5979f4d645 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
71333299a6 patch from Matthias Hilbig for bug 467; use the dns name (or IP) as the originating client name when using CUPS 0001-01-01 00:00:00 +00:00
Gerald Carter
fd98af75d6 * 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
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b3e024ce1d 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.
0001-01-01 00:00:00 +00:00
Tim Potter
23443e3aa0 Fix more 64-bit printf warnings. 0001-01-01 00:00:00 +00:00
Jeremy Allison
ad06edd1bb Fixes to check for wraps which could cause coredumps.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
1700e83ac8 make sure we have a devmode before copying a string to the devicename; patch from metze 0001-01-01 00:00:00 +00:00
Gerald Carter
947425e795 updating version in copyright 0001-01-01 00:00:00 +00:00
Jeremy Allison
28b315a750 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
8382cd6796 fix unitiailized timestamp where merging print_jobs and lpq listing 0001-01-01 00:00:00 +00:00
Jeremy Allison
910d21d316 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f35e9a8b90 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
017133ea0c make sure the printer data value exists before saying you deleted it 0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Gerald Carter
584df6b8d6 stupid...stupid...stupid....fix bug 294 by looking at the right arch string 0001-01-01 00:00:00 +00:00
Herb Lewis
398bd14fc6 get rid of more compiler warnings 0001-01-01 00:00:00 +00:00
Gerald Carter
8cc1a49c13 fix bug 294; win9x driver lookups should always use version 0 0001-01-01 00:00:00 +00:00
Tim Potter
59dae1da66 More printf portability fixes. Got caught out by some gcc'isms last
time.  )-:
0001-01-01 00:00:00 +00:00
Tim Potter
ba4d334b82 More printf fixes - size_t is long on some architectures. 0001-01-01 00:00:00 +00:00
Jeremy Allison
919078cf39 Some fclose -> x_fclose found by Tony Jago.
Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Gerald Carter
66359531b8 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()
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Gerald Carter
fd24183ec3 fix typos in log messages and comments. 0001-01-01 00:00:00 +00:00
Jeremy Allison
8f830c509a 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
2d192e0431 ifdef out some functions that are not used when HAVE_ADS is not defined 0001-01-01 00:00:00 +00:00
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())
0001-01-01 00:00:00 +00:00
Tim Potter
8b20883435 Squash another compiler warning. 0001-01-01 00:00:00 +00:00
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 0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
a4556786d2 Elsewhere, we use a #define for this environment variable name, so do the
same here.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
2839534722 removing printing = SOFTQ since no one knows what it is 0001-01-01 00:00:00 +00:00
Jim McDonough
674174fcca Get credentials before publishing printers. 0001-01-01 00:00:00 +00:00
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
0001-01-01 00:00:00 +00:00
Jeremy Allison
2e5e4c10d2 Limit the number of outstanding print notify messages for a process to
1000.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
03a1f46e34 Fix mem leak. Spotted by tpot (thanks Tim).
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
5d1e8cca03 Array size fixup for construct_nt_devicemode() from HEAD. 0001-01-01 00:00:00 +00:00
Jeremy Allison
9e6e6c3f50 Grr. Get rid of one of the extra NULL's that crept in from app-head.
Spotted by Andrew Esh.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
8a6f3313e6 Ensure we're not filtering our essential delete messages.
Added jobid debug when unpacking message.
Jeremy.
0001-01-01 00:00:00 +00:00