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

4407 Commits

Author SHA1 Message Date
Volker Lendecke
55dfad40af "userdom_struct" does not need "full_name" anymore -- unused 2009-01-20 23:10:16 +01:00
Volker Lendecke
520f88143b Remove some unused code 2009-01-20 16:41:32 +01:00
Volker Lendecke
b8b6cddb29 Remove some smb fsp knowledge from rpc_server/
np_open/read/write don't have to know about files_struct
2009-01-20 16:41:14 +01:00
Stefan Metzmacher
fcf9f72e04 s3:smbd: call message_dispatch() before processing incoming PDUs
This is a hack to fix races which happen with the RAW-RENAME and RAW-OPLOCK
tests. We should try to remove it later.

metze
2009-01-20 00:40:56 +01:00
Stefan Metzmacher
dc6edf1ab4 s3:cluster: fix ctdb ipv6 support
We need to use CTDB_CONTROL_TCP_CLIENT instead of CTDB_CONTROL_TCP_ADD.

CTDB_CONTROL_TCP_CLIENT has support for 2 modes in newer ctdb versions:

- with struct ctdb_control_tcp it only supports ipv4.
- with struct ctdb_control_tcp_addr it supports ipv4 and ipv6.

You need new header files which defines struct ctdb_control_tcp_addr,
but at runtime it should be fine to work against older
ctdb versions (<= 1.0.68).

metze
2009-01-16 15:16:59 +01:00
Volker Lendecke
0d7ca8e89e remove the old chain_reply code 2009-01-16 13:00:45 +01:00
Volker Lendecke
ddaa65ef6e Correctly calculate the offset for read&x 2009-01-16 13:00:44 +01:00
Volker Lendecke
ba981128ac Add a new implementation of chain_reply
This the global variable "orig_inbuf" in the old chain_reply code. This global
variable was one of the reasons why we had the silly restriction to not allow
async requests within a request chain.
2009-01-16 13:00:28 +01:00
Michael Adam
99ef38c84f s3:put the browse list into cache_dir, not lock_dir.
Michael
2009-01-16 01:02:23 +01:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jeremy Allison
da2dd1406f Only call sendfile_short_read() if we need it.
Jeremy.
2009-01-13 15:36:09 -08:00
Jeremy Allison
0f450623c5 Fix bug noticed by Volker - if sendfile returns zero then
we might have to handle a short send by filling with zeros.
Jeremy.
2009-01-13 13:02:44 -08:00
Jeremy Allison
83c3b28096 Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDB
Jeremy.
2009-01-13 11:19:11 -08:00
Tim Prouty
9872dbf439 s3: Differentiate between posix files with colons and actual streams
It is possible for a posix file created locally or over nfs to have a
":" in the name.  Since ":" is a reserved character in windows,
filenames containing a colon must be mangled in a directory listing.
Right now files containing colons will not even be displayed in
directory listings if streams modules are in use.  During the
directory listing the file will be detected as a stream because of the
colon, but the streams module will fail to find the stream since it
doesn't exist.  This fix adds a step to is_ntfs_stream_name that stats
the filename to differentiate between actual streams and files
containing colons.

While this is an improvement, it isn't perfect. Consider the case
where there is a file on disk called "a.txt:s1" and also a file called
"a.txt" that has a stream called "s1".  This patch will always
preference "a.txt:s1" over a.txt's s1 stream.

The real issue is that at the vfs level, the vfs modules have no way
to tell between a demangled name with a colon and an actual stream.  A
more invasive, but better, long-term fix would be to add all paths
that come over the wire into a struct containing metadata about the
path.  This metadata could include a flag to indicate whether the path
came over the wire with a colon ":" (guaranteeing that the client is
requesting a stream). Passing this struct down to the lower levels,
including all path-based vfs calls, would allow the above case to be
handled correctly in all cases.
2009-01-11 22:13:37 -08:00
Volker Lendecke
d9c40172bf Fix a type-punned error 2009-01-10 13:05:35 +01:00
Volker Lendecke
50aa8a4ac8 Fix a C++ warning 2009-01-10 13:05:34 +01:00
Tim Prouty
f2269e6cc8 s3: Fix open path to delete streams depending on the create disposition
The new create disposition test in smbtorture RAW-STREAMS verifies
this fix.
2009-01-09 11:45:31 -08:00
Tim Prouty
6dde84553c s3: Add delete_all_streams to proto.h 2009-01-09 11:45:31 -08:00
Stefan Metzmacher
aeb798c325 s3:smbd: handle incoming smb requests via event handlers
We use a fd event and receive incoming smb requests
when the fd becomes readable. It's not completely
nonblocking yet, but it should behave like the old code.

We use timed events to trigger retries for deferred open calls.

metze
2009-01-09 08:45:40 +01:00
Stefan Metzmacher
74a5ccec96 s3:smbd: fix the build with dmapi support
struct smbd_dmapi_context *dmapi_ctx;
is in globals.c

