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

40291 Commits

Author SHA1 Message Date
Andrew Bartlett
cf30feef16 s3-krb5: Remove unused get_principal_from_tkt
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
e715460898 s3-libads: Remove ads_verify_ticket() as it is now unused
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
410ca7311a s3-libads: Rework kerberos_return_pac() to use GENSEC for the server-side
This removes the last user of ads_verify_ticket(), and means that we
only have one code path to verify an incoming krb5 (GSSAPI) ticket.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
4e3e323080 s3-libsmb: Remove unused spnego_parse_krb5_wrap()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
c7d29e8cda build: Reduce deps of ntlm_auth
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
1c7c432874 s3-ntlm_auth: use manage_gensec_request for squid-2.5-ntlmssp
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
f3b005e759 s3-auth: Order GENSEC mechs by priority, krb5 before NTLMSSP
Otherwise, really simple clients (such as the current ntlm_auth gss-spnego client)
will not select krb5.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
893387d25f s3-ntlm_auth: add ntlm_auth_generate_session_info_pac()
Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:32 +02:00
Andrew Bartlett
4ccac90793 s3-ntlm_auth Use GENSEC for gss-spnego server
This imports the gensec handling code from the source4 ntlm_auth, which
will eventually be used for all the NTLMSSP and SPNEGO clients and servers
but which is only used for gss-spnego for now.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-04-03 17:47:31 +02:00
Volker Lendecke
22a6497526 s3: Enhance the dbwrap needed x attempts msg
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr  3 15:17:11 CEST 2012 on sn-devel-104
2012-04-03 15:17:11 +02:00
Andrew Bartlett
da50ff7f84 s3-vfs: initial work on posix:eadb module
This is a module that, like vfs_xattr_tdb, stores extended attributes
in a DB on disk.  This uses the format needed to support the
posix:eadb smb.conf option.

Andrew Bartlett
2012-04-03 14:35:02 +10:00
Andrew Bartlett
8ef60901ce s3-vfs: Use new smb_load_module for better diagnostics 2012-04-03 14:25:12 +10:00
Andrew Bartlett
c363815809 s3-smbd: Inline init_modules() into only caller 2012-04-03 14:25:12 +10:00
Volker Lendecke
831a97c147 s3: Notifies should never time out
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr  2 12:31:17 CEST 2012 on sn-devel-104
2012-04-02 12:31:17 +02:00
Volker Lendecke
0aacdbfada s3-aio-fork: Fix a segfault in vfs_aio_fork
aio_suspend does not signal the main process with a signal, it just waits. The
aio_fork module does not use the signal at all, it directly calls back into the
main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction
violation, but the alternative would have been to use signals where they are
not needed. However, in wait_for_aio_completion this bites us: With aio_fork we
call handle_aio_completed twice on the same aio_ex struct: Once from the call
to handle_aio_completion within the aio_fork module and once from the code in
wait_for_aio_completion.

This patch fixes it in a pretty bad way by introducing flag variables and more
state. But the mid-term plan is to replace the posix aio calls from the vfs and
do pread_send/recv and pwrite_send/recv at the vfs layer, so this will
significantly change anyway.

Thanks to Kirill Malkin <kirill.malkin@starboardstorage.com> for reporting this
crash!

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar 31 15:25:55 CEST 2012 on sn-devel-104
2012-03-31 15:25:54 +02:00
Volker Lendecke
7f7c2d721d s3-aio-fork: Fix aio_suspend event hierarchy
We end up here multiple times. There's no real point putting the events into
the child struct, at the end of this routine we need to free them anyway.
2012-03-31 13:51:17 +02:00
Volker Lendecke
aef86982b8 s3-aio-fork: Fix an alignment warning on OS/X 2012-03-31 13:51:17 +02:00
Richard Sharpe
7d3c26e8cf Make sure we claim that a DACL or SACL is present if the SD says so
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Sat Mar 31 09:34:36 CEST 2012 on sn-devel-104
2012-03-31 09:34:35 +02:00
Jeremy Allison
d497434434 Who would have guessed - checking returns from strlcat found a memory overwrite bug :-). 2012-03-30 21:26:07 +02:00
Jeremy Allison
959516d61b More strlcat/strlcpy truncate checks. 2012-03-30 21:26:07 +02:00
Volker Lendecke
1e24997e3e s3: Avoid a crash with debug level 10
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 30 16:52:16 CEST 2012 on sn-devel-104
2012-03-30 16:52:16 +02:00
Jeremy Allison
5df1c11539 Start to add truncate checks on all uses of strlcpy(). Reading lwn
has it's uses :-).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 29 20:48:15 CEST 2012 on sn-devel-104
2012-03-29 20:48:15 +02:00
Jeremy Allison
762928945d Based on code from Richard Sharpe <realrichardsharpe@gmail.com>,
ensure we don't crash on a NULL DACL.
2012-03-29 08:53:43 -07:00
Volker Lendecke
ed43a5a94f s3: Fix a valgrind error
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 29 15:50:13 CEST 2012 on sn-devel-104
2012-03-29 15:50:13 +02:00
Richard Sharpe
3be2af1df9 Add DEBUG statements to show when access has been denied and why.
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Wed Mar 28 07:07:26 CEST 2012 on sn-devel-104
2012-03-28 07:07:26 +02:00
Volker Lendecke
fa6f61e835 s3: Pass filters explicitly through vfs notify watch
This removes a dependency on "struct notify_entry" and makes the nature of the
API more explicit. We depend upon the VFS module to mask out elements from
e->filter and e->subdir_filter that it took over to handle.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104
2012-03-26 17:45:43 +02:00
Volker Lendecke
c3a506b64e s3: Fix a typo 2012-03-26 13:11:02 +02:00
Volker Lendecke
58c8857b72 s3: Rename a variable in inotify_watch for clarity 2012-03-26 13:10:10 +02:00
Volker Lendecke
6355d2e68a s3: Pass "filter" instead of "notify_entry" to inotify_map
This makes the potential modification a bit more obvious
2012-03-26 13:00:53 +02:00
Jelmer Vernooij
8ad52f6386 s3-make: Fix build with new smb2_session file.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Mar 26 00:56:13 CEST 2012 on sn-devel-104
2012-03-26 00:56:13 +02:00
Jelmer Vernooij
a8c066b023 smb2: Move smb2cli session setup code to cli_smb_common. 2012-03-25 17:14:56 +02:00
Jelmer Vernooij
c9fb33697d use usleep rather than sys_usleep in various places, in anticipation of usleep moving to libreplace. 2012-03-24 22:41:05 +01:00
Jelmer Vernooij
c0288e0612 lib/util: Remove obsolete sys_getpid() and sys_fork().
The performance of these is minimal (these days) and they can return
invalid results when used as part of applications that do not use
sys_fork().

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-03-24 21:55:40 +01:00
Jelmer Vernooij
85aa07761a adt_tree: Fix return types. 2012-03-24 17:11:11 +01:00
Jelmer Vernooij
5ba8adadd3 s3-waf: Use samba3-util library instead of lots of tiny libs.
The smaller libraries are currently all trivial in size and don't have
any dependencies other than samba-util.

