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

40985 Commits

Author SHA1 Message Date
Stefan Metzmacher
612838dca8 s3:smbd: pass down vuid as uint64_t in ipc.c
metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
d3e79a864d s3:smbd: change vuid to uint64_t in uid.c
metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
c535668f7b s3:smbd: let fcb_or_dos_open() take a uint64_t vuid
metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
9ffb8f1532 s3:smbd: let close_cnum() take a uint64_t vuid
metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
69d1f9b836 s3:smbd: use UID_FIELD_INVALID (0) instead of (uint16)-1 when calling close_cnum()
The only thing that's important is that the value is invalid.

metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
2a9a95e673 s3:smbd: let make_connection() take a uint64_t vuid
metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
19d05171fa s3:smbd: let conn_clear_vuid_caches() take a uint64_t vuid
metze
2012-06-06 10:18:41 +02:00
Stefan Metzmacher
2477c73b62 s3:smbd: let open_fake_file() take a uint64_t vuid
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
484cb4e43e s3:printing: let print_spool_open() take a uint64_t vuid
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
53cd38ebb8 s3:smbd: change conn_ctx->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
c0e5cc0686 s3:include: change current_user->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
21e6db8f7e s3:smbd: change trans_state->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
d4aa494654 s3:include: change smb_request->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
d45e0ddfcd s3:include: move struct smb_request to vfs.h
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
37bfadf4a3 s3:include: change files_struct->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
5a260a1d58 s3:include: change connection_struct->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
defebd9e49 s3:includes: change vuid_cache_entry->vuid to uint64_t
metze
2012-06-06 10:18:40 +02:00
Stefan Metzmacher
36c7016cc0 s3:include: move sys_acl prototypes to smb_acls.h
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
bc39915f47 s3:smbd: move struct user_struct to globals.h
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
b742a75b37 s3:include: remove typedef user_struct
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
f52e5738a2 s3:smbd: use 'struct user_struct' instead of typedef'ed 'user_struct'
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
9e2e3708aa s3:smbd: move forward declaration of struct aio_extra to smbd.h
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
b6319b5457 s3:printing: use smbd/smbd.h instead of just smbd/proto.h in queue_process.c
This fixes compiler warnings regarding incomplete types.

metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
f454765b37 s3:torture: use smbd/smbd.h instead of just smbd/proto.h in vfstest_chain.c
This fixes compiler warnings regarding incomplete types.

metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
af4c99eed0 s3:utils: use smbd/smbd.h instead of just smbd/proto.h
This fixes compiler warnings regarding incomplete types.

metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
7bc328dcb0 s3:modules: we don't need smbd/proto.h in vfs_shadow_copy2.c
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
16be476d40 s3:lib: we don't need smbd/proto.h in smbd_shim.c
metze
2012-06-06 10:18:39 +02:00
Stefan Metzmacher
9b5c2ca14c s3:include: move some prototypes (e.g. smb_register_vfs) to vfs.h
These are called from vfs modules, which should not depend on smbd/proto.h

metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
c44d2e934c s3:include: remove unused forward declaration of deferred_open_record in smb.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
5306c18f2c s3:smbd: move UCF_ defines to smbd.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
4a22dd61c0 s3:include: move struct smb_filename to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
22cfc8eca8 s3:include: move struct smb_file_time to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
5fc502c624 s3:include: move struct connection_struct (and sub structs) to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
f88d13b16f s3:include: move struct stream_struct to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
b9500bd988 s3:include: move struct fd_handle/files_struct to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
f78cc3aca7 s3:includes: move union unid_t to vfs.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
44482ad452 s3:smbd: move struct trans_state to smbd.h
metze
2012-06-06 10:18:38 +02:00
Stefan Metzmacher
ce41497769 s3:smbd: move struct privilege_paths to smbd.h
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
659f3e681e s3:smbd: make struct notify_change_buf private to notify.c
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
b5b943dbad s3:smbd: make use of change_notify_fsp_has_changes()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
dc962c195e s3:smbd: add change_notify_fsp_has_changes()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
d1d7904182 s3:printing: add print_spool_rap_jobid()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
6d2d8f5444 s3:printing: make struct print_file_data private to printspoolss.c
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
e91c223531 s3:smbd: use print_spool_rap_jobid() in call_trans2ioctl()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
c2ffe330b4 s3:smbd: use print_spool_rap_jobid() in reply_ioctl()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
145fe2ac4c s3:smbd: fcb_or_dos_open() can be static
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
0907b1e20c s3:smbd: dup_file_fsp() never gets called for print files
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
cf549ff2bc s3:smbd: make struct vfs_fsp_data private to vfs.c
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
4321e19657 s3:smbd: make use of vfs_remove_all_fsp_extensions() in file_free()
metze
2012-06-06 10:18:37 +02:00
Stefan Metzmacher
cd3e658d82 s3:smbd: add vfs_remove_all_fsp_extensions()
metze
2012-06-06 10:18:36 +02:00
Stefan Metzmacher
a8e7c57862 s3:includes: move struct share_mode_lock to locking.h
metze
2012-06-06 10:18:36 +02:00
Stefan Metzmacher
05dc497637 s3:smbd: remove typedef for struct write_cache
metze
2012-06-06 10:18:36 +02:00
Stefan Metzmacher
4a91321f3a s3:smbd: make typedef write_cache private to fileio.c
metze
2012-06-06 10:18:36 +02:00
Andrew Bartlett
01b726dbe8 s3-libsmb: Fix error messages to correctly mention PLAINTEXT not LM
Also make all the message say the same thing.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Jun  6 10:17:55 CEST 2012 on sn-devel-104
2012-06-06 10:17:55 +02:00
Andrew Bartlett
d2f6d0ba1e build: Rationalise AIO support in configure, ensure on by default
With this change, the define to check for AIO is HAVE_AIO, consistant
with other subsystems.

It is now also on by default in the autoconf build, as it has been for waf.

