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

94997 Commits

Author SHA1 Message Date
Andrew Bartlett
cb79cc342e s3-winbindd: Register winbindd with irpc
Change-Id: Ie3c7109fef6982d95e8cad06870334565352e329
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Andrew Bartlett
597d2a7a29 auth: Provide a way to use the auth stack for winbindd authentication
This adds in flags that allow winbindd to request authentication
without directly calling into the auth_sam module.

That in turn will allow winbindd to call auth_samba4 and so permit
winbindd operation in the AD DC.

Andrew Bartlett

Change-Id: I27d11075eb8e1a54f034ee2fdcb05360b4203567
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Andrew Bartlett
2e961bf598 winbindd: Call set_dc_type_and_flags on the internal domain
This allows the AD DC to be picked up correctly and gives the correct DNS name.

To ensure no confusion, we also always init it with the full DNS name.

It also means that, aside from the BUILTIN domain the initialized
flag is set only in one place, which will help when we add more details
to the domain structure in the future.

This in turn allows kerberos authentication against winbindd on the AD DC.

Andrew Bartlett

Change-Id: Idc829cfe5f2e867c87107b49275b17f294821dcd
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Andrew Bartlett
791c38282d dsdb: Do not refresh the schema using the wrong event context
What we now do is have the refresh function and module be on a
seperate object to the schema, only referring to the data and
not excuting on the original ldb and event loop.

That is, we never use another ldb context when calling the
refresh function, by binding the refresh handler to the
ldb and not the schema.

Andrew Bartlett

Change-Id: I5c323dda743cf5858badd01147fda6227599bc16
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Andrew Bartlett
8327321225 dsdb: Do not store a struct ldb_dn in struct schema_data
The issue is that the DN contains a pointer to the ldb it belongs to,
and if this is not kept around long enough, we might reference memory
after it is de-allocated.

Andrew Bartlett

Change-Id: I040a6c37a3164b3309f370e32e598dd56b1a1bbb
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Andrew Bartlett
cda32d4e47 passdb: Do not routinely clear the global memory returned by get_global_sam_sid()
This avoids use-after-free errors and tdb database churn.

Andrew Bartlett

Change-Id: If7ab2e24556d9dffc7ad22c0489d665dd75a0cab
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-06-11 10:18:26 +02:00
Martin Schwenke
6da8126a11 ctdb-eventscripts: New configuration variable CTDB_GANESHA_REC_SUBDIR
Backup and restore of the cluster filesystem can upset the operation
of 60.ganesha by changing the contents of this subdirectory.

Allow this subdirectory to be configured to a subdirectory that is
ignored by backup and restore processes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jun 11 09:29:22 CEST 2014 on sn-devel-104
2014-06-11 09:29:22 +02:00
Volker Lendecke
f4e358bc8b libcli: Add a NULL check in dom_sid_string
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun 10 21:46:15 CEST 2014 on sn-devel-104
2014-06-10 21:46:15 +02:00
Volker Lendecke
7c2b5e77b0 Use GUID_equal in a few places
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-10 19:19:13 +02:00
Volker Lendecke
e22a0675c2 libndr: Use GUID_compare in GUID_equal
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-10 19:19:13 +02:00
Jeremy Allison
9c6f1a589f s3: libsmb: Change cli_disk_size() to use the trans2/SMB_FS_FULL_SIZE_INFORMATION call in preference to the old SMB1 call.
Fallback to the old CORE protocol SMBdskattr if
trans2/SMB_FS_FULL_SIZE_INFORMATION is not supported.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun  7 05:41:44 CEST 2014 on sn-devel-104
2014-06-07 05:41:44 +02:00
Jeremy Allison
d0a7d7e87e s3: libsmb: Make cli_smb2_dskattr() a 64-bit interface.
Remove the fallback call from cli_dskattr() (now it's
not called from external client code).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-06-07 03:15:14 +02:00
Jeremy Allison
66a04ba7c1 s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-06-07 03:15:14 +02:00
Jeremy Allison
536c799f00 lib: tevent: make TEVENT_SIG_INCREMENT atomic.
On arm platforms incrementing a variable is not
an atomic operation, so may be interrupted by
signal processing (if a signal interrupts another
signal handler).

Use compiler built-ins to make this atomic.
__sync_fetch_and_add() works on gcc, llvm,
IBM xlC on AIX, and Intel icc (10.1 and
above).

atomic_add_32() works on Oracle Solaris.

