1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Jeremy Allison
c6c8f5a897 r24813: Reformat to 80 columns.
Jeremy.
2007-10-10 12:30:25 -05:00
Jeremy Allison
ea6ef36889 r23844: Add patch series from Volker (after review and consultation).
0001-Save-a-strdup-in-stat_cache_add.patch
0002-Use-ISDOT-and-ISDOTDOT.patch
0003-Move-fname_equal-around.patch
0004-unix_convert-pstring-dirpath-char.patch
0005-Ignore-.o-files.patch
0006-Get-rid-of-pstrings-inside-unix_convert.patch
0007-revert-pstring-unix_convert.patch
0008-Make-name-an-allocated-pstring-inside-unix_convert.patch
0009-Pass-explicit-pstring-to-mangle_check_cache.patch
0010-Don-t-overwrite-orig_path-unnecessarily.patch
0011-Defer-allocating-name.patch
0012-Make-sure-dirpath-is-always-correctly-allocated.patch
0013-Remove-one-pstring-dependency-in-unix_convert.patch
0014-Remove-more-name-pstring-dependencies.patch
0015-Hide-the-nasty-API-of-mangle_check_cache-in-mangle_c.patch
0016-name-does-not-need-to-be-pstring-size-anymore.patch
0017-Make-use-of-ISDOT-and-ISDOTDOT.patch
0018-Remove-pstring-from-stat_cache_lookup.patch
0019-Add-my-copyright.patch

To remove pstrings from statcache and unix_convert.

Jeremy.
2007-10-10 12:28:34 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
e5e42fe3d5 r23743: Simplify stat_cache_lookup() logic. For the history of this, see
http://article.gmane.org/gmane.network.samba.internals/32486.
2007-10-10 12:23:51 -05:00
Volker Lendecke
eaefd00563 r23055: Rewrite messages.c to use auto-generated marshalling in the tdb. I'm
doing this because for the clustering the marshalling is needed in more
than one place, so I wanted a decent routine to marshall a message_rec
struct which was not there before.

Tridge, this seems about the same speed as it used to be before, the
librpc/ndr overhead in my tests was under the noise.

Volker
2007-10-10 12:22:17 -05:00
Volker Lendecke
cc92ce665d r22911: Pass a messaging_context to message_send_all 2007-10-10 12:22:07 -05:00
Volker Lendecke
e43e94cda1 r22761: This introduces lib/conn_tdb.c with two main functions: connections_traverse
and connections_forall. This centralizes all the routines that did individual
tdb_open("connections.tdb") and direct tdb_traverse.

Volker
2007-10-10 12:21:55 -05:00
Stefan Metzmacher
3a28443079 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
2007-10-10 12:19:00 -05:00
Jeremy Allison
7f817067a7 r20916: Add in the delete on close final fix - but only enabled
with -DDEVELOPER.
Jeremy.
2007-10-10 12:17:19 -05:00
Jeremy Allison
9dafb7f48c r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
2007-10-10 11:19:14 -05:00
Volker Lendecke
0a2f1ed5e9 r15103: Okay, looking closer: Samba4 tdb not exporting u32 is a bug in samba4's
tdb. tdb_open_ex needs it. Can someone from samba4 tell me how this should be
handled?

Thanks,

Volker
2007-10-10 11:16:23 -05:00
Volker Lendecke
0a1665a1b7 r15102: u32 is a tdb-only thing that's not exported by samba4 tdb. Replace by uint32.
Volker
2007-10-10 11:16:23 -05:00
Jeremy Allison
88034b9c28 r10186: More 64-bit warning fixes.
Jeremy.
2007-10-10 11:03:36 -05:00
Jeremy Allison
a5619d7179 r7846: Fix from bugzilla@kevinjamieson.com Kevin Jamieson - typo
in checking for .. in statcache. Bugid #2819.
Jeremy.
2007-10-10 10:57:59 -05:00
Jeremy Allison
1d542eee57 r6249: Get the comparison the right way around...
Jeremy.
2007-10-10 10:56:32 -05:00
Jeremy Allison
836b73d001 r6240: Fix for bug #2581. Add size limit (in kb) to stat cache.
Jeremy.
2007-10-10 10:56:31 -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
Jeremy Allison
dad4d65787 r2116: Ensure statcache has large enough tdb memory hash size (1031).
Jeremy.
2007-10-10 10:52:32 -05:00
Jeremy Allison
c2eff8ef1b r2112: Simplify the mangle hash code to use an in-memory tdb.
Should be ready for the new directory code now...
Jeremy.
2007-10-10 10:52:32 -05:00
Jeremy Allison
d7ea1ea8fb r2032: If you're selecting a hash algorithm for tdb, you need to do it at open time,
it doesn't make sense anywhere else.
Jeremy.
2007-10-10 10:52:29 -05:00
Jeremy Allison
3fbadac85b r2026: Simplify statcache to use an in-memory tdb. Modify tdb to use
a customer hash function for this tdb (yes it does make a difference
on benchmarks). Remove the no longer used hash.c code.
Jeremy.
2007-10-10 10:52:29 -05:00
Jeremy Allison
578a508509 r570: Remove lots of globals to handle case issues - move them
to connection struct entries (as they should have been from
the start). Jerry, once you've cut over to 3.0.4 release
branch I'll add this to 3.0 also.
- Jerry cut over :-).
Jeremy.
2007-10-10 10:51:30 -05:00
Tim Potter
23443e3aa0 Fix more 64-bit printf warnings. 0001-01-01 00:00:00 +00:00
Tim Potter
e2b5dd7d9b Fixed typo in debug. 0001-01-01 00:00:00 +00:00
Jeremy Allison
8cb9ec5d53 More cachegrind tuning, plus fix an error message.
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
Andrew Bartlett
d4c9261725 Allow the stat cache to better handle invalid multibyte strings, by using
strdup_upper().  This function may fail - and we can just drop out of using
the cache in that case.  (Rather than panicing).