Andrew Bartlett
2012-06-06 08:23:10 +02:00
Björn Jacke
f1becfa27b s3: temporary hack to make the waf build work withouth autotools being required
this also disables the examples/VFS build for waf now. Finally we should create a
wscript file for examples/VFS.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Jun  5 23:56:22 CEST 2012 on sn-devel-104
2012-06-05 23:56:22 +02:00
Stefan Metzmacher
8693a4fff9 s3:lib: split things into a conn_tdb.h
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jun  5 19:28:35 CEST 2012 on sn-devel-104
2012-06-05 19:28:35 +02:00
Stefan Metzmacher
5a122931ed s3:libsmb: fix the talloc parent of clistr_pull_talloc() in cli_notify_done()
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
7ef4ae42fe s3:libsmb: change cli_sesssetup_blob_* to use uint8_t instead of char for inbuf
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
2b5d4d4267 s3:libsmb: use inhdr instead of inbuf in tree connect related functions
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
ae627a5da8 s3:libsmb: use inhdr instead of inbuf in session setup related functions
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
a868a51eca s3:libsmb: remove unused 'inbuf' variable
metze
2012-06-05 17:33:49 +02:00
Stefan Metzmacher
324c51c25b s3:libsmb: don't require a pinbuf in cli_smb_recv() to keep the memory
metze
2012-06-05 17:33:49 +02:00
Björn Jacke
5cc86fd560 s3: remove dependency on automake for "make everything"
the dependency was introduced by 737a1c9b96

We now call auto* in examples/VFS from within the main autogen.sh.

This fixes bug #8978.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Jun  5 17:32:22 CEST 2012 on sn-devel-104
2012-06-05 17:32:22 +02:00
Andrew Bartlett
15c532e78b build: Add newlines for clarity 2012-06-05 09:48:06 +02:00
Andrew Bartlett
659f588c7a build: Add test for HAVE_BROKEN_POSIX_FALLOCATE to waf build
This was previously only in the autoconf build, added in 3264a98f.

Andrew Bartlett
2012-06-05 09:48:05 +02:00
Andrew Bartlett
fcd1aa82ac build: Remove unused check for HAVE_UNSIGNED_CHAR
BTW, uint8_t check is in libreplace for both build systems.
2012-06-05 09:48:05 +02:00
Jeremy Allison
07fc59f78d Tests for bug #8972 - Add permission checks to run_simple_posix_open_test().
This requires a share with :

	create mask = 0777
	force create mode = 0
	directory mask = 0777
	force directory mode = 0

set so we don't mess with requested permissions.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jun  5 08:20:03 CEST 2012 on sn-devel-104
2012-06-05 08:20:03 +02:00
Jeremy Allison
27bb01691c Tests for bug #8972 - run the POSIX tests against the posix_share. 2012-06-05 06:25:31 +02:00
Martin Schwenke
b7754f4bf7 s3:build(autoconf): fix "no AC_LANG_SOURCE call detected" warnings
Autoconf 2.68 NEWS says:

** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and
   AC_RUN_IFELSE now warn if the first argument failed to use
   AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file
   contents.  A new macro AC_LANG_DEFINES_PROVIDED exists if you have
   a compelling reason why you cannot use AC_LANG_SOURCE but must
   avoid the warning.

Signed-off-by: Martin Schwenke <martin@meltin.net>
2012-06-05 04:27:36 +02:00
Andrew Bartlett
d561ef20b5 VERSION: prepare for beta1 by setting and parsing the beta version 2012-06-05 04:27:36 +02:00
Andrew Bartlett
9db04c481d s3-smbd: Remove support for protocols before LANMAN1
This falls out of the removal of security=share, because we now require that
a session setup has been performed before (essentially) all other operations.

Andrew Bartlett
2012-06-05 04:27:36 +02:00
Jeremy Allison
4accd2396e Fix bug #8972 - Directory group write permission bit is set if unix extensions are enabled
We can't manipulate file_attributes if it's a posix call. I'll look
at adding a test for this asap.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jun  5 04:26:11 CEST 2012 on sn-devel-104
2012-06-05 04:26:10 +02:00
Luk Claes
aea996dba6 s3:libsmb: get rid of cli_smb_req_*,cli_smb_wct_ofs,cli_smb_chain_send
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jun  3 23:37:02 CEST 2012 on sn-devel-104
2012-06-03 23:37:02 +02:00
Stefan Metzmacher
9c80b91d8f s3:smbd: make conn_close_all() a void function
metze
2012-06-03 21:33:10 +02:00
Stefan Metzmacher
abcd095847 s3:smbd/close: call del_share_mode() directly before TALLOC_FREE(lck)
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jun  3 21:08:19 CEST 2012 on sn-devel-104
2012-06-03 21:08:19 +02:00
Stefan Metzmacher
f66d88d10a s3:smbd/close: remove unused goto out from close_directory()
metze
2012-06-03 17:23:28 +02:00
Stefan Metzmacher
8751c3f2ef s3:smbd/close: do an early return in close_directory()
metze
2012-06-03 17:23:28 +02:00
Stefan Metzmacher
d792f59aeb s3: Fix an assert to trigger in close_remove_share_mode
In case we have a left-over entry in the share mode entry array,
the SMB_ASSERT(got_tokens) is likely to kick in. It happens when
we are about to delete a file with initial delete on close. We don't
have a delete on close token set in the locking.tdb record. We see
the fsp->initial_delete_on_close set, add the delete_on_close token
to lck. Then "delete_file" is being set to true. Then later on we
do the notify_deferred_opens. This walks the list, also checking
for share_mode_stale_pid. We have already deleted our own share
mode entry, share_mode_stale_pid() sees the left-over entry. It not
also deletes that one but also the delete on close token. This leads
to a different view of "delete_file" a.k.a. "got_tokens" further
down in close_remove_share_mode, leading the SMB_ASSERT to fire.