Having lots of small private libraries is a pain for packaging,
and there isn't much advantage in this.
2012-03-24 16:42:47 +01:00
Jelmer Vernooij
6f1b735cc2 adt_tree: Avoid WERROR. 2012-03-24 16:41:35 +01:00
Jelmer Vernooij
71d41a015a libreplace: Add getpeereid implementation. 2012-03-24 16:00:36 +01:00
Jelmer Vernooij
76bb68fd2b util_malloc: Remove unused constant. 2012-03-24 15:44:33 +01:00
Jelmer Vernooij
32fd6d639a lib/util: Remove dummy wrapper for getgrgid(). 2012-03-24 15:26:36 +01:00
Jelmer Vernooij
2a82c45f02 lib/util: Remove dummy wrapper for getgrnam(). 2012-03-24 15:25:48 +01:00
Jelmer Vernooij
43f275008f lib/util: Remove dummy wrapper for getpwuid(). 2012-03-24 15:25:05 +01:00
Jelmer Vernooij
818e0722e1 lib/util: Remove dummy wrapper for getpwnam(). 2012-03-24 15:24:15 +01:00
Jelmer Vernooij
3be6258912 lib/util: Remove dummy wrappers for setpwent/getpwent/endpwent. 2012-03-24 15:23:02 +01:00
Jelmer Vernooij
14fdc1c5cd lib/util: Move calloc_array and memalign_array to top-level libutil. 2012-03-24 15:19:09 +01:00
Jelmer Vernooij
2c9444685d cli_pipe: Avoid sys_connect. 2012-03-24 14:57:47 +01:00
Jelmer Vernooij
e7cd5291db sock_exec: Avoid sys_connect. 2012-03-24 14:57:33 +01:00
Jelmer Vernooij
a9c22de3f4 util_sock: Avoid sys_connect. 2012-03-24 14:51:23 +01:00
Jelmer Vernooij
eb3617c426 ctdb_conn: Avoid sys_connect. 2012-03-24 14:48:56 +01:00
Jelmer Vernooij
d4c4cb06c5 replace: Move memalign() from lib/util/system.c to libreplace. 2012-03-24 14:43:21 +01:00
Volker Lendecke
1cc7abf8aa s3: Remove the sys_notify dependency from notify_internal
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 23 12:12:51 CET 2012 on sn-devel-104
2012-03-23 12:12:51 +01:00
Andrew Bartlett
ad8b150b9b s3-build: gss_krb5_export_lucid_sec_context is no longer used in the s3 build
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar 23 04:37:36 CET 2012 on sn-devel-104
2012-03-23 04:37:35 +01:00
Christian Ambach
8718c7b88d s3:vfs_gpfs: fix some compiler warnings
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Mar 22 20:14:34 CET 2012 on sn-devel-104
2012-03-22 20:14:34 +01:00
Christian Ambach
0a37ca5210 s3:vfs_gpfs: remove fallback to linux_setlease
if setting the lease in GPFS failed, there is not much sense in trying
to set a lease just locally that would not inform us of openers
on other cluster nodes
2012-03-22 18:41:22 +01:00
Christian Ambach
a551ee5f22 s3:vfs_gpfs: correct use of profiling macros
under certain conditions START_PROFILE could have been called, but no END_PROFILE
2012-03-22 18:41:22 +01:00
Christof Schmitt
0a896094c6 s3:vfs_gpfs: Implement fallocate callback for GPFS
GPFS provides the gpfs_prealloc call. Implement the fallocate
callback with mode VFS_FALLOCATE_EXTEND_SIZE using this call.
There is no support for VFS_FALLOCATE_KEEP_SIZE, so report
this mode as not available.
2012-03-22 18:41:22 +01:00
Christof Schmitt
62616784ae s3:vfs_gpfs: Report disk space and usage on GPFS share according to quotas
When a client requests the information about free space and space used,
adjust the reported values according to quotas in the GPFS file system:

- Retrieve quotas for the current user, current group and fileset for
  the top level of the share.
- If the soft block quota grace time has expired, report disk as full.
- If a hard block quota has been exceeded, report disk as full.
- If none of the hard block quotas been exceeded, report
  share size and free space according to the lowest limits found in
  the quotas.
- If no applicable hard block quota has been set, report the
  information from the statfs call.

This feature is disabled by default and has to be enabled by setting the
option gpfs:dfreequota.
2012-03-22 18:41:22 +01:00
Christof Schmitt
a9cfd80d87 s3:vfs_gpfs: add GPFS api calls for quota and free space reporting
Add the GPFS api calls for reporting the quotas and free space:
- get_gpfs_quota for querying a quota
- get_gpfs_fset_id for mapping a path to a fileset id
2012-03-22 18:41:22 +01:00
Christof Schmitt
4262eb401f s3:vfs_gpfs: Export disk_norm function
vfs modules implementing the disk_free callback need access
to the function disk_norm for normalizing the data if the parameter
small query is true.
2012-03-22 18:41:22 +01:00
Christian Ambach
80cb6e84de s3:client correct a wording 2012-03-22 18:41:22 +01:00
Volker Lendecke
ffe884c8db s3: Fix smbd -i
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 22 18:40:02 CET 2012 on sn-devel-104
2012-03-22 18:40:02 +01:00
Volker Lendecke
d1697b3eaa s3: Remove an unused structure field 2012-03-22 14:18:34 +01:00
Volker Lendecke
42cb8ff71c s3: Add "notify" cmd to smbclient
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 22 13:51:50 CET 2012 on sn-devel-104
2012-03-22 13:51:48 +01:00
Volker Lendecke
9091aec724 s3: Add sync cli_notify 2012-03-22 12:18:35 +01:00
Volker Lendecke
7a19b18b82 s3: Add FILE_NOTIFY_CHANGE_ALL #define 2012-03-22 12:18:34 +01:00
Volker Lendecke
c6669677b1 s3-libsmb: Fix parsing a notify response 2012-03-22 12:18:34 +01:00
Volker Lendecke
2351d74a03 s3: rename "len"->"next", according to wireshark 2012-03-22 12:18:33 +01:00
Michael Adam
2619eae626 s3:vfs_tsmsm: Fix a misspelling of a config parameter in the doc-comment
The module uses "tsmsm:dmapi attribute" instead of "tsmsm:attribute name".
2012-03-22 00:21:56 +01:00
Björn Baumbach
0e3be00af1 s3-selftest: Remove some unnecessary comma
Signed-off-by: Michael Adam <obnox@samba.org>
2012-03-22 00:21:56 +01:00
Björn Baumbach
56f2f76166 s3-selftest: Add samba3.blackbox.net.registry.check to test list
Signed-off-by: Michael Adam <obnox@samba.org>
2012-03-22 00:21:56 +01:00
Björn Baumbach
d5db47c7d4 s3-selftest: introduce new net registry check check
Add a new check which checks for defects in the net registry
check tool.