metze
2009-01-08 16:24:28 +01:00
Volker Lendecke
260c4e17e8 Attempt to fix the build 2009-01-08 15:27:36 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
defb574c25 s3:smbd: variables in a main() don't need to be static
metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
7a5d07a1c1 s3:smbd: open_sockets_smbd() don't need a static variable arrount atexit()
open_sockets_smbd() is only called once.

metze
2009-01-08 12:22:21 +01:00
Stefan Metzmacher
1bd317d3e3 s3:smbd: keep dmapi globals in one context struct
metze
2009-01-08 12:22:20 +01:00
Stefan Metzmacher
256101b022 s3:smbd: remove stupid static variables for the nfs quota code
metze
2009-01-08 12:22:20 +01:00
Stefan Metzmacher
0a0cd1396a s3:smbd: remove pointless static variable in uid.c
We always free the value at the end of the function,
so we don't need a static variable to hold just NULL
for the time the function isn't executed.

metze
2009-01-08 12:22:19 +01:00
Stefan Metzmacher
9ae0c5e5a7 s3:smbd: make static const in mangle_hash2.c really static const
const char *foo, means a non-const pointer to
a const char.

const char * const foo, means a const pointer to
a const char.

char * const foo, would mean a const pointer to
a non-const char.

metze
2009-01-08 12:22:19 +01:00
Stefan Metzmacher
c19ed7669c s3:smbd: make const globals in mangle_hash2.c really static const
const char *foo, means a non-const pointer to
a const char.

const char * const foo, means a const pointer to
a const char.

char * const foo, would mean a const pointer to
a non-const char.

metze
2009-01-08 12:22:19 +01:00
Stefan Metzmacher
0713f98124 s3:smbd: make globals in utmp.c static const
const char *foo, means a non-const pointer to
a const char.

const char * const foo, means a const pointer to
a const char.

char * const foo, would mean a const pointer to
a non-const char.

metze
2009-01-08 12:22:18 +01:00
Stefan Metzmacher
d9e81664e5 s3:smbd: it's pointless to have a global magic_char
We call magic_char = lp_magicchar(p) each time it's used.

metze
2009-01-08 12:22:18 +01:00
Stefan Metzmacher
2f9f8fe81e s3:smbd: remove pointless static variables in chgpasswd.c
metze
2009-01-08 12:22:18 +01:00
Stefan Metzmacher
33dd8e850b s3:smbd: make fake_files[] static const
metze
2009-01-08 12:22:17 +01:00
Stefan Metzmacher
7f2cf6b166 s3:smbd: make mangle_fns const
metze
2009-01-08 12:22:17 +01:00
Jeremy Allison
9b44fb1c93 Fix bug #6016 - Alternate Data Streams / Extended Attributes seem to conflict.
Jeremy.
2009-01-07 14:57:20 -08:00
Jeremy Allison
e13983870f Fix bug #6017, - magic script does not work. based on a patch from monyo@samba.gr.jp.
Jeremy.
2009-01-06 16:05:28 -08:00
Jeremy Allison
65fb7f123b Fix call to ndr_size_dom_sid, missing parameter.
Jeremy.
2009-01-05 13:47:07 -08:00
Jelmer Vernooij
37e6849d45 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-05 18:01:04 +01:00
Volker Lendecke
0581094023 Attempt to fix the build with dnssd 2009-01-05 17:12:51 +01:00
Stefan Metzmacher
c34d5f445a s3:events: change event_add_timed() prototype to match samba4
metze
2009-01-05 15:07:35 +01:00
Bo Yang
022e2f8199 clean event context after child is forked.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-01-05 15:07:31 +01:00
Jelmer Vernooij
de7dc2cec0 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-05 14:02:30 +01:00
Michael Adam
5318e73e93 smbd: prevent access to root filesystem when connecting with empty service name
This only applies to a setup with "registry shares = yes"

Michael
(cherry picked from commit 288fa94ac7)
(cherry picked from commit e85526b184)
2009-01-05 11:07:59 +01:00
Tim Prouty
3e0e756104 s3: Allow renames of streams via NTRENAME and fix stream error codes on rename
The test_streams_rename2 test in RAW-STREAMS verifies these changes
2009-01-04 19:31:30 -08:00
Jelmer Vernooij
af744e0954 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2009-01-04 22:48:23 +01:00
Jeremy Allison
2c0faaf5d9 Fix bug #6009 - Setting "min receivefile size = 1" breaks writes.
Jeremy.
2009-01-04 11:47:16 -08:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Volker Lendecke
1ce9525be2 Replace "goto again" by "return NT_STATUS_RETRY" in receive_message_or_smb
This gives lower-level routines the chance to indicate a retry condition
2008-12-31 19:33:25 +01:00
Volker Lendecke
9e1cabdd43 Fix a "nested extern" warning 2008-12-31 19:33:25 +01:00
Volker Lendecke
972295f80a Rename parent_dirname_talloc() to parent_dirname() 2008-12-31 19:33:25 +01:00