This patch attempts to fix the issue by keeping around our own share
mode entry for almost the whole routine, preventing share_mode_stale_pid()
from removing the delete tokens.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>
2012-06-03 17:23:28 +02:00
Volker Lendecke
b9e11bd63e s3: Do an early return in close_remove_share_mode
Without "lck" we don't have much to clean up

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-03 17:23:28 +02:00
Volker Lendecke
2e95b77c99 s3: Make close_remove_share_mode a bit more readable
by introducing a variable simplifying a boolean expression

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-03 17:23:28 +02:00
Volker Lendecke
dec08b8041 s3: Simplify get_delete_on_close_token more
All remaining callers actually want the token

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-03 17:23:28 +02:00
Volker Lendecke
103b89fb07 s3: Simplify get_delete_on_close_token slightly
Introduce find_delete_on_close_token. Thus is_delete_on_close_set
does not have to call get_delete_on_close_token anymore.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-03 17:23:28 +02:00
Volker Lendecke
8541829a9a s3: Slightly simplify close_remove_share_mode
Remove a level of indentation by more use of "continue;"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-03 17:23:28 +02:00
Stefan Metzmacher
8486d514f5 s3:smbd/close: avoid procid_is_me()
metze
2012-06-03 17:23:28 +02:00
Stefan Metzmacher
85e6dcf49c s3:smbd/open: avoid procid_is_me()
metze
2012-06-03 17:23:27 +02:00
Stefan Metzmacher
9dba59d026 s3:smbd/oplock: avoid procid_is_me()
metze
2012-06-03 17:23:27 +02:00
Andrew Bartlett
ad26c2a726 build: Match autoconf build and disable ACLs on MacOS (darwin)
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jun  3 16:03:59 CEST 2012 on sn-devel-104
2012-06-03 16:03:59 +02:00
Andrew Bartlett
6c4cdbe891 s3-libnetapi: Cope with popt versions without POPT_TABLEEND 2012-06-03 15:30:15 +10:00
Andrew Bartlett
4143a935e5 s3-build: Remove finddead
This won't work with the new tree structure, and we have the same
output at
https://build.samba.org/lcov/data/coverage/samba_4_0_test/unused-fns.txt

Using the callcatcher framework.

Andrew Bartlett
2012-06-03 12:31:15 +10:00
Andrew Bartlett
5bf6971c38 libreplace: Link libreplace against attr when required
The autoconf Samba build will return to over-linking with -lattr on
systems with both the XFS compat API and native xattrs.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jun  3 03:56:05 CEST 2012 on sn-devel-104
2012-06-03 03:56:05 +02:00
Andrew Bartlett
7ac47b074b build: Remove check for res_ninit (Revert "s3: Check for res_ninit")
This reverts commit 4f6b1e8c81 because I
cannot find any use of this configure check, and it is one of the
differences between the WAF and autoconf builds.

Andrew Bartlett
2012-06-02 14:03:44 +02:00
Andrew Bartlett
ede90a55c5 build: Show extra configure results found by WAF as well
This may assist in debugging a difference in a configure test on the
build farm.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Jun  2 09:46:09 CEST 2012 on sn-devel-104
2012-06-02 09:46:09 +02:00
Andrew Bartlett
a9311ebfe7 build: Check correctly for sendfile (missing .h in header)
This will hopefully fix the build on SLES8, which does not support 64-bit sendfile.

Andrew Bartlett
2012-06-02 05:34:08 +02:00
Andrew Bartlett
2716b0a3f3 build: Always attempt to build posix ACLs
These are on more systems than just linux.  If the configure test passes
then assume it is available.

Andrew Bartlett
2012-06-02 02:13:49 +02:00
Andrew Bartlett
c290cdb934 lib/replace: xattr wrappers in lib/replace rather than source3/lib/system.c
This also moves all the still-used configure tests etc.  The unused OSF API
is also removed at this time.

Andrew Bartlett
2012-06-02 02:13:49 +02:00
Volker Lendecke
97a4901d6c s3: Same fix as 8576256, this time for fgetxattr
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jun  2 02:12:31 CEST 2012 on sn-devel-104
2012-06-02 02:12:31 +02:00
Volker Lendecke
29a51a22df s3: Avoid a lot of calls to serverid_exists()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jun  1 18:58:30 CEST 2012 on sn-devel-104
2012-06-01 18:58:30 +02:00
Alexander Bokovoy
6e9aca7d41 waf: check for krb5_create_checksum and krb5_creds.flags for some Heimdal versions
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Jun  1 11:23:21 CEST 2012 on sn-devel-104
2012-06-01 11:23:21 +02:00
Andrew Bartlett
403dda3c22 build: Add automatic compare of config.h files to recursive waf build
This uses the fact that we have both build systems running at the same time.

The krb5 checks are skipped because we typically are comparing internal Heimdal
with the system krb5, so they do not make sense.

The required checks for krb5 are pretty well understood in any case, as
we have a limited set of supported libraries.

Andrew Bartlett
2012-06-01 03:04:27 +02:00
Jeremy Allison
8fd02fa2d6 Forward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug #8970 - Possible memory leaks in the samba master process. 2012-05-31 16:08:44 -07:00
Jeremy Allison
f6e41026f8 We are triggering the cleanup_timeout_fn() too often, on exiting when an smbd is idle.
Calls to exit_server_cleanly() should be treated as a "clean" shutdown,
and not trigger the master smbd to call cleanup_timeout_fn.
2012-05-31 12:35:04 -07:00
Stefan Metzmacher
6718747268 s3:smbd: use server_messaging_context() instead of sconn->msg_ctx in exit_server_common()
sconn is not available in the parent anymore.