Signed-off-by: Michael Adam <obnox@samba.org>
2012-03-22 00:21:56 +01:00
Jeremy Allison
86a80cf4fd Fix bug 8823 - source3/smbd/process.c:smb_dump seems to have a memory leak.
Based on code from Richard Sharpe. Move to talloc from malloc.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 22 00:20:41 CET 2012 on sn-devel-104
2012-03-22 00:20:40 +01:00
Volker Lendecke
f3fe53668f s3: Move the notify_ctx to the smbd_server_connection
We only need one notify_ctx per smbd. The notify_array can become quite large.
It's based on absolute paths, so there's no point in having a copy of the
complete array in memory multiple times.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Mar 21 14:26:07 CET 2012 on sn-devel-104
2012-03-21 14:26:06 +01:00
Volker Lendecke
7dcc2bf7af s3: Remove "conn" param from notify_init() 2012-03-21 12:52:10 +01:00
Volker Lendecke
91f77253e7 s3: Remove "conn" param from sys_notify_context_create 2012-03-21 12:52:09 +01:00
Volker Lendecke
6a2bf12f6a s3: Remove "conn" from sys_notify_context 2012-03-21 12:52:09 +01:00
Volker Lendecke
8e256a2734 s3: Pass "conn" to sys_notify_watch() 2012-03-21 12:52:09 +01:00
Volker Lendecke
8044db0a4d s3: Pass "conn" to notify_add() 2012-03-21 12:52:09 +01:00
Volker Lendecke
4319076cca s3: Pass "path" through vfs_notify_watch 2012-03-21 12:52:09 +01:00
Jelmer Vernooij
b4d35bee38 libndr: Rename policy_handle_empty to ndr_policy_handle_empty.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Jelmer Vernooij
f92b05b955 libndr: Rename policy_handle_equal to ndr_policy_handle_equal.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Jelmer Vernooij
95ca5fbadd libndr: Rename ndr64_transfer_syntax and null_ndr_syntax_id so they have a ndr_ prefix.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Andrew Bartlett
0902392413 s3-winbindd Only use SamLogonEx when we can get unencrypted session keys
This ensures that we have some check on the session keys being returned
as the RC4 cipher is not checksumed.

The check comes from the fact that the credentials chain is tied to
the session key, and so if the credentials check passes then the
netlogon session key will be correct, and so the user session key
will be correctly decrypted.

Andrew Bartlett

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

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Mar 19 21:31:46 CET 2012 on sn-devel-104
2012-03-19 21:31:46 +01:00
Stefan Metzmacher
8d00fe57c2 s3:gse: fix debug message in gse_get_server_auth_token()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Mar 17 03:21:06 CET 2012 on sn-devel-104
2012-03-17 03:21:06 +01:00
Jeremy Allison
9d7444bfce Fix second part of bug #8811 - sd_has_inheritable_components segfaults on an SD that se_access_check accepts.
This fixes a coredump with a NULL DACL in add_directory_inheritable_components().

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 17 01:05:57 CET 2012 on sn-devel-104
2012-03-17 01:05:57 +01:00
Amitay Isaacs
cbe27b3719 build: Do not use --export-dynamic flag on OpenBSD 5.x
With --export-dynamic flag on OpenBSD 5.x, extra symbols get added in the
data segment which causes ABI generation script to fail.

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Fri Mar 16 16:04:31 CET 2012 on sn-devel-104
2012-03-16 16:04:31 +01:00
Volker Lendecke
8503eecabb s3-notify: Lift "/." handling up one level
This slightly simplifies the code

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 16 14:28:44 CET 2012 on sn-devel-104
2012-03-16 14:28:42 +01:00
Volker Lendecke
640a7d0db7 s3-notify: Simplify if-expressions 2012-03-16 11:20:11 +01:00
Volker Lendecke
1909af434e s3-dbwrap: Move "lock_order" initialization to db_open_xx 2012-03-16 11:20:10 +01:00
Jeremy Allison
6589e02807 Make reinit_after_fork_pipe_handler code with reads being interrupted by a signal.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar 15 23:29:47 CET 2012 on sn-devel-104
2012-03-15 23:29:47 +01:00
Stefan Metzmacher
148ca9e05f s3:smbd: call file_close_user() before removing tree connects in conn_close_all()
This will help later if we have to handle a SMB2TreeDisconnect different
compared to a SMB2SessionLogoff and a TCPDisconnect.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar 15 21:56:09 CET 2012 on sn-devel-104
2012-03-15 21:56:09 +01:00
Michael Adam
64627de35c s3:selftest: reactivate the writetimeupdatedelay speed-up
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-15 18:41:37 +01:00
Michael Adam
c80f70390c s3:smbd: let smbd/nmbd/winbindd child processes terminate if the parent process died.
This applies to all child processes making use of reinit_after_fork().
It is implemented by establishing a pipe between parent and child.
The child watches for EOF on the read end of the pipe, indidcating
an exited parent.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-15 18:41:37 +01:00
Volker Lendecke
21f72a1ac3 s3: Use talloc_tos() in notify_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar 15 12:43:41 CET 2012 on sn-devel-104
2012-03-15 12:43:41 +01:00
Volker Lendecke
f69c6920d4 s3: Fix lock ordering in notify_add
It's not necessary to keep the global notify record locked during
the inotify and notify_onelevel.tdb operations.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-03-15 11:00:24 +01:00
Volker Lendecke
a1fd41d834 s3: properly free the notify_onelevel record
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-03-15 11:00:24 +01:00
Volker Lendecke
21375a6e58 s3: Replace some callers of cluster_id_equal
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-03-15 11:00:24 +01:00
Volker Lendecke
81ec0cc602 s3: Remove the separate server_id arg to notify_init
The server_id is tied to the messaging_context

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-03-15 11:00:24 +01:00
Volker Lendecke
157a6916a9 s3: Fix blank line endings
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar 15 10:59:46 CET 2012 on sn-devel-104
2012-03-15 10:59:46 +01:00
Ira Cooper
e64b1188bc s3: Update waf build to include missed dependancy on Lion.
Autobuild-User: Ira Cooper <ira@samba.org>
Autobuild-Date: Thu Mar 15 07:34:43 CET 2012 on sn-devel-104
2012-03-15 07:34:43 +01:00
Ira Cooper
b990279304 util: Add --disable-fault-handling.
On some platforms you can not debug coredumps after the default signal handler
gets done dumping core.  This allows waf to have an option to disable our
default signal handler.
2012-03-15 05:55:03 +01:00
Andrew Bartlett
180b3a3bbe build: Do not build with utmp when we do not have utmp.h
This matches the autoconf build, and should partially address bug #8709.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 15 01:12:15 CET 2012 on sn-devel-104
2012-03-15 01:12:15 +01:00
Andrew Bartlett
04593da301 build: param must require cups to get the cups headers path in -I 2012-03-15 09:29:02 +11:00
Andrew Bartlett
49bb7f248a s3-krb5: Remove GSS_WRAP_IOV conditional
We already confirm that we have this functionality before we set HAVE_KRB5 at
configure time.