This also should get us closer to supporting all of the weird 'longer/shorter'
on uppercase/lowercase.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
7a1ac7be42 Fix from MORIYAMA Masayuki <msyk@mtg.biglobe.ne.jp> for new MB statcache
code. Bug #185.
Jeremy.
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
Jeremy Allison
72e382e99b Added fix for Japanese case names in statcache - these can change
size on upper casing. Based on patch from monyo@home.monyo.com.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
bbe1276b51 Whitespace reformat before applying a patch.
Jeremy.
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
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
Andrew Bartlett
3b9db928fc Merge new statcache.c from HEAD. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
c1cfc296c2 Cleanups: (merge from HEAD)
- use safe_strcpy() instead of pstrcpy() for malloc()ed strings

 - CUPS: a failure in an attempt to automaticly add a printer is not level 0 stuff.

 - Fix up a possible Realloc() failure segfault

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
11a2808e10 fixed a typo 0001-01-01 00:00:00 +00:00
Andrew Tridgell
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
572a37534b statcache initialisation fix
pointed out by Elrond
0001-01-01 00:00:00 +00:00
Jeremy Allison
2a797f9aa2 Removed unnessesary init.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
78a1307445 Fix for updating of print queues changed from a local box. Essentially,
this makes sure that the change messages sent to ourselves are handled
synchronously w.r.t. other smb packets incoming.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
66a5c05ec4 Ok - this is a big patch - and it may break smbd a bit (although
I hope not). If you encounter strange file-serving behavior after this
patch then back it out. I analysed our stat() usage and realised we
were doing approx. 3 stat calls per open, and 2 per getattr/setattr.
This patch should fix all that. It causes the stat struct returned
from unix_convert() (which now *must* be passed a valid SMB_STRUCT_STAT
pointer) to be passed through into the open code. This should prevent
the multiple stats that were being done so as not to violate layer
encapsulation in the API's.

Herb - if you could run a NetBench test with this code and do a
padc/par syscall test and also run with the current 2.2.0 code
and test the padc/par syscalls I'd appreciate it - you should
find the number of stat calls reduced - not sure by how much.

The patch depends on unix_convert() actually finding the file
and returning a stat struct, or returning a zero'd out stat
struct if the file didn't exist. I believe we can guarentee this
to be the case - I just wasn't confident enough to make this
an assertion before.

Ok ok - I did write this whilst at the Miami conference.....
sometimes you get a little free time at these things :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
dfe77c7046 Herb's warning fixes. Also the POSIX locking fix.
We now use our own vfs layer to do get/set acl calls (hurrah!).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b07611f815 Restructuring of vfs layer to include a "this" pointer - can be an fsp or
a conn struct depending on the call.
We need this to have a clean NT ACL call interface.
This will break any existing VFS libraries (that's why this is pre-release
code).
Andrew gets credit for this one :-) :-).

In addition - added Herb's WITH_PROFILE changes - Herb - please examine
the changes I've made to the smbd/reply.c code you added. The original
code was very ugly and I have replaced it with a
START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor.
Please check this compiles ok with the --with-profile switch.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b0c40236bb Made re-init of stat cache explicit rather than being hidden.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
cd5dcd9e65 if the stat cache is off then don't initialise it 0001-01-01 00:00:00 +00:00
Andrew Tridgell
610fcef4d3 fixed a memory leak (calling hash_table_init twice) 0001-01-01 00:00:00 +00:00
Andrew Tridgell
03e9cea004 - removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.

- moved the stat cache code into statcache.c

- fixed the uint16 alignment requirements of ascii_to_unistr() and
  unistr_to_ascii()

- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
  unicode always (at least thats what NT4 does)

- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
  crash as much
0001-01-01 00:00:00 +00:00