Thanks to Volker Lendecke <vl@samba.org> for finding this!

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 31 18:08:06 CEST 2012 on sn-devel-104
2012-05-31 18:08:05 +02:00
Stefan Metzmacher
2ea963b260 s3:vfs_hpuxacl: remove unused file_find_fd() calls
metze
2012-05-31 14:18:05 +02:00
Volker Lendecke
835e25e3b4 s3: Fix some 64-bit warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 31 10:06:56 CEST 2012 on sn-devel-104
2012-05-31 10:06:56 +02:00
Michael Adam
15d567265e build: rename build targets smbclient -> smbclient4 and smbclient3 -> smbclient
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu May 31 06:36:55 CEST 2012 on sn-devel-104
2012-05-31 06:36:55 +02:00
Michael Adam
4b07193705 s3:selftest: add a binary mapping for smbclient4 2012-05-31 04:46:06 +02:00
Michael Adam
52e1bba861 build: rename build targets nmblookup -> nmblookup4 and nmblookup3 -> nmblookup 2012-05-31 04:46:06 +02:00
Michael Adam
f56ada0978 s3:selftest: add a binary mapping for nmblookup4 2012-05-31 04:46:06 +02:00
Michael Adam
13181f3341 s3:selftest: improve strange linebreaks for blackbox tests in tests.py for readability 2012-05-31 04:46:06 +02:00
Michael Adam
910a4977f1 s3:selftest: introduce a variable for binpath('dbwrap_tool') in tests.py 2012-05-31 04:46:06 +02:00
Michael Adam
953163ddc7 s3:selftest: introduce a variable for binpath('ntlm_auth3') in tests.py 2012-05-31 04:46:06 +02:00
Michael Adam
5ec763aeec s3:selftest: introduce a variable for binpath('smbtorture3') in tests.py 2012-05-31 04:46:06 +02:00
Michael Adam
886169b380 s3:selftest: introduce a variable for binpath('net') in tests.py 2012-05-31 04:46:06 +02:00
Michael Adam
f9aef09454 s3:selftest: introduce a variable for binpath('wbinfo') in tests.py
to remove explicit calls to binpath('wbinfo')
2012-05-31 04:46:05 +02:00
Michael Adam
4f611bcc1b s3:selftest: introduce a variable for binpath('smbclient3') to test.py
to remove manual calls to binpath("smbclient3")
2012-05-31 04:46:05 +02:00
Michael Adam
3d504b8a63 s3:build: fix some spacing in wscript_build 2012-05-31 04:46:05 +02:00
Jeremy Allison
5d1a8d2a31 Stop spamming the logs with "Could not remove pid XX from serverid.tdb" messages and initiating the cleanup function on every process death.
We now have many sub-processes from smbd that don't serve SMB1/SMB2 requests and
don't register themselves in the serverid.tdb. Only initiate the cleanup
from processes that were explicitly in the child list.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu May 31 04:44:09 CEST 2012 on sn-devel-104
2012-05-31 04:44:09 +02:00
Ira Cooper
fc7e1113c3 Fix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss valid DC IP addresses
Original code incorrectly used a while() instead of a for() loop.
We need to iterate over the entire array here.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May 30 23:29:03 CEST 2012 on sn-devel-104
2012-05-30 23:29:02 +02:00
Jeremy Allison
d7e52cc527 Fix metze's complaint about the bugfix for bug #8953 - winbind can hang as nbt_getdc() has no timeout.
This code explicitly isn't needed as the tevent code will take
care of this.
2012-05-30 11:59:37 -07:00
Stefan Metzmacher
e697253263 s3:libsmb: use nb_connect_send() directly instead of doing a 0 timer for port 139
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 30 20:51:51 CEST 2012 on sn-devel-104
2012-05-30 20:51:51 +02:00
Andrew Bartlett
c8000cad55 s3-build: Fix configure checks for Heimdal
A series of small errors meant that all Heimdal versions became
unsupported, when for the autoconf build, some versions have what we
need.

Andrew Bartlett
2012-05-30 12:55:39 +02:00
Andrew Bartlett
a49e771a93 build: Make gss_wrap_iov mandatory for krb5 build
This isn't in Heimdal 1.1, so we still fail on that version, but at
least we fail for the right reasons.

Andrew Bartlett
2012-05-30 12:55:39 +02:00
Stefan Metzmacher
9cae92b485 s3:utils: use cli_tree_connect() instead of cli_tcon_andx()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 30 12:54:05 CEST 2012 on sn-devel-104
2012-05-30 12:54:05 +02:00
Stefan Metzmacher
9c02667b82 s3:libsmb: use cli_tree_connect() instead of cli_tcon_andx()
cli_tree_connect() is more generic and uses what the server supports

metze
2012-05-30 10:24:57 +02:00
Stefan Metzmacher
bce43d75da s3:libsmb: fallback to SMBtcon for old servers
metze
2012-05-30 10:24:57 +02:00
Andrew Bartlett
27fb14bfbe s3-loadparm: Swap synonyms of max/min protocol to server max/min protocol
This matches the lib/param code, as is a seperate parameter for the
client there.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed May 30 06:04:41 CEST 2012 on sn-devel-104
2012-05-30 06:04:41 +02:00
Andrew Bartlett
1d3e5eda03 s3-build: We do not have CHARSET modules any more 2012-05-30 04:15:12 +02:00
Andrew Bartlett
dde4d6fce9 lib/param: Put common FN_ macros into param_functions.c
This will in turn make it possible to put the actual parameter
definitions in common.

Andrew Bartlett
2012-05-30 04:15:12 +02:00
Andrew Bartlett
9f4b6fa0cc s3-param: Use same function name for "max xmit" as lib/param
Again, this helps with merging the FN_ list.

Andrew Bartlett
2012-05-30 04:15:12 +02:00
Andrew Bartlett
2168156979 s3-param: Use same variable names as lib/param
Again, this helps with merging the FN_ list.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
56996e00bf s3-param: Import parameters from lib/param to make this list common
This will allow the list of FN_ macros to be made a common .c file.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
b47f9a09cd s3-param: Rename lp_dns_proxy() -> lp_wins_dns_proxy() for clarity
This avoids some confusion now we have a DNS server as well.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
b225248486 param: Sort global param functions macros to ease the s3/s4 merge
This makes it easier to them merge these two function lists without
changing the meaning of the output.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
d3f061b687 lib/param: Harmonise 'password server' parameter between s3 and s4 2012-05-30 04:15:11 +02:00
Andrew Bartlett
91e4983d30 s3-build: Remove build of libtdb.so from the autoconf build
We now either link tdb statically or we use the system provided tdb