Andrew Bartlett
2012-03-15 09:29:02 +11:00
Andrew Bartlett
8b10d6848f selftest: test wbinfo --authenticate and --krb5auth 2012-03-15 09:29:02 +11:00
Andrew Bartlett
3a23c66357 build: Ensure that we clean build objects from auth/ as well 2012-03-15 09:29:01 +11:00
Stefan Metzmacher
89511d28bf s3:selftest: add support for 'make test FAIL_IMMEDIATELY=1'
This is what autobuild uses in order to let the build abort on the first
failure.

metze
2012-03-14 21:20:26 +01:00
Andreas Schneider
db0ea16604 s3-spoolss: Check return type of update_dsspooler().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Mar 14 19:38:45 CET 2012 on sn-devel-104
2012-03-14 19:38:45 +01:00
Andreas Schneider
c3c3d3ac3f s3-spoolss: Check return codes in update_dsspooler. 2012-03-14 17:56:14 +01:00
Andreas Schneider
fd85cd25e0 s3-printing: Check for browseable too. 2012-03-14 17:56:14 +01:00
Andreas Schneider
1a65f90a34 s3-printing: Make printer a const char *. 2012-03-14 17:56:14 +01:00
Andreas Schneider
034489718c s3-rpc_client: Add debug message for printer dataex errors. 2012-03-14 17:56:14 +01:00
Andreas Schneider
4bccc911b8 s3-rpc_server: Increase debug level for policy handle. 2012-03-14 17:56:13 +01:00
Jelmer Vernooij
26d68c3c28 samba3util: Add ccan to dependency list now that str_checksum() uses a ccan function.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Mar 14 17:55:51 CET 2012 on sn-devel-104
2012-03-14 17:55:50 +01:00
Christian Ambach
a5ddc2da10 s3:smb2_server: fix a compiler warning
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed Mar 14 16:06:48 CET 2012 on sn-devel-104
2012-03-14 16:06:48 +01:00
Stefan Metzmacher
a3e2151edd s3:smbd: also create ncalrpc/np directory before forking rpc daemons
After the fixes to directory_create_or_exist(), this should not be
needed anymore, but lets try to make autobuild reliable first.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar 14 13:44:41 CET 2012 on sn-devel-104
2012-03-14 13:44:41 +01:00
Matthieu Patou
442f1c81df autoconf: make autoconf build work on OS X 10.6
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Mar 14 08:31:19 CET 2012 on sn-devel-104
2012-03-14 08:31:19 +01:00
Matthieu Patou
b68f72c7f5 lib/crypto: Detect CommonCrypto and use it if available
CommonCrypto/CommonDigest is available on Mac and there is function in
the libc for MD5 calculation. MD5Final is a C define of CC_MD5_Final.
Under some circumstance we have the symbol defined twice in samba
binaries on Snow Leopard at least.

By detecting CommonCrypto/CommonDigest we end up always using the system
version if available.
2012-03-14 06:52:27 +01:00
Jeremy Allison
0e376db8b8 Second part of fix for bug #7933 - samba fails to honor SEC_STD_WRITE_OWNER bit with the acl_xattr module.
Error found by Andrew Bartlett <abartlet@samba.org> and Ricky Nance
<ricky.nance@weaubleau.k12.mo.us>.

Don't use a pointer when you really mean a bool flag.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 13 21:56:15 CET 2012 on sn-devel-104
2012-03-13 21:56:15 +01:00
Christian Ambach
7936fb0ab8 Fix bug #8807 - dcerpc_lsa_lookup_sids_noalloc() crashes when groups has more than 1000 groups
Use correct talloc heirarchy.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-13 12:17:31 -07:00
Andrew Bartlett
6ff5854c4f s3-spoolss: Consistently fail OpenPrinterEx with "" printername
samba3.rpc.spoolss.printserver has become a flakey test recently, and this
papers over the real problem.

Andrew Bartlett

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

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Mar 13 17:51:00 CET 2012 on sn-devel-104
2012-03-13 17:50:59 +01:00
Alexander Bokovoy
7d4ed89983 s3-rpc: Decrypt with the proper session key in CreateTrustedDomainEx2.
On LSA and SAMR pipes session_key is truncated to 16 byte when doing encryption/decryption.
However, this was not done for trusted domain-related modifying operations.

As result, Samba 4 client libraries do not work against Samba 3 while working
against Windows 2008 r2.

Solved this by introducing "session_extract_session_key()" function that allows to specify
intent of use of the key.

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Tue Mar 13 12:23:44 CET 2012 on sn-devel-104
2012-03-13 12:23:44 +01:00
Stefan Metzmacher
100b92b2cc s3:torture: fix segfault in LOCAL-TALLOC-DICT
talloc_dict_set() expects a pointer to an talloc'ed pointer.

metze
2012-03-13 08:26:35 +01:00
Stefan Metzmacher
57ddd38c1a s3:torture: talloc_dict_traverse() returns the number of entries
metze
2012-03-13 08:26:35 +01:00
Brad Smith
f0bba969d8 s3: Improve statvfs support
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sun Mar 11 14:18:04 CET 2012 on sn-devel-104
2012-03-11 14:18:04 +01:00
Jelmer Vernooij
ce4531ee31 tdb_wrap: Move to specific directory.
It's a bit confusing to mix low-level and high-level libraries.  We had
multiple libraries in one directory, and there were have circular
dependencies with other libraries outside that directory (in this case,
samba-hostconfig).

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 10 23:13:01 CET 2012 on sn-devel-104
2012-03-10 23:13:01 +01:00
Andrew Bartlett
16ecda3f11 selftest: fix running additional smbclient test for non-spnego session setup
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Mar 10 20:46:05 CET 2012 on sn-devel-104
2012-03-10 20:46:05 +01:00
Björn Jacke
7bd1dc5dd5 s3: fix build on AIX
Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Sat Mar 10 19:07:20 CET 2012 on sn-devel-104
2012-03-10 19:07:20 +01:00
Volker Lendecke
8f93068cf8 s3: Add smb_request_done
This is used to enable async chained command sequences. A synchronous
reply_xxx command does not need to take are anymore about and_x
chaining. The async commands (pipe r/w at this moment) must do so
however. When finished, they must inform the main chain engine that
they are finished with a smb_request_done call.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar 10 17:14:05 CET 2012 on sn-devel-104
2012-03-10 17:14:05 +01:00
Volker Lendecke
2c1caf5fcb s3: Remove unused smb_request->done 2012-03-10 15:34:12 +01:00
Volker Lendecke
3a7bc3abb8 s3: Remove unused smb_request->chain_outbuf 2012-03-10 15:34:12 +01:00
Volker Lendecke
572bc64b59 s3: Remove "req_wct_ofs()"
This is fixed up in construct_reply_chain
2012-03-10 15:34:12 +01:00
Volker Lendecke
12068d4aac s3: Fix the read&x offset within a chain 2012-03-10 15:34:12 +01:00
Volker Lendecke
11d087aa04 s3: Remove chain_reply
<insert your favourite tombstone ascii art here>
2012-03-10 15:34:12 +01:00
Volker Lendecke
3b2c9bebc0 s3: Replace chain_reply
This is a new implementation of our andx handling code. The old
code was quite involved in that it was called from within the reply_
handlers. This leads to pretty complex faking of smb_request
structures to give them the same environment, independent of whether
they are called directly or from within chain_reply.

