1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

38833 Commits

Author SHA1 Message Date
Jeremy Allison
4b9bdee167 Add early return on stat open without O_CREAT if file doesn't exist.
Reduces one level of indentation.
2011-10-26 12:08:51 -07:00
Stefan Metzmacher
1d531090bc s3:libsmb: make use of map_nt_error_from_unix_common() in clitrans.c
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 26 17:53:15 CEST 2011 on sn-devel-104
2011-10-26 17:53:15 +02:00
Stefan Metzmacher
9a3e5965b4 s3:libsmb: avoid using smb_flg2 in cli_trans.c
metze
2011-10-26 16:18:28 +02:00
Stefan Metzmacher
f3166e75ef s3:libsmb: replace smb_size - 4 with MIN_SMB_SIZE in clitrans.c
metze
2011-10-26 15:44:52 +02:00
Stefan Metzmacher
7221ce9bd5 s3:libsmb: use 'tevent_' instead of 'event_' in clitrans.c
metze
2011-10-26 15:43:08 +02:00
Stefan Metzmacher
f8f7f4e3ab s3:libsmb: make use of smb_buffer_oob() in clitrans.c
metze
2011-10-26 15:41:34 +02:00
Stefan Metzmacher
431b476868 s3:libsmb: use smb_len_nbt() in clitrans.c
metze
2011-10-26 15:41:02 +02:00
Stefan Metzmacher
7682f61e10 s3:include: implement trans_oob() as wrapper to smb_buffer_oob()
metze
2011-10-26 15:33:30 +02:00
Günther Deschner
d66d7c2b00 s3-netapi: remove pointless use_memory_krb5_ccache.
This breaks the ABI.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Oct 26 13:23:58 CEST 2011 on sn-devel-104
2011-10-26 13:23:58 +02:00
Stefan Metzmacher
0d9bd56afb libcli/smb: merge NEGOTIATE_SECURITY_* flags to smb_constants.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 26 11:27:12 CEST 2011 on sn-devel-104
2011-10-26 11:27:12 +02:00
Stefan Metzmacher
44689b1ee7 s3:lib: make_unix_date3() is the same as pull_dos_date3()
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze
2011-10-26 09:42:04 +02:00
Stefan Metzmacher
0e95c8aa5c s3:lib: make_unix_date2() is the same as pull_dos_date2()
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze
2011-10-26 09:42:04 +02:00
Stefan Metzmacher
a1796465e8 s3:lib: make_unix_date() is the same as pull_dos_date()
Except for a 'void *' vs. 'uint8_t *'.

As a first step let make_unix_date() call pull_dos_date(),
so that we he the logic only once. We can fix the callers
later.

metze
2011-10-26 09:42:03 +02:00
Björn Baumbach
2fac12b276 s3-util: dbwrap_tool: fix fetch_string function
We do not want truncated strings.

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Oct 26 04:17:05 CEST 2011 on sn-devel-104
2011-10-26 04:17:05 +02:00
Gregor Beck
f881d43837 s3:net registry check: fix a case where automatic and read only mode take the wrong action
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Gregor Beck
4fe5e091e1 s3:net registry check: do not silently replace separators
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-26 02:44:03 +02:00
Jeremy Allison
0f746fcad8 Second attempt to fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.
Don't just use the first entry in back_channels as a talloc context
to allocate a long-lived chan entry on - must be NULL. It's already
correctly deleted when the last reference goes away.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 26 02:42:35 CEST 2011 on sn-devel-104
2011-10-26 02:42:35 +02:00
Stefan Metzmacher
414df4b9c4 s3:smb2cli_base: make use of [_]smb_[set]len_tcp()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Oct 25 19:30:43 CEST 2011 on sn-devel-104
2011-10-25 19:30:43 +02:00
Stefan Metzmacher
fc69057b8b s3:smb2cli_base: make use of map_nt_error_from_unix_common()
metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
fd261fea74 s3:lib/errmap_unix: map EPIPE to NT_STATUS_CONNECTION_DISCONNECTED
This lets map_nt_error_from_unix() return the same value as
map_nt_error_from_unix_common().

There are no callers relying on NT_STATUS_PIPE_BROKEN.

metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
e947acaa8a s3:libsmb: s/event_context/tevent_context/ in async_smb.[ch]
metze
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
dd9d40a0e6 s3:lib/addrchange.h: include libreplace headers before others
Also we typically don't use an explicit "lib/replace/" prefix.

metze
2011-10-25 17:58:33 +02:00
Andrew Bartlett
254601df4d build: always include tevent with <tevent.h>
This ensures we do the right thing if we are built against the system
tevent.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Andrew Bartlett
2d05cb9096 build: always include talloc with <talloc.h>
This ensures we do the right thing if we are built against the system
talloc.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Andrew Bartlett
50e7a8767f torture: Remove unused smbiconv
smbiconv is not used in any test script, and has only had changes
since being introduced by Jelmer to keep it building.