This means that we now only have one build system for externally-available
tdb, which in turn ensures we have a consistent shared library built as
libtdb.so

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
ac63b55033 s3-build: Remove build of libtalloc.so from the autoconf build
We now either link talloc statically or we use the system provided talloc

This means that we now only have one build system for externally-available
talloc, which in turn ensures we have a consistent shared library built as
libtalloc.so

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
53d4ffcc22 s3-iconv: Remove unused script/gen-8bit-gap.sh
We decided to rely on a system iconv rather than these
modules.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
c691ada709 build: Provide .pc file for libsmbsharemodes
This is not the exact same file as the autoconf build, because of
the differnet processing semantics.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Andrew Bartlett
3ef62345ab build: Provide .pc file for libnetapi
This is not the exact same file as the autoconf build, because of
the differnet processing semantics.

Andrew Bartlett
2012-05-30 04:15:11 +02:00
Stefan Metzmacher
cee146ff7c s3:smb2_ioctl: verify credit charge
Based on a patch from Christian Ambach <ambi@samba.org>.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 29 18:55:29 CEST 2012 on sn-devel-104
2012-05-29 18:55:29 +02:00
Stefan Metzmacher
8b4e677720 s3:smb2_ioctl: add more validation checks
metze
2012-05-29 17:02:13 +02:00
Stefan Metzmacher
4ac57a3c96 s3:smb2_ioctl: add some more validation checks
Based on a patch from Christian Ambach <ambi@samba.org>.