chain_reply needs to go because it blocks really async handling of
chained requests.
2012-03-10 15:34:11 +01:00
Volker Lendecke
c9870a62f5 s3: Add a new set of andx chain handling routines
This is in preparation of getting rid of chain_reply.
2012-03-10 15:34:11 +01:00
Volker Lendecke
90b33a05e9 s3: Make sure the andX chains are ended correctly
Normally chain_reply took care of this. This will go away soon.
2012-03-10 15:34:11 +01:00
Volker Lendecke
a28a740f58 s3: Fix a 64-bit warning
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar 10 15:27:09 CET 2012 on sn-devel-104
2012-03-10 15:27:09 +01:00
Jeremy Allison
981e9776f8 Ensure the right tsocket.h is included.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Mar 10 03:47:04 CET 2012 on sn-devel-104
2012-03-10 03:47:04 +01:00
Jeremy Allison
97e1652125 Fix up Christian Ambach's multi-credit code - the CreditCharge field is a 16-bit int read, not a 32-bit one. 2012-03-09 16:48:16 -08:00
Christian Ambach
6e8e3c4613 s3:smb2_server validate message ids with largemtu
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:16 -08:00
Christian Ambach
f6afda0bc8 s3:smb2_server verify creditcharge
for all requests that have max_???? checks, also do a check of the
creditcharge the client has sent (when using largemtu)

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:16 -08:00
Christian Ambach
eec5ece6f5 s3:smb2_server add function to verify creditcharge
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:15 -08:00
Christian Ambach
bd0ad2bbb5 s3:smb2_server: announce LargeMTU for SMB2.1
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:15 -08:00
Christian Ambach
6d128aac11 s3:smb2_server increase defaults for read/write/trans sizes to 1MB
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:15 -08:00
Christian Ambach
7f131d3cee s3:smb2_server: add supports_multicredit to sconn
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:15 -08:00
Christian Ambach
880f64b556 s3:smb2_server use the correct variables for max read/write
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-09 16:48:15 -08:00
Volker Lendecke
177c61bd72 s3: asprintf->talloc_asprintf
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar  9 19:01:06 CET 2012 on sn-devel-104
2012-03-09 19:01:06 +01:00
Volker Lendecke
8a75d3d91e s3: Replace a SMB_ASSERT with an error return 2012-03-09 17:21:55 +01:00
Volker Lendecke
1bf126c0b3 s3: Remove some superfluous () 2012-03-09 17:21:11 +01:00
Andrew Bartlett
239c7a355c auth/ntlmssp: Remove gensec_security element from gensec_ntlmssp_state
This just means there is one less pointer to ensure we initialise.

Andrew Bartlett
2012-03-09 14:31:24 +11:00
Andrew Bartlett
77602d877e s3-auth: Remove single-implementation plugin layer
The ->get_ntlm_challenge and ->check_ntlm_password elements of struct auth_context
were only ever initialised to a single value.  Make it easier to follow by
just calling the function directly.

Andrew Bartlett
2012-03-08 10:14:05 +01:00
Andrew Bartlett
50547a9950 s3-auth: Follow auth_ntlmssp and use auth4_context for Session Setup
This patch ensures consistency in behaviour between NTLMSSP and NTLM
session setup handlers.  By calling the same layer that auth_ntlmssp
calls, we can not only allow redirection of all authentication to the
AD DC, we ensure that map to guest and username map handling is
consistent, even in the file server alone.

Andrew Bartlett
2012-03-08 10:14:05 +01:00
Andrew Bartlett
79753ec02c selftest: add more tests for different authentication codepaths 2012-03-08 10:14:05 +01:00
Jeremy Allison
9788d6a348 Change default protocol to SMB2_02.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar  7 22:41:21 CET 2012 on sn-devel-104
2012-03-07 22:41:21 +01:00
Ira Cooper
0c3474b45e s3: piddir creation fix part 2.
Since the piddir got moved from the lockdir by default, the default piddir
wasn't getting created, stopping some configurations from running.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-07 11:01:57 -08:00
Ira Cooper
e19cf64356 addns: Fix the Solaris/Illumos build.
uuid_t is not defined without including sys/uuid.h, configure+waf checks added.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-07 11:01:33 -08:00
Ira Cooper
25fbf907e9 s3: piddir creation fix.
Since the piddir got moved from the lockdir by default, the default piddir
wasn't getting created stopping some configurations from running.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-03-07 11:00:44 -08:00
Andrew Bartlett
54d36099ec s3-rpc_server: Do not register embedded ncacn_np endpoints by default
The end point mapper is primarily in support of lsasd, and the key
SAMR, LSA and NETLOGON services being accessed over TCP/IP.  The end
point mapper does not appear to be used for the well-known mappings to
named pipes, and we have a problem with how to safely register the
embedded pipes.  For now, disable this to avoid re-registration storms
in production, until we sort out a better way.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar  7 14:27:38 CET 2012 on sn-devel-104
2012-03-07 14:27:38 +01:00
Andrew Bartlett
78f85b282e s3-rpc_server: Register embedded RPC services after starting lsasd and spoolssd
This ensures that these services are not accidentally registered in
these child processes.

Andrew Bartlett
2012-03-07 12:46:14 +01:00
Andrew Bartlett
8466b3c85e s3-rpc_server: Do not setup ncalrpc pipes and TCP for embedded rpc servers
Embedded RPC services are those not launched in the preforked lsasd
and spoolssd children.

The reason that these child processes were created is that is is not
possible to correctly listen for ncalrpc and TCP connections without
creating a child process.  Therefore, we should not have these
embedded RPC services to listen on these sockets just because the
endpoint mapper has been enabled.

Andrew Bartlett
2012-03-07 12:46:13 +01:00
Andrew Bartlett
008648a034 s3-smbd make change_to_user_by_session static 2012-03-07 12:46:13 +01:00
Gregor Beck
4f5412dda6 s3:selftest: ask smbtorture4 for smb2 tests
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Mar  7 01:34:05 CET 2012 on sn-devel-104
2012-03-07 01:34:05 +01:00
Stefan Metzmacher
68b840726b s3:smbd: keep 'num_files' and 'files' directly under smbd_server_connection
The plan is to have files_struct as some kind of low level
abstraction for a smb1/smb2 opens, that can be used by SMB_VFS modules.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Mar  6 23:04:01 CET 2012 on sn-devel-104
2012-03-06 23:04:01 +01:00
Stefan Metzmacher
f6b6e963f6 s3:smbd: keep 'num_connections' and 'connections' directly under smbd_server_connection
The plan is to have connection_struct as some kind of low level
abstraction for a smb1/smb2 tree connects, that can be used by SMB_VFS modules.