It is also not installed on the system. I have also checked with
Jelmer, who approved the removal.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Stefan Metzmacher
242292d4de s3:libsmb: make use of map_nt_error_from_unix_common() in async_smb.c
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Oct 25 03:21:06 CEST 2011 on sn-devel-104
2011-10-25 03:21:06 +02:00
Stefan Metzmacher
6fb13f4c19 s3:libsmb: use HDR_* defines in cli_state_dispatch_smb1()
metze
2011-10-25 01:47:22 +02:00
Stefan Metzmacher
648665a008 s3:libsmb: make use of smb_[set]len_nbt() in async_smb.c
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
d670d060fc s3:libsmb: use HDR_* defines in cli_pull_raw_error()
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
1fa7300037 libcli/smb: move smb_signing.[ch] to the toplevel
metze
2011-10-25 01:47:21 +02:00
Stefan Metzmacher
aa2e5cea1c s3:libsmb/smb_signing: make use of HDR_* defines
metze
2011-10-25 00:24:08 +02:00
Stefan Metzmacher
13a5f27db2 s3:libsmb/smb_signing: make use of smb_len_nbt()
metze
2011-10-25 00:24:08 +02:00
Stefan Metzmacher
4db071cca4 s3:libsmb/smb_signing: avoid usage of smb_ss_field
metze
2011-10-25 00:24:07 +02:00
Jeremy Allison
4ba00ab57b Try and fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.
Remove the copy of the binding handle from struct notify_back_channel, use
the direct pointer in struct rpc_pipe_client instead. Ensure we can't call
the functions with a NULL binding handle.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 24 22:56:40 CEST 2011 on sn-devel-104
2011-10-24 22:56:40 +02:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Stefan Metzmacher
f3c25bc6a5 libcli/smb: merge LOCKING_ANDX_* and OPLOCK_* defines to smb_constants.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 17:46:47 CEST 2011 on sn-devel-104
2011-10-24 17:46:47 +02:00
Stefan Metzmacher
ec7cc700b2 libcli/smb: move more defines to smb_constants.h
metze
2011-10-24 16:10:36 +02:00
Stefan Metzmacher
6fef69562b libcli/smb: move CAP_* defines to smb_constants.h
metze
2011-10-24 16:10:36 +02:00
Stefan Metzmacher
7ebd4337ac libcli/smb: move source3/libsmb/read_smb.* to the toplevel
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 24 10:18:06 CEST 2011 on sn-devel-104
2011-10-24 10:18:06 +02:00
Stefan Metzmacher
6e2ecaf77d s3:libsmb/read_smb: make use of smb_len_tcp()
metze
2011-10-24 08:41:15 +02:00
Stefan Metzmacher
8f356baab6 s3:libsmb: remove unused sync read_smb()
metze
2011-10-24 08:25:31 +02:00
Stefan Metzmacher
99666e4a8d s3:torture: avoid using read_smb()
metze
2011-10-24 08:25:31 +02:00
Jeremy Allison
f459318187 Third part of fix for bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.
Missed passing ucf_flags instead of hard coded flags in findfirst call.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct 22 06:30:16 CEST 2011 on sn-devel-104
2011-10-22 06:30:16 +02:00
Jeremy Allison
d1a4ee604f Second part of fix for bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.
The statcache has to do lstat instead of stat when returning cached
posix pathnames.
2011-10-22 04:57:10 +02:00
Jeremy Allison
662e9c04fb Fix bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.
The key is to only allow the lookup to succeed if it's a UNIX level lookup or readlink,
but disallow all other operations.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct 22 01:37:41 CEST 2011 on sn-devel-104
2011-10-22 01:37:41 +02:00
Jeremy Allison
6bd49ea4ae Deprecate "acl check permissions".
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 21 21:51:18 CEST 2011 on sn-devel-104
2011-10-21 21:51:18 +02:00
Christian Ambach
ed45a558ae s3:idmap_autorid: add an allocation range to autorid
this is needed to allocate gids for BUILTIN\Users and
BUILTIN\Administrators and for local users/group that
admins might want to create

autorid will now allocate one range for this purpose
and can so give out as many uids and gids as the
configured rangesize allows
2011-10-21 16:30:56 +02:00
Christian Ambach
0a85d1c891 s3:idmap_autorid: move HWM initialization into a function
we will need some more HWM soon, so move out initialization and
optimize the logic using the new interface of dbwrap_fetch_uint32
2011-10-21 16:30:56 +02:00
Christian Ambach
8d9aea2a66 s3:idmap_autorid: use strings as parameter for range allocator
this prepares for allocation of non-domain ranges that cannot be
expressed by a SID (e.g. an allocation pool)
2011-10-21 16:30:56 +02:00
Christian Ambach
a4d245b3e8 s3:winbindd/idmap make idmap modules loadable again
commit 355b5e3a831415d9bef97 changed the module system to
expect 'samba_init_module' as fixed initializer function
2011-10-21 16:30:56 +02:00