metze
2012-05-29 17:02:13 +02:00
Christian Ambach
aa7cd05e5b s3:smbd/smb2_find add a debug message
like the ones in the other calls that check for max sizes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-29 10:45:32 +02:00
Christian Ambach
1bd3c0aefb s3:smbd/smb2_getinfo add a debug message
like the ones in the other calls that check for max sizes

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-29 10:45:22 +02:00
Christian Ambach
f94d3d17e8 s3:smbd/smb2_setinfo add a debug message
similar to the ones present in other paths

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-29 10:44:55 +02:00
Christian Ambach
ac6417dfc6 s3:smbd/smb2_read improve debug message
make the message similar to the ones in other paths

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-29 10:44:42 +02:00
Björn Jacke
3085225e72 s3: fix compile of krb5 locator on Solaris
the krb5 locator plugin on Solaris needs LIBREPLACE_LIBS (bug #8732)

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 29 09:58:42 CEST 2012 on sn-devel-104
2012-05-29 09:58:42 +02:00
Alexander Bokovoy
27503cea09 freebsd9: support both WAF MIT krb5 build and autoconf build against MIT krb5
System-provided Heimdal Kerberos in FreeBSD 9 lacks proper support for parsing MS PAC.
This leaves us with MIT krb5 package from ports or embedded Heimdal in source4.
MIT krb5 from ports is 1.9.2, it supports all needed features for AD support in smbd,
as well as WAF MIT krb5 build. In order to use it, one needs to install 'krb5' package.

Autoconf build:
  --with-krb5=/usr/local

WAF build:
  --with-system-mitkrb5 /usr/local

or otherwise krb5-config from system Heimdal will overtake and break the detection, leaving
you with a mixture of Kerberos libraries from different locations.

WAF build accepts multiple paths as sub-arguments of the --with-system-mitkrb5 and searches
through them for krb5-config, i.e. /usr/local /usr/kerberos ...

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Mon May 28 23:40:30 CEST 2012 on sn-devel-104
2012-05-28 23:40:30 +02:00
Stefan Metzmacher
ac4d23ebeb s3:selftest: run rpc.samba3.smb[1|2]-pipe-name
metze
2012-05-28 19:52:00 +02:00
Stefan Metzmacher
69fd1bb66e s3:rpc_server: don't do any magic in is_known_pipename() anymore
The callers have to check if they allow something else than
the raw pipe file name.

If we allow more than windows allows, we risks Samba specific
client behavior. E.g. winbindd only works against Samba servers.

metze
2012-05-28 19:52:00 +02:00
Stefan Metzmacher
abf566ca99 s3:smbd: fix reply_open_pipe_and_X() to behave like windows (2008 R2)
See rpc.samba3.smb1-pipe-name.

metze
2012-05-28 19:51:59 +02:00
Stefan Metzmacher
e262db6c31 s3:smbd: only strip \\ off the name if present (for ntcreatex)
metze
2012-05-28 19:51:58 +02:00
Stefan Metzmacher
6777e345b1 s3:rpc_server: return OBJECT_NAME_NOT_FOUND instead of PIPE_NOT_AVAILABLE
metze
2012-05-28 19:51:57 +02:00
Stefan Metzmacher
98c14ca61c s3:smb2_create: do not remove leading backslash from pipe names
metze
2012-05-28 19:51:57 +02:00
Stefan Metzmacher
697c88d6b1 s3:cli_np_tstream: pass a leading backslash for the pipe name for SMB1
metze
2012-05-28 19:51:55 +02:00
Stefan Metzmacher
1e5010fd99 s3:rpc_client: tstream_cli_np_open_send() doesn't expect a leading backslash
This fixes winbindd against a windows server using SMB2.

metze
2012-05-28 19:51:46 +02:00
Luk Claes
4688107800 s3:libsmb: get rid of cli_ucs2
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 16:58:03 CEST 2012 on sn-devel-104
2012-05-28 16:58:03 +02:00
Luk Claes
93ed99d6ff s3:libsmb: get rid of clisigning routines
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:51 +02:00
Luk Claes
f7f73c4dba s3:libsmb: get rid of cli_has_async_calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:50 +02:00
Luk Claes
764b5e5610 s3:libsmb: get rid of cli_negprot
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:49 +02:00
Luk Claes
82895ab22f s3:libsmb: get rid of cli_state_disconnect
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:49 +02:00
Luk Claes
1ff8c404a6 s3:libsmb: get rid of cli_state_server_time_zone
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:48 +02:00
Luk Claes
278ba9928a s3:libsmb: get rid of cli_state_security_mode
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:48 +02:00
Luk Claes
5f10bd9fe4 s3:libsmb: get rid of cli_state_server_gss_blob
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:48 +02:00
Luk Claes
2be7e23b99 s3:libsmb: get rid of cli_state_server_challenge
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:47 +02:00
Luk Claes
ab052c7ff0 s3:libsmb: get rid of cli_state_encryption_on
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:47 +02:00
Luk Claes
6c18a66f3e s3:libsmb: get rid of cli_state_max_requests
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:47 +02:00
Luk Claes
7c69ca09d0 s3:libsmb: get rid of cli_state_server_session_key
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:46 +02:00
Luk Claes
3c9c06ac05 s3:libsmb: get rid of cli_state_capabilities
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:46 +02:00
Luk Claes
d8c0646a5d s3:libsmb: get rid of cli_state_protocol
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Luk Claes
4f6f4ea93c s3:libsmb: get rid of cli_state_remote_name
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Luk Claes
987e81b0ee s3:libsmb: get rid of cli_state_*_sockaddr
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:44 +02:00
Luk Claes
8e24e7f6b8 s3:libsmb: get rid of cli_sockopt
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:44 +02:00
Luk Claes
f43231c051 s3:libsmb: remove unused (un)set_pending functions
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:44 +02:00
Andrew Bartlett
39076c5a3f build: Remove all references to libuuid
We simply do not need this library any more.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun May 27 11:08:22 CEST 2012 on sn-devel-104
2012-05-27 11:08:22 +02:00
Andriy Syrovenko
c85f33458f Eliminate dependency on an external uuid library. 2012-05-27 13:15:56 +10:00
Andrew Bartlett
6634360ce5 s3-build: Remove build of libaddns.a from the autoconf build
We always link libaddns statically as part of the net object lists

This means that we no longer provide externally-available
libaddns, as the waf build declared this as a private library.

This never had a public API, .so or a header file.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat May 26 09:45:34 CEST 2012 on sn-devel-104
2012-05-26 09:45:34 +02:00
Andrew Bartlett
e7e6276092 s3-utils: Use ads_do_search_retry in net ads search
This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat May 26 03:53:34 CEST 2012 on sn-devel-104
2012-05-26 03:53:34 +02:00
Andrew Bartlett
0da10c842e s3-libads: Use a reducing page size to try and cope with a slow LDAP server
If we cannot get 1000 users downloaded in 15seconds, try with 500, 250
and then 125 users at a time.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-26 02:03:08 +02:00
Andrew Bartlett
b9217a8c00 s3-winbindd: Always map the LDAP error code to an NTSTATUS
We do this so that we catch LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT, which
has special handling in winbindd_cache.c

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-26 02:03:08 +02:00
Andrew Bartlett
63fb1d396b s3-libads: Map LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT
This allows Samba to then handle this error in the same way it would for RPC connections

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-26 02:03:07 +02:00
Alexander Bokovoy
337353bd3c s3-configure.in: when ADS support is disabled, unset HAVE_GSSAPI 2012-05-25 21:29:55 +03:00
Stefan Metzmacher
0bf6ec88ed s3:selftest: run smbtorture3 CLEANUP3 in the s3dc:local environment
metze

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 25 20:09:15 CEST 2012 on sn-devel-104
2012-05-25 20:09:15 +02:00
Volker Lendecke
68d03f2ef5 s3: Test whether get_share_mode_lock cleans up stale processes
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:39 -07:00
Volker Lendecke
58dff077d9 s3: Do not check the PIDs is parse_share_modes
We do that when conflicts arise

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Jeremy Allison
50fdb32a4d Ensure we only return NT_STATUS_DELETE_PENDING if the share modes are valid.
Ensure we only return *file_existed = true if there were valid share modes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
89cf7ea944 s3: Check for serverid_exists in close_directory
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
bdc4404ef9 s3: Check for serverid_exists in close_remove_share_mode
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
bc3b7d76a8 s3: Be less picky on stale share mode entries
If a process died, the share mode entry might be bogus. Ignore those entries.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
1b15d8b3da s3: Check for serverid_exists in find_oplock_types
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
6666de1975 s3: Check for serverid_exists in rename_share_filename
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
e2818d4a0b s3: Check for serverid_exists in smb_posix_unlink
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:38 -07:00
Volker Lendecke
fdcca54ca3 s3: Check for serverid_exists in open_mode_check
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:37 -07:00
Volker Lendecke
19b6671c07 s3: Check for serverid_exists in notify_deferred_opens
We will remove the check in parse_share_modes soon

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:37 -07:00
Jeremy Allison
6526432682 Fix an invalid state only reachable on server crash/abort.
Remove any delete-on-close tokens and clear the count if there are no
valid share modes.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:37 -07:00
Volker Lendecke
5842d4e025 s3: Add "share_mode_stale_pid"
This is a helper routine that prunes a dead share mode entry on demand. This
prepares for removing the serverids_exist call in parse_share_modes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:37 -07:00
Stefan Metzmacher
e17fa58d6e s3:smbd: move global smbd_msg_state to smbXsrv_connection
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 25 11:01:27 CEST 2012 on sn-devel-104
2012-05-25 11:01:27 +02:00
Stefan Metzmacher
167cccbc19 s3:smbd: move global koplocks to smbd_server_connection
metze
2012-05-25 09:05:35 +02:00
Stefan Metzmacher
3a66ee1ae5 s3:smbd: pass smbd_server_connection to should_notify_deferred_opens()
metze
2012-05-25 09:05:34 +02:00
Stefan Metzmacher
469a2c8e7c s3:smbd: move global oplocks vars to smbd_server_connection
metze
2012-05-25 09:05:34 +02:00
Stefan Metzmacher
2f435bb61a s3:smbd: remove unused get_number_of_exclusive_open_oplocks()
metze
2012-05-25 09:05:33 +02:00
Stefan Metzmacher
64ddb66884 s3:smbd/signing: use smbd_server_connection as talloc parent for its smb1 signing state
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri May 25 00:23:53 CEST 2012 on sn-devel-104
2012-05-25 00:23:53 +02:00
Ira Cooper
074991cefe s3-passdb: Fix negative SID->uid/gid/both cache handling
-1 uid/gid/both signals a non existent uid/gid/both.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-24 22:30:23 +02:00
Stefan Metzmacher
b5e9ece1f3 s3:smbd: remove global 'smbd_server_conn' !!!
For now we still use a global 'global_smbXsrv_connection'
in order to pass the connection state to exit_server*().

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 24 20:07:20 CEST 2012 on sn-devel-104
2012-05-24 20:07:20 +02:00
Stefan Metzmacher
288a75d8dc s3:smbd: only call file_init_global() in the parent smbd
metze
2012-05-24 18:16:37 +02:00
Stefan Metzmacher
9e45885fcc s3:smbd/files: split file_init_global() out of file_init()
metze
2012-05-24 18:16:37 +02:00
Stefan Metzmacher
48e62f2d46 s3:smbd: remove unused var in smbXsrv_connection_init_tables()
metze
2012-05-24 18:16:37 +02:00
Alexander Bokovoy
72029d5547 s3-smbldap: Add API for external callback to perform LDAP bind in smbldap
In order to support other bind methods, introduce a generic bind callback.
When smbldap_state.bind_callback is set, it means there is an alternative
way to perform LDAP bind to ldap_simple_bind_s() so call it instead.
The call is wrapped in become_root()/unbecome_root() to allow proper permissions
in smbd to access needed resources in the callback, for example, credential caches.
When run outside smbd, become_root()/unbecome_root() are no-op.

The API expectation is similar to ldap_simple_bind_s().

A caller of smbldap API can pass additional information to the callback by setting
smbldap_state.bind_callback_data pointer.

Both callback and the data pointer elements of smbldap_state structure get
cleaned up if someone sets proper credentials on smbldap_state with
smbldap_set_creds() so if you are interested in using smbldap_state.bind_dn
with the callback, make sure to set callback after credentials are set.
2012-05-24 16:21:26 +02:00
Stefan Metzmacher
a95b2ba043 s3:smbd/msdfs: pass allow_broken_path to resolve_dfspath_wcard()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu May 24 16:14:01 CEST 2012 on sn-devel-104
2012-05-24 16:14:01 +02:00
Stefan Metzmacher
758d61201f s3:smbd/msdfs: pass 'allow_broken_path' to get_referred_path()
Note the DCERPC code should not be smb2 specific!

I wonder why this is at all smb2 specific...

metze
2012-05-24 14:12:32 +02:00
Stefan Metzmacher
a92f7176bd s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'
metze
2012-05-24 14:12:32 +02:00
Stefan Metzmacher
0733183594 s3:smbd/files: work without sconn->file_bmap and assign fsp->fnum = -1
For faked connection_structs we do not need valid fnum values,
e.g. in the dfs and printing code.

metze
2012-05-24 14:12:32 +02:00
Stefan Metzmacher
768004b11d s3:smbd/files: fix error path and correctly cleanup
metze
2012-05-24 14:12:32 +02:00
Ira Cooper
e8601c02ba s3-configure: Fix configure version information.
version.h moved from include -> include/autoconf.

Autobuild-User: Ira Cooper <ira@samba.org>
Autobuild-Date: Thu May 24 01:34:24 CEST 2012 on sn-devel-104
2012-05-24 01:34:24 +02:00
Stefan Metzmacher
b21176875a s3:rpc_server/dfs: pass allow_broken_path=true to create_junction()
DCERPC code can't be smb2 specific!

I'm not sure if 'true' is the correct value here, but at least
it matches the old behavior and the tcp and smb1 cases.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 23 21:56:05 CEST 2012 on sn-devel-104
2012-05-23 21:56:05 +02:00
Stefan Metzmacher
aa7b1e21a8 s3:smbd/proto.h: remove unused resolve_dfspath() prototype
metze
2012-05-23 20:03:10 +02:00
Stefan Metzmacher
97f0a3675f s3:smbd/files: remove unused VALID_FNUM()
metze
2012-05-23 20:03:09 +02:00
Stefan Metzmacher
a0c9a291e7 s3:smb2_server: make use of nt_status_np_pipe()
metze
2012-05-23 20:03:09 +02:00
Stefan Metzmacher
d595d2e5af s3:smbd: use nt_status_np_pipe for smb1
metze
2012-05-23 20:03:08 +02:00
Stefan Metzmacher
d869f0260c s3:smbd: add nt_status_np_pipe()
This mapps between NT_STATUS_CONNECTION_* to NT_STATUS_PIPE_*

metze
2012-05-23 20:03:08 +02:00
Andreas Schneider
2b144531f1 gse: Use the smb_gss_oid_equal wrapper.
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-05-23 17:51:51 +03:00
Andreas Schneider
0a6e568344 krb5samba: Add smb_gss_oid_equal wrapper.
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-05-23 17:51:51 +03:00
Alexander Bokovoy
c1444c3839 s3-autoconf: fix typo after migrating DNS resolver code to lib/addns 2012-05-23 17:51:51 +03:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Alexander Bokovoy
2d9a0d8d0c s3-passdb: add unixid_from_uid/unixid_from_gid/unixid_from_both API
struct unixid is defined in idmap.idl and therefore to use it one
would need generated headers from librpc/gen_ndr. Not all of these
files are installed and available as public headers. Also, they
pull in some support headers which requires them to be available
via specific locations like <librpc/gen_ndr/*> or <libcli/util>.

Instead of pulling the headers to get structure and enum definitions,
introduce three simple helpers to fill in 'struct unixid' based on
the type of id. This is sufficient for PASSDB users and does not
require exposing generated headers or code.
2012-05-23 17:51:50 +03:00
Simo Sorce
c54fe86a63 s4-resolve: Remove dependency on libroken
Use available native samba resolver functions
2012-05-23 17:51:49 +03:00
Simo Sorce
34a65739d3 Move source3/libads/dns.c to lib/addns 2012-05-23 17:51:48 +03:00
Simo Sorce
cc3321c9ff s3-ads-dns: Avoid unnecessary dependencies 2012-05-23 17:51:48 +03:00
Simo Sorce
a7e94fce3f s3-ads-dns: Break dependency on lp_parm
In preparation of making this code common to s3 and s4
2012-05-23 17:51:48 +03:00
Simo Sorce
4a335e9632 s3-ad-dns: Use more standard uint and booleans defs
In preparation of making this code common to s3 and s4
2012-05-23 17:51:48 +03:00
Stefan Metzmacher
37866df4ee s3:smbd: use reply_force_doserror(req, ERRSRV, ERRbaduid) on SMBulogoff
We don't support security = share anymore, so we should always have
a valid session.

Found by the raw.context test.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed May 23 12:47:37 CEST 2012 on sn-devel-104
2012-05-23 12:47:37 +02:00
Herb Lewis
42b2026a83 Second part of fix for bug 8953 - winbind can hang as nbt_getdc() has no timeout.
If we're running with SEC_ADS and we don't get a cldap response from
the server when querying its name, don't fall back to NetBIOS requests
as they're unlikely to succeed.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May 23 03:49:36 CEST 2012 on sn-devel-104
2012-05-23 03:49:35 +02:00
Jeremy Allison
d673402992 Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout.
Add a timeout_in_seconds parameter to nbt_getdc() to make it fail
after that time with NT_STATUS_IO_TIMEOUT.
2012-05-22 16:25:14 -07:00
Michael Adam
f9e4105f41 s3:smbd: remove unused 'connection_struct->used'
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 22 16:42:22 CEST 2012 on sn-devel-104
2012-05-22 16:42:22 +02:00
Jeremy Allison
c531aac27c Added torture test for bug #8910. Test remove_duplicate_addrs2().
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue May 22 01:31:17 CEST 2012 on sn-devel-104
2012-05-22 01:31:17 +02:00
Volker Lendecke
8576256738 s3: Fix vfs_xattr_tdb.c
"size" is the maximum buffer, only copy what we actually got. For me, this
fixes valgrind errors in the DIR1 test that might potentially make DIR1
non-flaky again.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon May 21 22:10:15 CEST 2012 on sn-devel-104
2012-05-21 22:10:15 +02:00
Stefan Metzmacher
ce11eb5b94 s3:smb2_ioctl: Fix Coverity ID 701771 Uninitialized scalar variable
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 21 19:27:44 CEST 2012 on sn-devel-104
2012-05-21 19:27:43 +02:00
Jeremy Allison
32cbf20e65 Move the set_write_time() call to after get_existing_share_mode_lock() returns with a share mode.
get_existing_share_mode_lock() isn't really the right
call here, as we're being called after
close_remove_share_mode() inside close_normal_file()
so it's quite normal to not have an existing share
mode here. However, get_share_mode_lock() doesn't
work because that will create a new share mode if
one doesn't exist - so stick with this call (just
ignore any error we get if the share mode doesn't
exist.

The previous commit raised the error message debug
level inside get_share_mode_lock_internal() so
we don't always get a level 1 error message if
get_existing_share_mode_lock() fails.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat May 19 06:26:33 CEST 2012 on sn-devel-104
2012-05-19 06:26:33 +02:00
Jeremy Allison
87a62df8e6 Raise the debug level from 1 to 5 in get_share_mode_lock_internal()
This isn't a fatal condition, there is a valid codepath
that can cause this message.
2012-05-18 19:33:37 -07:00
Stefan Metzmacher
d58f7cd546 s3:smbd: allow creating new spnego sessions only with a 0 vuid
Found by the raw.context test.

metze
2012-05-18 16:36:16 +02:00
Stefan Metzmacher
84ce4484e7 s3:smbd: SMBtdis should return ERRSRV, ERRinvnid instead of NETWORK_NAME_DELETED
Found by the raw.context test.

metze
2012-05-18 16:36:16 +02:00
Michael Adam
7db637483b s3:idmap_cache: improve checks for format of value string in idmap_cache_find_sid2unixid()
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri May 18 16:34:27 CEST 2012 on sn-devel-104
2012-05-18 16:34:27 +02:00
Michael Adam
0c3137c2e1 s3:idmap_cache: add common exit point to idmap_cache_find_sid2unixid() 2012-05-18 14:44:15 +02:00
Michael Adam
ecb24fd459 s3:idmap_cache: improve debug messages in idmap_cache_find_sid2unixid() 2012-05-18 14:44:15 +02:00
Volker Lendecke
f5ca3f11e4 s3: Revert the serverid changes, they need more work
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
2012-05-18 13:12:14 +02:00
Andrew Bartlett
611ca8e819 build: Move generated files out of the normal build tree
This avoids some dual-build-system interactions.

Andrew Bartlett
2012-05-18 15:44:43 +10:00
Andrew Bartlett
584a51b2ca build: Move generated version.h to a waf-invisible location
Generally, it is better if our generated header files for the autoconf
build do not end up in places that the waf build can see.

Andrew Bartlett
2012-05-18 15:44:43 +10:00
Jeremy Allison
dc3ace63d4 Fix the waf build with the new "cleans up stale processes" test.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 18 00:20:36 CEST 2012 on sn-devel-104
2012-05-18 00:20:36 +02:00
Volker Lendecke
182faceab2 s3: Check for serverid_exists in close_directory
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-17 13:17:22 -07:00