metze
2012-03-06 21:26:05 +01:00
Stefan Metzmacher
6ce72a01ab s3:smbd: keep 'num_users' and 'users' directly under smbd_server_connection
The plan is to have users_struct as some kind of low level
abstraction for a smb1/smb2 session, that can be used by SMB_VFS modules.

metze
2012-03-06 21:26:05 +01:00
Stefan Metzmacher
d95dbb86c5 s3:msdfs: set the 'cnum' field to invalid for faked connection_structs
metze
2012-03-06 21:26:05 +01:00
Volker Lendecke
1f62df52aa s3: Move a talloc_strdup out of the main code path
This is only used for AS_GUEST requests

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Mar  6 14:29:50 CET 2012 on sn-devel-104
2012-03-06 14:29:50 +01:00
Volker Lendecke
b709589445 s3: Fix some format string warnings
We were printing nmb->header.name_trn_id with %hu, which denotes a
short. However, header.name_trn_id is an int for the better or
worse.
2012-03-06 10:38:32 +01:00
Andrew Bartlett
074ee6f34c s3-rpc_server: Remove remaining code for embedded endpoint mapper
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Mon Mar  5 23:14:33 CET 2012 on sn-devel-104
2012-03-05 23:14:33 +01:00
Andrew Bartlett
be7bcf0e55 s3-rpc_server: Only init and register embedded RPC services in dcesrv_ep_setup()
This consults the two definitions for embedded, that is if the deamon is forking
or if the rpc_server:<interface> line is set to embedded.

Andrew Bartlett

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-03-05 21:34:25 +01:00
Volker Lendecke
cae455f688 s3: Fix a "Invalid (state->nread >= 0)" warning
Both read_from_internal_pipe and tstream_readv_pdu_queue_recv return
ssize_t.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar  5 17:38:16 CET 2012 on sn-devel-104
2012-03-05 17:38:16 +01:00
Volker Lendecke
216769f2ce s3: Move the drain_socket on error to reply_write_and_X
That's the only case where this can happen, so we should not clutter the main
code path.
2012-03-05 15:59:36 +01:00
Volker Lendecke
82b948a816 s3: Use "goto out;" in reply_write_and_X 2012-03-05 15:59:36 +01:00
Volker Lendecke
07386bb533 s3: Remove "size" param from switch_message
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar  5 15:13:49 CET 2012 on sn-devel-104
2012-03-05 15:13:49 +01:00
Volker Lendecke
c99d245548 s3: Remove "size" param from smb_dump 2012-03-05 13:35:05 +01:00
Andrew Bartlett
14d31376aa s3-lsasd: Fix debug messages on registration failure
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar  5 09:50:17 CET 2012 on sn-devel-104
2012-03-05 09:50:17 +01:00
Andrew Bartlett
6dbf632bc3 selftest: Reduce declarations of smbclient_auth tests by moving into a loop 2012-03-05 08:15:05 +01:00
Andrew Bartlett
fc5762388a selftest: run smbtorture_s3 tests against the ntvfs file server
This checks not only the behaviour of the NTVFS file server, but also the
client library and authentication stack.

Andrew Bartlett
2012-03-05 08:15:05 +01:00
Amitay Isaacs
5c5111ca03 s3-ctdb: Enable CTDB readonly support only if CTDB supports it
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Mar  5 02:47:36 CET 2012 on sn-devel-104
2012-03-05 02:47:36 +01:00
Rusty Russell
5bda068773 dbwrap_ctdb: only fetch a read-only copy if we had a record already.
Because revoking read-only copies of records is expensive, we only
want ctdbd to do it for high-turnover records.  A basic heuristic is
that if we don't find a local copy of the record, don't ask for a
read-only copy.

The fetch itself will cause ctdbd to migrate the record, so eventually
we will have a local copy.  Next time it gets migrated away, we'll
call ctdbd_fetch() with local_copy = true.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Rusty Russell
67bb5abe81 ctdbd_conn: fetch read-only copies of records.
This means we try to get a read-only copy of a record, which we can
then place in the local tdb.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Rusty Russell
a3e6f55065 dbwrap_ctdb: handle read-only records.
The new read-only record flags make determining if we can use a record
a bit more complex, so extract it into its own function.

The OLD logic was:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it.

The new logic is:
1) If the record doesn't exist, we can't use it.
2) If we are the dmaster for the record, we can use it IF we only
   want read-only access, OR there are no read-only delegations.
3) If we are not dmaster, we can only use it if we want read-only
   access and it is marked as a read-only copy.

This logic is unused until the next patches which begin to ask
for read-only copies of records.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-05 01:11:26 +01:00
Andrew Bartlett
c23b2bdea1 selftest: remove unused config.h check
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar  5 01:10:01 CET 2012 on sn-devel-104
2012-03-05 01:10:01 +01:00
Andrew Bartlett
2c7d77c77f s3-smbd: vuser and session_info cannot be NULL here
The callers always supply it. (this is a hold-over from the
security=share removal).

Andrew Bartlett
2012-03-04 23:33:05 +01:00
Andrew Bartlett
8b99c83d2f s3-rpc_server: consolidate rpc server init routines
This uses a helper function to reduce duplication.

Andrew Bartlett
2012-03-04 23:33:05 +01:00
Andrew Bartlett
50de3cf9c0 s3-auth Add make_session_info_from_pw to avoid multiple getpwnam() calls 2012-03-04 23:33:05 +01:00
Andrew Bartlett
d7bb961859 s3-auth: Remove security=share (depricated since 3.6).
This patch removes security=share, which Samba implemented by matching
the per-share password provided by the client in the Tree Connect with
a selection of usernames supplied by the client, the smb.conf or
guessed from the environment.

The rationale for the removal is that for the bulk of security=share
users, we just we need a very simple way to run a 'trust the network'
Samba server, where users mark shares as guest ok.  This is still
supported, and the smb.conf options are documented at
https://wiki.samba.org/index.php/Public_Samba_Server

At the same time, this closes the door on one of the most arcane areas
of Samba authentication.

Naturally, full user-name/password authentication remain available in
security=user and above.

This includes documentation updates for username and only user, which
now only do a small amount of what they used to do.

Andrew Bartlett

                       --------------
                      /              \
                     /      REST      \
                    /        IN        \
                   /       PEACE        \
                  /                      \
                  |      SEC_SHARE       |
                  |    security=share    |
                  |                      |
                  |                      |
                  |       5 March        |
                  |                      |
                  |        2012          |
                 *|     *  *  *          | *
        _________)/\\_//(\/(/\)/\//\/\///|_)_______