Based on an inital patch from kamei@osstech.co.jp.

Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables

https://bugzilla.samba.org/show_bug.cgi?id=10640

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-06-07 03:15:14 +02:00
Jeremy Allison
463311422c s3/s4: smbd, rpc, ldap, cldap, kdc services.
Allow us to start if we bind to *either* :: or 0.0.0.0.

Allows us to cope with systems configured as only IPv4
or only IPv6.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
Reviewed-By: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun  7 01:01:44 CEST 2014 on sn-devel-104
2014-06-07 01:01:43 +02:00
Andreas Schneider
7091755c58 selftest: Add support for tmate.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun  6 02:25:52 CEST 2014 on sn-devel-104
2014-06-06 02:25:52 +02:00
Michael Adam
fae59b494b lib: Bump socket_wrapper version to 1.1.1.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
064592d9cb swrap: Disable incomplete bind checks (and tests) for EADDRINUSE.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
f6023bbd67 lib: Bump socket_wrapper version to 1.1.0. 2014-06-05 23:57:10 +02:00
Michael Adam
b9d6ad85a8 swrap: check whether an address:port is already in use in swrap_bind()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
05c1e2db22 swrap: implement check_addr_port_in_use()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
f9ddd20c2d swrap: fix AF_UNSPEC special case in swrap_bind()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
8f28674b50 swrap: extend input checks in swrap_bind()
Not only check family, but depending on family, also check the length.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
3700a4625c swrap: add check for rpc/rpc.h - needed on freebsd for bindresvport
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
6e6c817fd0 swrap: Add support for bindresvport().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
1b949b5d6c swrap: Add missing family check in bind().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
5ee936d7e2 swrap: Setup myname in swrap_socket() for getsockname().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
1f03de017b swrap: Make sure cmbuf is not NULL.
CID 63532

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
74ade40e3e swrap: We need to pass a pointer-pointer to not leak memory.
CID 63533

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
353709b3f3 swrap: Support more socket options in getsockopt().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
3689addffb swrap: Call swrap_msghdr_filter_cmsghdr in swrap_sendmsg_before().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
efe4eb2385 swrap: Add swrap_msghdr_filter_cmsg_pktinfo().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
6a35c6777d swrap: Add swrap_sendmsg_filter_cmsg_socket().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
2fe9612436 swrap: Add swrap_sendmsg_copy_cmsg().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
c704966f79 swrap: Add swrap_sendmsg_filter_cmsghdr().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
0247bdbbc8 swrap: Implement support for IP_RECVDSTADDR on BSD.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
aa1e24ead4 swrap: Check if the in_pktinfo structure is available.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
7556e1388f swrap: Silence a warning on OpenIndiana.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Pino Toscano
7a386b3308 swrap: Properly cache the handle also in LIBC_SO case.
Small regression introduced by me in commit
0fa56909442c3cfea6a697681ea0e89ba5a0aa0f.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10572

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
f288efcd78 swrap: Truncate the address if the buffer is to small.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
1df0810583 swrap: Process control messages in recvmsg().
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
fb308daaa0 swrap: Call swrap_msghdr_socket_info in swrap_recvmsg_after().
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
b534c45a2a swrap: Add swrap_msghdr_socket_info().
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
d5b204cefd swrap: Add swrap_msghdr_add_pktinfo().
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:09 +02:00
Andreas Schneider
56d5bf9af8 swrap: Add swrap_msghdr_add_cmsghdr().
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:09 +02:00
Andreas Schneider
ed3c219ec5 swrap: Add IP_PKTINFO support in setsockopt.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-06-05 23:57:09 +02:00
Andreas Schneider
1921da49c2 waf: Add check for HAVE_STRUCT_IN6_PKTINFO.
Signed-off-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:09 +02:00
Andreas Schneider
d652e0613e swrap: Correctly set the bind iface address on connect().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-06-05 23:57:09 +02:00
Pino Toscano
b5cd098054 swrap: use LIBC_SO from GNU libc, if available
Look for gnu/lib-names.h and use the LIBC_SO define to dlopen libc, so
the right library is loaded without manually searching for libc.so.N.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-06-05 23:57:09 +02:00
Volker Lendecke
7f36828fcc librpc: Fix a "ignoring asprintf return" warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>

Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date(master): Thu Jun  5 22:28:16 CEST 2014 on sn-devel-104
2014-06-05 22:28:16 +02:00