2012-03-04 23:33:05 +01:00
Stefan Metzmacher
acfa107ec6 s3:smbd/globals.h: remove unused pollfd pointer
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Mar  4 23:18:10 CET 2012 on sn-devel-104
2012-03-04 23:18:10 +01:00
Volker Lendecke
b6f4a5d0ee s3: Fix some && vs & warnings
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Sun Mar  4 13:31:25 CET 2012 on sn-devel-104
2012-03-04 13:31:25 +01:00
Andrew Bartlett
769cee44a2 s3-winbindd: Add stdin handler for winbind
This will help avoid runaway processes in the test env, particularly when
the whole selftest.pl is killed.

Andrew Bartlett
2012-03-04 10:14:34 +01:00
Andrew Bartlett
807f5f1a8b s3-nmbd: Add stdin handler for nmbd
This will help avoid runaway processes in the test env, particularly
when the whole selftest.pl is killed.

Andrew Bartlett
2012-03-04 10:14:34 +01:00
Andrew Bartlett
b07d504ca4 change low FDs are handled in Samba
We now only close fds 0, 1, 2 when we are a forked daemon, and take
care not to close a file descriptor that we might need for foreground
stdin monitoring.

This should fix stdout logging in the lsa and epmapper deamons (ie in
make test).

Andrew Bartlett
2012-03-04 10:14:34 +01:00
Matthieu Patou
679bbd014e s3: don't replace the error message if already defined
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Mar  4 10:13:24 CET 2012 on sn-devel-104
2012-03-04 10:13:24 +01:00
Matthieu Patou
7916d64bbd s3: print a nice warning when HAVE_ADS is not enabled but you still try to do net rpc keytab vampire 2012-03-04 07:55:46 +01:00
Volker Lendecke
c887cb6852 s3: Fix a bogus if (client_len < 0)
On some platforms socklen_t might be unsigned, so comparing for <0
always returns true. Also, tsocket_address_bsd_sockaddr returns
ssize_t.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar  3 23:38:31 CET 2012 on sn-devel-104
2012-03-03 23:38:31 +01:00
Stefan Metzmacher
8dc1873ff5 s3:libsmb: pass smb2 capabilities and client guid in cli_state_create()
metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-03-03 17:03:07 +01:00
Michael Adam
ac43937ce4 smbXcli: add the possiblilty to negotiate client capabilites in smb >= 2.2
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-03-03 17:03:07 +01:00
Michael Adam
87fc8c0f64 s3:smbd:smb2_write: improve logging in the error case 2012-03-03 17:03:06 +01:00
Christian Ambach
a1ac670a8c s3:smb2_server: use SMB2_WATCH_TREE
it makes the code easier to understand if it uses the names specified in MS-SMB2 instead
of just the underlying values
2012-03-02 21:47:10 -08:00
Christian Ambach
8b25bc80c9 s3:smb2_server fix a typo 2012-03-02 21:47:09 -08:00
Volker Lendecke
197c185bc7 s3: Fix some blank line endings
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sat Mar  3 03:41:03 CET 2012 on sn-devel-104
2012-03-03 03:40:56 +01:00
Volker Lendecke
6c1c092f07 s3: Test for statfs before statfs64
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar  2 12:04:35 CET 2012 on sn-devel-104
2012-03-02 12:04:34 +01:00
Brad Smith
8bdc289099 s3: Further fix for bug 8777 2012-03-02 10:30:07 +01:00
Volker Lendecke
dcb1cd2933 s3: Enable statvfs usage on NetBSD
linux_statvfs is pretty much what you use when you have susv4.

No real code change, this moves linux_statvfs to the bottom of the
(LINUX) to #ifdef (STAT_STAVFS).
2012-03-02 10:30:07 +01:00
Stefan Metzmacher
89b413895b s3:rpc_server: initialize struct schannel_state to zero
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Mar  2 08:48:23 CET 2012 on sn-devel-104
2012-03-02 08:48:23 +01:00
Stefan Metzmacher
083d80c502 s3:rpc_client: initialize struct schannel_state to zero
metze
2012-03-02 07:07:10 +01:00
Andrew Bartlett
cfa33c4567 s3-selftest: Add tests for ntlm_auth gss-spnego client and server
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar  2 07:05:44 CET 2012 on sn-devel-104
2012-03-02 07:05:44 +01:00
Andrew Bartlett
19cfa3e604 s3-rpcclient: Ensure interfaces are loaded after smb.conf
This ensures that the interfaces line in the smb.conf is honoured.

Andrew Bartlett
2012-03-02 05:27:16 +01:00
Andrew Bartlett
f1452a2964 s3-libsmb: Initialise ticket to ensure we do not invalid memory
The free is however a talloc_free(), which has additional protection against
freeing the wrong thing.

Andrew Bartlett

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

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar  2 01:45:19 CET 2012 on sn-devel-104
2012-03-02 01:45:19 +01:00
Jeremy Allison
049375ec51 Move to talloc from malloc. 2012-03-01 15:05:56 -08:00
Jeremy Allison
e735b52254 Fix mixup between talloc/malloc. 2012-03-01 15:05:56 -08:00
Andrew Bartlett
8ea795672d s3-selftest: make ntlm_auth test more robust to bad input
If we do not know the helper protocol, make sure to error.

Andrew Bartlett
2012-03-01 22:04:46 +11:00
Andrew Bartlett
eca3a14870 s3-selftest: Add more tests for ntlm_auth 2012-03-01 22:04:46 +11:00
Andrew Bartlett
74c6d2bcf4 s3-ntlm_auth fix up gss-spnego-client so as to work with gss-spnego
The SPNEGO code changed since this was last tested.

Andrew Bartlett
2012-03-01 22:04:45 +11:00
Andrew Bartlett
4dae0e7ec5 s3-ntlm_auth: Wrap kerberos token in GSSAPI
While windows will accept this ticket without the wrapping, it is
nicer to follow the standard and wrap it up in GSSAPI.

This should allow the ntlm_auth gss-spnego-client to talk to
the ntlm_auth gss-spengo server.

Reported by Christof Schmitt <christof.schmitt@us.ibm.com>

Andrew Bartlett
2012-03-01 22:04:45 +11:00
Andrew Bartlett
5b700cb0e3 s3-ntlm_auth: Add --target-service and --target-hostname options
This will allow the gss-spnego-client protocol to work with modern
SPNEGO servers that do not send the principal in the mechListMIC.

Andrew Bartlett
2012-03-01 22:04:45 +11:00
Andrew Bartlett
6090a155f0 build: look for backtrace_symbols in libexec 2012-03-01 22:04:45 +11:00
Richard Sharpe
8b01b88fe8 Trivial Comment fix: Supply a missing word in a comment
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Thu Mar  1 06:55:44 CET 2012 on sn-devel-104
2012-03-01 06:55:44 +01:00
Volker Lendecke
8ea2b5da0c s3: Fix "make bin/smbtorture4" in the autoconf build
tdb2 support does not work with a system-supplied libtdb yet

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Thu Mar  1 05:23:57 CET 2012 on sn-devel-104
2012-03-01 05:23:56 +01:00
Jeremy Allison
1c2aacd6da Add open_dir_with_privilege() to ensure we're opening the correct directory when doing backup requests.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Mar  1 03:50:40 CET 2012 on sn-devel-104
2012-03-01 03:50:40 +01:00
Jeremy Allison
bca3fb3ecc Implement FLAG_TRANS2_FIND_BACKUP_INTENT for trans2 with privileges. 2012-02-29 17:04:46 -08:00
Jeremy Allison
3ddd9916f5 Add accessor functions to set a bool "priv" on a directory handle. Not yet used, but will be part of FLAG_TRANS2_FIND_BACKUP_INTENT code. 2012-02-29 17:04:39 -08:00
Jeremy Allison
89c55485c3 Add the implementation of check_reduced_name_with_privilege(). Now to plumb into
SMB1 requests.
2012-02-29 17:04:08 -08:00
Jeremy Allison
442e79efbd Add check_reduced_name_with_privilege(), filename_convert_with_privilege() (currently unimplemented) in order to prepare for adding SeBackup/SeRestore code to the main fileserver.
Not yet plumbed into the main SMB1/SMB2 code.
2012-02-29 15:57:49 -08:00
Stefan Metzmacher
65d42ab727 s3:torture/test_smb2: test path based calls during reauth in SMB2-MULTI-CHANNEL
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Feb 29 07:23:14 CET 2012 on sn-devel-104
2012-02-29 07:23:14 +01:00
Stefan Metzmacher
300ab04a07 s3:torture/test_smb2: test handle based calls during reauth in SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:11 +01:00
Stefan Metzmacher
2fced53cfe s3:torture/test_smb2: do a reauth over multiple channels in SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:11 +01:00
Stefan Metzmacher
670ea3e3a3 s3:torture/test_smb2: add a 3rd channel to SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:10 +01:00
Stefan Metzmacher
c0dac92b42 s3:torture/test_smb2: expect FILE_CLOSED on invalid handles in SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:10 +01:00
Stefan Metzmacher
062d1a09c2 lib/crypto: add aes_cmac_128* (rfc 4493)
Thanks to Jeremy, Michael and Volker for the debugging!

metze
2012-02-29 03:16:22 +01:00
Volker Lendecke
de870e979b s3: Introduce "req" helper var in reply_lockingX_success
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Feb 29 03:08:53 CET 2012 on sn-devel-104
2012-02-29 03:08:53 +01:00
Volker Lendecke
adac885881 s3: Fix a const warning 2012-02-29 01:32:54 +01:00
Volker Lendecke
c5c67cacd9 s3: Add a test that makes a chained open break an oplock
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Feb 29 01:13:03 CET 2012 on sn-devel-104
2012-02-29 01:13:01 +01:00
Volker Lendecke
e916778e6e s3: More fix for smbd -i
We need a full re-initialize, otherwise we don't re-init the USR1
signal handler
2012-02-28 23:36:15 +01:00
Jeremy Allison
6081fabe7e Fix problem reported by Tom Lee <tlee2951@gmail.com> - when calculating
the share security mask, take priviliges into account for the connecting
user.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Feb 28 20:21:26 CET 2012 on sn-devel-104
2012-02-28 20:21:26 +01:00
Andrew Tridgell
1da318d97d smbd: detect EOF on stdin in --foreground mode
if EOF is detected on stdin then exit
2012-02-28 12:01:08 +01:00
Stefan Metzmacher
43dd033618 s3:torture/test_smb2: test a tree_connect during reauth
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Feb 28 06:58:44 CET 2012 on sn-devel-104
2012-02-28 06:58:44 +01:00
Stefan Metzmacher
c64a85ee19 s3:torture/test_smb2: check directory listing during reauth
metze
2012-02-28 05:22:50 +01:00
Michael Adam
727f3ee6ac s3:libsmb:smb2: pass previous session ID to session setup, not previous session
We only need the session, and under some circumstances, it might complicate
things for the caller to have to cope with the whole structure (talloc...).
2012-02-28 00:08:52 +01:00
Matthieu Patou
5ebbd46b4a s3-winbindd: Close netlogon connection if the status returned by the NetrSamLogonEx call is timeout in the pam_auth_crap path
If not the child process would hang for quite a long time up to the
moment when the connection is cleaned by the kernel (took ~ 20 minutes)
in my tests.

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

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Feb 27 23:10:03 CET 2012 on sn-devel-104
2012-02-27 23:10:03 +01:00
Stefan Metzmacher
b8407c22d9 s3:torture/test_smb2: show that a session is not valid for path based calls during reauth
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Feb 27 16:29:02 CET 2012 on sn-devel-104
2012-02-27 16:29:02 +01:00
Stefan Metzmacher
f8cd6e8b59 s3:torture/test_smb2: show that a session is valid during a multi-leg reauth
metze
2012-02-27 14:55:15 +01:00
Stefan Metzmacher
1444d4900f s3:torture/test_smb2: fix missleading file name in reauth test
metze
2012-02-27 14:55:15 +01:00
Stefan Metzmacher
615c41ce12 libcli/smb/smb2_signing: pass down 'protocol' to smb2_signing_[sign|check]_pdu()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Feb 27 14:26:32 CET 2012 on sn-devel-104
2012-02-27 14:26:32 +01:00
Stefan Metzmacher
aa4331be9e libcli/smb/smbXcli: maintain smb2 channel_signing_key separate from the signing_key
The signing_key is fix across all channels and is used for session setups
on a channel binding.

Note:
 - the last session setup response is signed with the new channel signing key.
 - the reauth session setups are signed with the channel signing key.

It's also not needed to remember the main session key.

metze
2012-02-27 12:51:33 +01:00
Stefan Metzmacher
18cd0b789e s3:torture/test_smb2: remove explicit smb2_signing_check_pdu()
smb2cli_session_set_session_key() already checks the signature
and that function really knows the signing key.

metze
2012-02-27 12:51:33 +01:00
Stefan Metzmacher
c45cb3353b s3:torture/test_smb2: a reauth doesn't update the session/signing key
metze
2012-02-27 12:51:33 +01:00
Andrew Tridgell
8a0e420d4c dbwrap: changed log level for information about lock order
we were filling our logs with lock ordering debug lines

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 27 12:50:29 CET 2012 on sn-devel-104
2012-02-27 12:50:29 +01:00
Andrew Bartlett
b6fcac65fb s3-selftest: avoid running LOCAL- tests twice
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 27 09:07:59 CET 2012 on sn-devel-104
2012-02-27 09:07:59 +01:00
Andrew Bartlett
c318c94170 s3-param: Align lp_{max,min}protocol with lib/param names
This adds an alisas to ensure that both our loadparm systems know all
the names.

I would like to move to the 'server ..' name as canonical, and this
will be raised on the list.

Andrew Bartlett
2012-02-27 07:36:05 +01:00